From cc0c175908eb0d44c6403f3eedf64a96af86c1dc Mon Sep 17 00:00:00 2001 From: Alexey Sheplyakov Date: Thu, 12 Nov 2015 14:32:35 +0300 Subject: [PATCH] Update to ceph 0.94.5 ... which is the latest Hammer release at the moment. The source has been downloaded from http://archive.ubuntu.com/ubuntu/pool/main/c/ceph/ceph_0.94.5.orig.tar.bz2 http://archive.ubuntu.com/ubuntu/pool/main/c/ceph/ceph_0.94.5-0ubuntu1.debian.tar.xz Related-Bug: #1509498 Change-Id: Idc8be5cc6d95b3072361e5ffc3a004087e52fe5d --- ceph/AUTHORS | 409 +- ceph/COPYING | 17 +- ceph/ChangeLog | 35899 ++++++++++++++++ ceph/INSTALL | 10 +- ceph/Makefile.am | 43 +- ceph/Makefile.in | 379 +- ceph/README | 154 +- ceph/aclocal.m4 | 781 +- ceph/ar-lib | 15 +- ceph/autogen.sh | 18 +- ceph/ceph.spec | 482 +- ceph/ceph.spec.in | 480 +- ceph/compile | 99 +- ceph/config.guess | 184 +- ceph/config.sub | 106 +- ceph/configure | 5365 ++- ceph/configure.ac | 468 +- ceph/depcomp | 487 +- ceph/install-deps.sh | 67 + ceph/install-sh | 14 +- ceph/ltmain.sh | 4 +- ceph/m4/ax_arm.m4 | 27 + ceph/m4/ax_cxx_compile_stdcxx_11.m4 | 142 + ceph/m4/libtool.m4 | 52 +- ceph/man/Makefile-client.am | 39 + ceph/man/Makefile-server.am | 27 + ceph/man/Makefile.am | 37 +- ceph/man/Makefile.in | 234 +- ceph/man/ceph-authtool.8 | 6 +- ceph/man/ceph-clsinfo.8 | 2 +- ceph/man/ceph-conf.8 | 2 +- ceph/man/ceph-create-keys.8 | 97 + ceph/man/ceph-debugpack.8 | 2 +- ceph/man/ceph-dencoder.8 | 2 +- ceph/man/ceph-deploy.8 | 841 + ceph/man/ceph-disk.8 | 400 + ceph/man/ceph-fuse.8 | 2 +- ceph/man/ceph-mds.8 | 2 +- ceph/man/ceph-mon.8 | 2 +- ceph/man/ceph-osd.8 | 2 +- ceph/man/ceph-post-file.8 | 2 +- ceph/man/ceph-rbdnamer.8 | 2 +- ceph/man/ceph-rest-api.8 | 2 +- ceph/man/ceph-run.8 | 2 +- ceph/man/ceph-syn.8 | 2 +- ceph/man/ceph.8 | 543 +- ceph/man/cephfs.8 | 4 +- ceph/man/crushtool.8 | 2 +- ceph/man/librados-config.8 | 2 +- ceph/man/mkcephfs.8 | 164 - ceph/man/monmaptool.8 | 2 +- ceph/man/mount.ceph.8 | 2 +- ceph/man/osdmaptool.8 | 2 +- ceph/man/rados.8 | 13 +- ceph/man/radosgw-admin.8 | 2 +- ceph/man/radosgw.8 | 2 +- ceph/man/rbd-fuse.8 | 2 +- ceph/man/rbd-replay-many.8 | 134 + ceph/man/rbd-replay-prep.8 | 103 + ceph/man/rbd-replay.8 | 141 + ceph/man/rbd.8 | 63 +- ceph/missing | 414 +- ceph/py-compile | 23 +- ceph/src/.git_version | 4 +- ceph/src/Makefile-client.am | 111 + ceph/src/Makefile-env.am | 28 +- ceph/src/Makefile-rocksdb.am | 372 + ceph/src/Makefile-server.am | 69 + ceph/src/Makefile.am | 181 +- ceph/src/Makefile.in | 19960 ++++++--- ceph/src/acconfig.h.in | 69 +- ceph/src/arch/Makefile.am | 4 +- ceph/src/arch/{neon.c => arm.c} | 11 +- ceph/src/arch/arm.h | 16 + ceph/src/arch/neon.h | 16 - ceph/src/arch/probe.cc | 4 +- ceph/src/auth/Auth.h | 4 +- ceph/src/auth/AuthSessionHandler.h | 5 +- ceph/src/auth/Crypto.h | 2 +- ceph/src/auth/KeyRing.cc | 2 + ceph/src/auth/cephx/CephxClientHandler.cc | 18 +- ceph/src/auth/cephx/CephxKeyServer.cc | 4 + ceph/src/auth/cephx/CephxKeyServer.h | 6 +- ceph/src/auth/cephx/CephxProtocol.h | 18 +- ceph/src/auth/none/AuthNoneServiceHandler.h | 1 - ceph/src/bash_completion/ceph | 29 +- ceph/src/bash_completion/rados | 2 +- ceph/src/bash_completion/rbd | 10 +- ceph/src/brag/Makefile.am | 3 +- ceph/src/brag/client/ceph-brag | 23 +- .../brag/server/ceph_brag/controllers/root.py | 6 +- ceph/src/ceph-create-keys | 4 + ceph/src/ceph-debugpack.in | 2 +- ceph/src/ceph-disk | 438 +- ceph/src/ceph-disk-udev | 15 + ceph/src/ceph-osd-prestart.sh | 50 + ceph/src/ceph-post-file.in | 20 +- ceph/src/ceph.in | 119 +- ceph/src/ceph_fuse.cc | 86 +- ceph/src/ceph_mds.cc | 147 +- ceph/src/ceph_mon.cc | 232 +- ceph/src/ceph_osd.cc | 96 +- ceph/src/ceph_syn.cc | 7 +- ceph/src/cephfs.cc | 9 +- ceph/src/civetweb/civetweb.h | 3 + ceph/src/civetweb/include/civetweb.h | 3 + ceph/src/civetweb/src/civetweb.c | 7 +- ceph/src/client/Client.cc | 2639 +- ceph/src/client/Client.h | 192 +- ceph/src/client/ClientSnapRealm.h | 2 +- ceph/src/client/Dentry.h | 14 +- ceph/src/client/Dir.h | 8 +- ceph/src/client/Fh.h | 18 +- ceph/src/client/Inode.cc | 18 +- ceph/src/client/Inode.h | 98 +- ceph/src/client/Makefile.am | 2 + ceph/src/client/MetaRequest.h | 12 +- ceph/src/client/MetaSession.cc | 20 + ceph/src/client/MetaSession.h | 12 +- ceph/src/client/ObjecterWriteback.h | 30 +- ceph/src/client/SyntheticClient.cc | 64 +- ceph/src/client/fuse_ll.cc | 131 +- ceph/src/client/fuse_ll.h | 3 + ceph/src/cls/Makefile-client.am | 76 + ceph/src/cls/Makefile-server.am | 60 + ceph/src/cls/Makefile.am | 141 +- ceph/src/cls/lock/cls_lock.cc | 76 + ceph/src/cls/lock/cls_lock_client.cc | 24 + ceph/src/cls/lock/cls_lock_client.h | 9 +- ceph/src/cls/lock/cls_lock_ops.cc | 18 + ceph/src/cls/lock/cls_lock_ops.h | 33 + ceph/src/cls/log/cls_log_ops.h | 2 +- ceph/src/cls/rbd/cls_rbd.cc | 379 +- ceph/src/cls/rbd/cls_rbd.h | 14 +- ceph/src/cls/rbd/cls_rbd_client.cc | 153 +- ceph/src/cls/rbd/cls_rbd_client.h | 26 +- ceph/src/cls/refcount/cls_refcount.cc | 2 +- .../cls/replica_log/cls_replica_log_types.h | 2 +- ceph/src/cls/rgw/cls_rgw.cc | 1855 +- ceph/src/cls/rgw/cls_rgw_client.cc | 476 +- ceph/src/cls/rgw/cls_rgw_client.h | 446 +- ceph/src/cls/rgw/cls_rgw_ops.cc | 166 +- ceph/src/cls/rgw/cls_rgw_ops.h | 409 +- ceph/src/cls/rgw/cls_rgw_types.cc | 278 +- ceph/src/cls/rgw/cls_rgw_types.h | 280 +- ceph/src/cls/statelog/cls_statelog_ops.h | 4 +- ceph/src/cls/statelog/cls_statelog_types.h | 2 +- ceph/src/common/AsyncReserver.h | 47 +- ceph/src/common/BackTrace.cc | 2 +- ceph/src/common/Clock.cc | 6 + ceph/src/common/ContextCompletion.cc | 49 + ceph/src/common/ContextCompletion.h | 47 + ceph/src/common/Continuation.h | 175 + ceph/src/common/Cycles.cc | 225 + ceph/src/common/Cycles.h | 111 + ceph/src/common/Finisher.cc | 3 + ceph/src/common/Finisher.h | 37 +- ceph/src/common/Formatter.cc | 514 +- ceph/src/common/Formatter.h | 318 +- ceph/src/common/Initialize.h | 96 + ceph/src/common/LogClient.cc | 163 +- ceph/src/common/LogClient.h | 146 +- ceph/src/common/LogEntry.cc | 68 +- ceph/src/common/LogEntry.h | 25 +- ceph/src/common/Makefile.am | 62 +- ceph/src/common/Mutex.cc | 31 +- ceph/src/common/Mutex.h | 21 +- ceph/src/common/QueueRing.h | 61 + ceph/src/common/RWLock.h | 159 +- ceph/src/common/Readahead.cc | 161 + ceph/src/common/Readahead.h | 153 + ceph/src/common/RefCountedObj.h | 34 +- ceph/src/common/TextTable.h | 3 +- ceph/src/common/Thread.cc | 2 +- ceph/src/common/Thread.h | 3 +- ceph/src/common/Throttle.cc | 6 + ceph/src/common/Throttle.h | 3 +- ceph/src/common/Timer.cc | 4 + ceph/src/common/Timer.h | 2 + ceph/src/common/TrackedOp.cc | 201 +- ceph/src/common/TrackedOp.h | 84 +- ceph/src/common/WorkQueue.cc | 162 +- ceph/src/common/WorkQueue.h | 142 +- ceph/src/common/addr_parsing.c | 6 +- ceph/src/common/address_helper.cc | 99 + ceph/src/common/address_helper.h | 24 + ceph/src/common/admin_socket.cc | 60 +- ceph/src/common/admin_socket.h | 3 +- ceph/src/common/assert.cc | 69 + ceph/src/common/bit_vector.hpp | 426 + ceph/src/common/blkdev.cc | 157 + ceph/src/common/blkdev.h | 8 +- ceph/src/common/bloom_filter.cc | 2 +- ceph/src/common/bloom_filter.hpp | 66 - ceph/src/common/buffer.cc | 345 +- ceph/src/common/ceph_context.cc | 200 +- ceph/src/common/ceph_context.h | 40 + ceph/src/common/ceph_crypto.cc | 46 +- ceph/src/common/ceph_crypto_cms.cc | 2 +- ceph/src/common/ceph_json.cc | 4 +- ceph/src/common/ceph_json.h | 56 +- ceph/src/common/ceph_strings.cc | 121 +- ceph/src/common/cmdparse.h | 4 +- ceph/src/common/code_environment.h | 1 + ceph/src/common/common_init.cc | 8 +- ceph/src/common/config.cc | 65 +- ceph/src/common/config.h | 9 +- ceph/src/common/config_opts.h | 286 +- ceph/src/common/debug.h | 2 + ceph/src/common/dout.h | 3 + ceph/src/common/entity_name.h | 2 +- ceph/src/common/escape.c | 21 +- ceph/src/common/escape.h | 4 +- ceph/src/common/fd.cc | 2 +- ceph/src/common/histogram.h | 4 + ceph/src/common/hobject.cc | 61 +- ceph/src/common/hobject.h | 91 +- ceph/src/common/lockdep.cc | 88 +- ceph/src/common/lockdep.h | 3 +- ceph/src/common/map_cacher.hpp | 4 +- ceph/src/common/module.c | 75 + ceph/src/common/module.h | 27 + ceph/src/common/obj_bencher.cc | 24 + ceph/src/common/obj_bencher.h | 3 +- ceph/src/common/perf_counters.cc | 170 +- ceph/src/common/perf_counters.h | 64 +- ceph/src/common/safe_io.c | 3 +- ceph/src/common/shared_cache.hpp | 204 +- ceph/src/common/simple_cache.hpp | 10 + ceph/src/common/str_map.cc | 127 +- ceph/src/common/strtol.cc | 32 +- ceph/src/common/strtol.h | 18 + ceph/src/common/sync_filesystem.h | 13 +- ceph/src/common/types.cc | 32 + ceph/src/common/valgrind.h | 15 + ceph/src/crush/CrushCompiler.cc | 7 + ceph/src/crush/CrushTester.cc | 155 +- ceph/src/crush/CrushTester.h | 18 + ceph/src/crush/CrushTreeDumper.h | 179 + ceph/src/crush/CrushWrapper.cc | 408 +- ceph/src/crush/CrushWrapper.h | 105 +- ceph/src/crush/Makefile.am | 2 + ceph/src/crush/builder.c | 188 +- ceph/src/crush/crush.c | 17 + ceph/src/crush/crush.h | 36 +- ceph/src/crush/crush_ln_table.h | 170 + ceph/src/crush/grammar.h | 5 +- ceph/src/crush/mapper.c | 136 +- ceph/src/erasure-code/ErasureCode.cc | 254 + ceph/src/erasure-code/ErasureCode.h | 97 + ceph/src/erasure-code/ErasureCodeInterface.h | 72 +- ceph/src/erasure-code/ErasureCodePlugin.cc | 65 +- ceph/src/erasure-code/ErasureCodePlugin.h | 9 +- ceph/src/erasure-code/Makefile.am | 10 + ceph/src/erasure-code/isa/ErasureCodeIsa.cc | 442 + ceph/src/erasure-code/isa/ErasureCodeIsa.h | 167 + .../isa/ErasureCodeIsaTableCache.cc | 327 + .../isa/ErasureCodeIsaTableCache.h | 105 + .../erasure-code/isa/ErasureCodePluginIsa.cc | 81 + ceph/src/erasure-code/isa/Makefile.am | 58 + .../isa/isa-l/erasure_code/ec_base.c | 320 + .../isa/isa-l/erasure_code/ec_base.h | 6680 +++ .../isa-l/erasure_code/ec_highlevel_func.c | 152 + .../isa-l/erasure_code/ec_multibinary.asm.s | 268 + .../erasure_code/gf_2vect_dot_prod_avx.asm.s | 236 + .../erasure_code/gf_2vect_dot_prod_avx2.asm.s | 248 + .../erasure_code/gf_2vect_dot_prod_sse.asm.s | 238 + .../erasure_code/gf_3vect_dot_prod_avx.asm.s | 260 + .../erasure_code/gf_3vect_dot_prod_avx2.asm.s | 273 + .../erasure_code/gf_3vect_dot_prod_sse.asm.s | 261 + .../erasure_code/gf_4vect_dot_prod_avx.asm.s | 298 + .../erasure_code/gf_4vect_dot_prod_avx2.asm.s | 307 + .../erasure_code/gf_4vect_dot_prod_sse.asm.s | 298 + .../erasure_code/gf_5vect_dot_prod_avx.asm.s | 313 + .../erasure_code/gf_5vect_dot_prod_avx2.asm.s | 325 + .../erasure_code/gf_5vect_dot_prod_sse.asm.s | 314 + .../erasure_code/gf_6vect_dot_prod_avx.asm.s | 325 + .../erasure_code/gf_6vect_dot_prod_avx2.asm.s | 336 + .../erasure_code/gf_6vect_dot_prod_sse.asm.s | 325 + .../erasure_code/gf_vect_dot_prod_avx.asm.s | 200 + .../erasure_code/gf_vect_dot_prod_avx2.asm.s | 205 + .../erasure_code/gf_vect_dot_prod_sse.asm.s | 197 + .../isa-l/erasure_code/gf_vect_mul_avx.asm.s | 174 + .../isa-l/erasure_code/gf_vect_mul_sse.asm.s | 180 + .../isa/isa-l/include/erasure_code.h | 659 + .../isa/isa-l/include/gf_vect_mul.h | 148 + .../isa/isa-l/include/reg_sizes.asm | 96 + .../erasure-code/isa/isa-l/include/types.h | 80 + ceph/src/erasure-code/isa/xor_op.cc | 179 + ceph/src/erasure-code/isa/xor_op.h | 88 + .../jerasure/ErasureCodeJerasure.cc | 367 +- .../jerasure/ErasureCodeJerasure.h | 116 +- .../jerasure/ErasureCodePluginJerasure.cc | 20 +- .../ErasureCodePluginSelectJerasure.cc | 66 +- ceph/src/erasure-code/jerasure/Makefile.am | 74 +- .../gf-complete/include/gf_complete.h | 28 +- .../jerasure/gf-complete/include/gf_int.h | 14 +- .../jerasure/gf-complete/include/gf_w16.h | 66 + .../jerasure/gf-complete/include/gf_w32.h | 71 + .../jerasure/gf-complete/include/gf_w4.h | 63 + .../jerasure/gf-complete/include/gf_w64.h | 50 + .../jerasure/gf-complete/include/gf_w8.h | 99 + .../jerasure/gf-complete/src/gf.c | 186 +- .../jerasure/gf-complete/src/gf_general.c | 11 +- .../jerasure/gf-complete/src/gf_method.c | 14 +- .../jerasure/gf-complete/src/gf_w128.c | 51 +- .../jerasure/gf-complete/src/gf_w16.c | 80 +- .../jerasure/gf-complete/src/gf_w32.c | 238 +- .../jerasure/gf-complete/src/gf_w4.c | 84 +- .../jerasure/gf-complete/src/gf_w64.c | 74 +- .../jerasure/gf-complete/src/gf_w8.c | 136 +- .../jerasure/gf-complete/src/gf_wgen.c | 4 +- .../gf-complete/src/neon/gf_w16_neon.c | 356 + .../gf-complete/src/neon/gf_w32_neon.c | 269 + .../gf-complete/src/neon/gf_w4_neon.c | 247 + .../gf-complete/src/neon/gf_w64_neon.c | 333 + .../gf-complete/src/neon/gf_w8_neon.c | 302 + .../jerasure/jerasure/include/galois.h | 1 + .../jerasure/jerasure/src/galois.c | 76 +- .../jerasure/jerasure/src/jerasure.c | 13 +- .../jerasure/jerasure/src/reed_sol.c | 9 +- ceph/src/erasure-code/lrc/ErasureCodeLrc.cc | 839 + ceph/src/erasure-code/lrc/ErasureCodeLrc.h | 134 + .../erasure-code/lrc/ErasureCodePluginLrc.cc | 60 + ceph/src/erasure-code/lrc/Makefile.am | 21 + .../shec/ErasureCodePluginShec.cc | 93 + ceph/src/erasure-code/shec/ErasureCodeShec.cc | 405 + ceph/src/erasure-code/shec/ErasureCodeShec.h | 143 + .../shec/ErasureCodeShecTableCache.cc | 97 + .../shec/ErasureCodeShecTableCache.h | 66 + ceph/src/erasure-code/shec/Makefile.am | 61 + ceph/src/erasure-code/shec/determinant.c | 94 + ceph/src/erasure-code/shec/shec.cc | 329 + ceph/src/erasure-code/shec/shec.h | 35 + ceph/src/global/global_init.cc | 5 - ceph/src/global/signal_handler.cc | 38 +- ceph/src/gmock/CHANGES | 126 + ceph/src/gmock/CMakeLists.txt | 171 + ceph/src/gmock/CONTRIBUTORS | 40 + ceph/src/{gtest/COPYING => gmock/LICENSE} | 0 ceph/src/gmock/Makefile.am | 216 + ceph/src/gmock/Makefile.in | 1686 + ceph/src/gmock/README | 369 + ceph/src/gmock/aclocal.m4 | 9986 +++++ ceph/src/gmock/build-aux/compile | 347 + .../{gtest => gmock}/build-aux/config.guess | 184 +- .../{gtest => gmock}/build-aux/config.h.in | 0 .../src/{gtest => gmock}/build-aux/config.sub | 106 +- ceph/src/{gtest => gmock}/build-aux/depcomp | 487 +- .../src/{gtest => gmock}/build-aux/install-sh | 14 +- ceph/src/{gtest => gmock}/build-aux/ltmain.sh | 4 +- ceph/src/gmock/build-aux/missing | 215 + ceph/src/gmock/build-aux/test-driver | 139 + ceph/src/gmock/configure | 18699 ++++++++ ceph/src/gmock/configure.ac | 146 + ceph/src/gmock/fused-src/gmock-gtest-all.cc | 11443 +++++ ceph/src/gmock/fused-src/gmock/gmock.h | 14198 ++++++ ceph/src/gmock/fused-src/gmock_main.cc | 54 + .../{gtest => gmock}/fused-src/gtest/gtest.h | 5112 ++- ceph/src/{ => gmock}/gtest/CHANGES | 59 + ceph/src/gmock/gtest/CMakeLists.txt | 252 + ceph/src/{ => gmock}/gtest/CONTRIBUTORS | 1 + ceph/src/gmock/gtest/LICENSE | 28 + ceph/src/{ => gmock}/gtest/Makefile.am | 159 +- ceph/src/gmock/gtest/Makefile.in | 1722 + ceph/src/{ => gmock}/gtest/README | 50 +- ceph/src/{ => gmock}/gtest/aclocal.m4 | 723 +- ceph/src/gmock/gtest/build-aux/compile | 347 + ceph/src/gmock/gtest/build-aux/config.guess | 1558 + ceph/src/gmock/gtest/build-aux/config.h.in | 69 + ceph/src/gmock/gtest/build-aux/config.sub | 1791 + ceph/src/gmock/gtest/build-aux/depcomp | 791 + ceph/src/gmock/gtest/build-aux/install-sh | 527 + ceph/src/gmock/gtest/build-aux/ltmain.sh | 9661 +++++ ceph/src/gmock/gtest/build-aux/missing | 215 + ceph/src/gmock/gtest/build-aux/test-driver | 139 + .../gmock/gtest/cmake/internal_utils.cmake | 227 + .../{ => gmock}/gtest/codegear/gtest.cbproj | 0 .../gtest/codegear/gtest.groupproj | 0 .../{ => gmock}/gtest/codegear/gtest_all.cc | 0 .../{ => gmock}/gtest/codegear/gtest_link.cc | 0 .../gtest/codegear/gtest_main.cbproj | 0 .../gtest/codegear/gtest_unittest.cbproj | 0 ceph/src/{ => gmock}/gtest/configure | 660 +- ceph/src/{ => gmock}/gtest/configure.ac | 6 +- .../gtest/fused-src/gtest/gtest-all.cc | 3572 +- ceph/src/gmock/gtest/fused-src/gtest/gtest.h | 20061 +++++++++ .../gtest/fused-src/gtest}/gtest_main.cc | 9 +- .../gtest/include/gtest/gtest-death-test.h | 61 +- .../gtest/include/gtest/gtest-message.h | 86 +- .../gtest/include/gtest/gtest-param-test.h | 69 +- .../include/gtest/gtest-param-test.h.pump | 74 +- .../gtest/include/gtest/gtest-printers.h | 855 + .../gtest/include/gtest/gtest-spi.h | 8 +- .../gtest/include/gtest/gtest-test-part.h | 21 +- .../gtest/include/gtest/gtest-typed-test.h | 30 +- .../{ => gmock}/gtest/include/gtest/gtest.h | 673 +- .../gtest/include/gtest/gtest_pred_impl.h | 94 +- .../gtest/include/gtest/gtest_prod.h | 0 .../internal/gtest-death-test-internal.h | 66 +- .../include/gtest/internal/gtest-filepath.h | 16 +- .../include/gtest/internal/gtest-internal.h | 635 +- .../include/gtest/internal/gtest-linked_ptr.h | 19 +- .../internal/gtest-param-util-generated.h | 609 +- .../gtest-param-util-generated.h.pump | 14 +- .../include/gtest/internal/gtest-param-util.h | 46 +- .../gtest/include/gtest/internal/gtest-port.h | 864 +- .../include/gtest/internal/gtest-string.h | 167 + .../include/gtest/internal/gtest-tuple.h | 96 +- .../include/gtest/internal/gtest-tuple.h.pump | 17 +- .../include/gtest/internal/gtest-type-util.h | 76 +- .../gtest/internal/gtest-type-util.h.pump | 76 +- ceph/src/{ => gmock}/gtest/m4/acx_pthread.m4 | 0 ceph/src/{ => gmock}/gtest/m4/gtest.m4 | 0 ceph/src/{ => gmock}/gtest/m4/libtool.m4 | 52 +- ceph/src/{ => gmock}/gtest/m4/ltoptions.m4 | 0 ceph/src/{ => gmock}/gtest/m4/ltsugar.m4 | 0 ceph/src/{ => gmock}/gtest/m4/ltversion.m4 | 0 ceph/src/{ => gmock}/gtest/m4/lt~obsolete.m4 | 0 ceph/src/{ => gmock}/gtest/make/Makefile | 6 +- ceph/src/{ => gmock}/gtest/msvc/gtest-md.sln | 0 ceph/src/gmock/gtest/msvc/gtest-md.vcproj | 126 + ceph/src/{ => gmock}/gtest/msvc/gtest.sln | 0 ceph/src/gmock/gtest/msvc/gtest.vcproj | 126 + .../gtest/msvc/gtest_main-md.vcproj | 36 - .../{ => gmock}/gtest/msvc/gtest_main.vcproj | 36 - .../gtest/msvc/gtest_prod_test-md.vcproj | 0 .../gtest/msvc/gtest_prod_test.vcproj | 0 .../gtest/msvc/gtest_unittest-md.vcproj | 0 .../gtest/msvc/gtest_unittest.vcproj | 0 .../{ => gmock}/gtest/samples/prime_tables.h | 0 ceph/src/{ => gmock}/gtest/samples/sample1.cc | 0 ceph/src/{ => gmock}/gtest/samples/sample1.h | 0 .../gtest/samples/sample10_unittest.cc | 5 +- .../gtest/samples/sample1_unittest.cc | 4 +- ceph/src/{ => gmock}/gtest/samples/sample2.cc | 0 ceph/src/{ => gmock}/gtest/samples/sample2.h | 1 - .../gtest/samples/sample2_unittest.cc | 10 +- .../{ => gmock}/gtest/samples/sample3-inl.h | 7 +- .../gtest/samples/sample3_unittest.cc | 2 +- ceph/src/{ => gmock}/gtest/samples/sample4.cc | 0 ceph/src/{ => gmock}/gtest/samples/sample4.h | 0 .../gtest/samples/sample4_unittest.cc | 2 +- .../gtest/samples/sample5_unittest.cc | 18 +- .../gtest/samples/sample6_unittest.cc | 2 +- .../gtest/samples/sample7_unittest.cc | 22 +- .../gtest/samples/sample8_unittest.cc | 2 +- .../gtest/samples/sample9_unittest.cc | 4 +- .../gtest/scripts/fuse_gtest_files.py | 18 +- .../gtest/scripts/gen_gtest_pred_impl.py | 21 +- .../{ => gmock}/gtest/scripts/gtest-config.in | 4 +- ceph/src/{ => gmock}/gtest/scripts/pump.py | 86 +- .../{ => gmock}/gtest/scripts/test/Makefile | 4 +- ceph/src/{ => gmock}/gtest/src/gtest-all.cc | 3 +- .../{ => gmock}/gtest/src/gtest-death-test.cc | 478 +- .../{ => gmock}/gtest/src/gtest-filepath.cc | 58 +- .../gtest/src/gtest-internal-inl.h | 432 +- ceph/src/{ => gmock}/gtest/src/gtest-port.cc | 208 +- ceph/src/gmock/gtest/src/gtest-printers.cc | 363 + .../{ => gmock}/gtest/src/gtest-test-part.cc | 8 +- .../{ => gmock}/gtest/src/gtest-typed-test.cc | 12 +- ceph/src/{ => gmock}/gtest/src/gtest.cc | 2035 +- .../gtest => gmock/gtest/src}/gtest_main.cc | 9 +- .../gtest/test/gtest-death-test_ex_test.cc | 93 + .../gtest/test/gtest-death-test_test.cc | 363 +- .../gtest/test/gtest-filepath_test.cc | 280 +- .../gtest/test/gtest-linked_ptr_test.cc | 10 +- .../gtest/test/gtest-listener_test.cc | 35 +- .../gtest/test/gtest-message_test.cc | 62 +- .../gtest/test/gtest-options_test.cc | 63 +- .../gtest/test/gtest-param-test2_test.cc | 2 +- .../gtest/test/gtest-param-test_test.cc | 115 +- .../gtest/test/gtest-param-test_test.h | 8 +- .../{ => gmock}/gtest/test/gtest-port_test.cc | 429 +- .../gmock/gtest/test/gtest-printers_test.cc | 1566 + .../gtest/test/gtest-test-part_test.cc | 4 +- .../gtest/test/gtest-tuple_test.cc | 4 +- .../gtest/test/gtest-typed-test2_test.cc | 2 +- .../gtest/test/gtest-typed-test_test.cc | 2 +- .../gtest/test/gtest-typed-test_test.h | 2 +- .../gtest/test/gtest-unittest-api_test.cc | 70 +- .../{ => gmock}/gtest/test/gtest_all_test.cc | 1 - .../test/gtest_break_on_failure_unittest.py | 24 +- .../test/gtest_break_on_failure_unittest_.cc | 12 +- .../gtest/test/gtest_catch_exceptions_test.py | 237 + .../test/gtest_catch_exceptions_test_.cc | 311 + .../gtest/test/gtest_color_test.py | 0 .../gtest/test/gtest_color_test_.cc | 2 +- .../gtest/test/gtest_env_var_test.py | 4 +- .../gtest/test/gtest_env_var_test_.cc | 2 +- .../gtest/test/gtest_environment_test.cc | 10 +- .../gtest/test/gtest_filter_unittest.py | 0 .../gtest/test/gtest_filter_unittest_.cc | 2 +- .../{ => gmock}/gtest/test/gtest_help_test.py | 15 +- .../gtest/test/gtest_help_test_.cc | 2 +- .../gtest/test/gtest_list_tests_unittest.py | 92 +- .../gtest/test/gtest_list_tests_unittest_.cc | 157 + .../gtest/test/gtest_main_unittest.cc | 2 +- .../gtest/test/gtest_no_test_unittest.cc | 14 +- .../gtest/test/gtest_output_test.py | 40 +- .../gtest/test/gtest_output_test_.cc | 197 +- .../test/gtest_output_test_golden_lin.txt | 52 +- .../gtest/test/gtest_pred_impl_unittest.cc | 31 +- .../gtest/test/gtest_premature_exit_test.cc | 141 + .../{ => gmock}/gtest/test/gtest_prod_test.cc | 2 +- .../gtest/test/gtest_repeat_test.cc | 10 +- .../gtest/test/gtest_shuffle_test.py | 0 .../gtest/test/gtest_shuffle_test_.cc | 3 +- .../gtest/test/gtest_sole_header_test.cc | 2 +- .../gtest/test/gtest_stress_test.cc | 7 +- .../gtest/test/gtest_test_utils.py | 33 +- .../test/gtest_throw_on_failure_ex_test.cc | 2 +- .../gtest/test/gtest_throw_on_failure_test.py | 0 .../test/gtest_throw_on_failure_test_.cc | 20 +- .../gtest/test/gtest_uninitialized_test.py | 0 .../gtest/test/gtest_uninitialized_test_.cc | 2 +- .../{ => gmock}/gtest/test/gtest_unittest.cc | 1825 +- .../gtest/test/gtest_xml_outfile1_test_.cc | 2 +- .../gtest/test/gtest_xml_outfile2_test_.cc | 2 +- .../gtest/test/gtest_xml_outfiles_test.py | 4 +- .../gtest/test/gtest_xml_output_unittest.py | 167 +- .../gtest/test/gtest_xml_output_unittest_.cc | 52 +- .../gtest/test/gtest_xml_test_utils.py | 80 +- ceph/src/{ => gmock}/gtest/test/production.cc | 0 ceph/src/{ => gmock}/gtest/test/production.h | 2 +- .../gtest/xcode/Config/DebugProject.xcconfig | 0 .../xcode/Config/FrameworkTarget.xcconfig | 0 .../gtest/xcode/Config/General.xcconfig | 0 .../xcode/Config/ReleaseProject.xcconfig | 0 .../xcode/Config/StaticLibraryTarget.xcconfig | 0 .../gtest/xcode/Config/TestTarget.xcconfig | 0 .../gtest/xcode/Resources/Info.plist | 0 .../xcode/Samples/FrameworkSample/Info.plist | 0 .../WidgetFramework.xcodeproj/project.pbxproj | 0 .../xcode/Samples/FrameworkSample/runtests.sh | 0 .../xcode/Samples/FrameworkSample/widget.cc | 0 .../xcode/Samples/FrameworkSample/widget.h | 0 .../Samples/FrameworkSample/widget_test.cc | 2 +- .../gtest/xcode/Scripts/runtests.sh | 0 .../gtest/xcode/Scripts/versiongenerate.py | 0 .../xcode/gtest.xcodeproj/project.pbxproj | 69 +- ceph/src/gmock/include/gmock/gmock-actions.h | 1078 + .../gmock/include/gmock/gmock-cardinalities.h | 147 + .../include/gmock/gmock-generated-actions.h | 2415 ++ .../gmock/gmock-generated-actions.h.pump | 821 + .../gmock/gmock-generated-function-mockers.h | 991 + .../gmock-generated-function-mockers.h.pump | 265 + .../include/gmock/gmock-generated-matchers.h | 2190 + .../gmock/gmock-generated-matchers.h.pump | 674 + .../gmock/gmock-generated-nice-strict.h | 397 + .../gmock/gmock-generated-nice-strict.h.pump | 161 + ceph/src/gmock/include/gmock/gmock-matchers.h | 3986 ++ .../gmock/include/gmock/gmock-more-actions.h | 233 + .../include/gmock/gmock-more-matchers.h} | 67 +- .../gmock/include/gmock/gmock-spec-builders.h | 1791 + ceph/src/gmock/include/gmock/gmock.h | 94 + .../internal/gmock-generated-internal-utils.h | 279 + .../gmock-generated-internal-utils.h.pump | 136 + .../gmock/internal/gmock-internal-utils.h | 498 + .../gmock/include/gmock/internal/gmock-port.h | 78 + ceph/src/gmock/make/Makefile | 101 + ceph/src/gmock/msvc/2005/gmock.sln | 32 + ceph/src/gmock/msvc/2005/gmock.vcproj | 191 + ceph/src/gmock/msvc/2005/gmock_config.vsprops | 15 + ceph/src/gmock/msvc/2005/gmock_main.vcproj | 187 + ceph/src/gmock/msvc/2005/gmock_test.vcproj | 201 + ceph/src/gmock/msvc/2010/gmock.sln | 32 + ceph/src/gmock/msvc/2010/gmock.vcxproj | 82 + ceph/src/gmock/msvc/2010/gmock_config.props | 19 + ceph/src/gmock/msvc/2010/gmock_main.vcxproj | 88 + ceph/src/gmock/msvc/2010/gmock_test.vcxproj | 101 + ceph/src/gmock/scripts/fuse_gmock_files.py | 240 + ceph/src/gmock/scripts/generator/LICENSE | 203 + ceph/src/gmock/scripts/generator/README | 35 + .../gmock/scripts/generator/README.cppclean | 115 + .../gmock/scripts/generator/cpp/__init__.py | 0 ceph/src/gmock/scripts/generator/cpp/ast.py | 1723 + .../scripts/generator/cpp/gmock_class.py | 226 + .../gmock/scripts/generator/cpp/keywords.py | 59 + .../gmock/scripts/generator/cpp/tokenize.py | 287 + ceph/src/gmock/scripts/generator/cpp/utils.py | 41 + ceph/src/gmock/scripts/generator/gmock_gen.py | 31 + ceph/src/gmock/scripts/gmock-config.in | 303 + ceph/src/gmock/src/gmock-all.cc | 47 + ceph/src/gmock/src/gmock-cardinalities.cc | 156 + ceph/src/gmock/src/gmock-internal-utils.cc | 174 + ceph/src/gmock/src/gmock-matchers.cc | 498 + ceph/src/gmock/src/gmock-spec-builders.cc | 813 + ceph/src/gmock/src/gmock.cc | 182 + ceph/src/gmock/src/gmock_main.cc | 54 + ceph/src/gmock/test/gmock-actions_test.cc | 1256 + .../gmock/test/gmock-cardinalities_test.cc | 428 + .../test/gmock-generated-actions_test.cc | 1225 + .../gmock-generated-function-mockers_test.cc | 588 + .../gmock-generated-internal-utils_test.cc | 127 + .../test/gmock-generated-matchers_test.cc | 1289 + .../gmock/test/gmock-internal-utils_test.cc | 649 + ceph/src/gmock/test/gmock-matchers_test.cc | 5247 +++ .../src/gmock/test/gmock-more-actions_test.cc | 705 + ceph/src/gmock/test/gmock-nice-strict_test.cc | 424 + ceph/src/gmock/test/gmock-port_test.cc | 43 + .../gmock/test/gmock-spec-builders_test.cc | 2613 ++ ceph/src/gmock/test/gmock_all_test.cc | 48 + ceph/src/gmock/test/gmock_ex_test.cc | 78 + ceph/src/gmock/test/gmock_leak_test.py | 108 + ceph/src/gmock/test/gmock_leak_test_.cc | 100 + ceph/src/gmock/test/gmock_link2_test.cc | 40 + ceph/src/gmock/test/gmock_link_test.cc | 40 + ceph/src/gmock/test/gmock_link_test.h | 669 + ceph/src/gmock/test/gmock_output_test.py | 180 + ceph/src/gmock/test/gmock_output_test_.cc | 291 + .../gmock/test/gmock_output_test_golden.txt | 310 + ceph/src/gmock/test/gmock_stress_test.cc | 322 + ceph/src/gmock/test/gmock_test.cc | 255 + ceph/src/gmock/test/gmock_test_utils.py | 112 + ceph/src/gtest/CMakeLists.txt | 384 - ceph/src/gtest/Makefile.in | 1381 - ceph/src/gtest/build-aux/missing | 331 - .../include/gtest/internal/gtest-string.h | 350 - ceph/src/gtest/msvc/gtest-md.vcproj | 237 - ceph/src/gtest/msvc/gtest.vcproj | 237 - .../test/gtest_output_test_golden_win.txt | 605 - ceph/src/gtest/test/run_tests_util.py | 466 - ceph/src/gtest/test/run_tests_util_test.py | 676 - ceph/src/include/CompatSet.h | 30 +- ceph/src/include/Context.h | 185 +- ceph/src/include/Makefile.am | 43 +- ceph/src/include/addr_parsing.h | 2 +- ceph/src/include/assert.h | 8 + ceph/src/include/atomic.h | 8 +- ceph/src/include/buffer.h | 114 +- ceph/src/include/ceph_features.h | 45 +- ceph/src/include/ceph_fs.h | 11 +- ceph/src/include/cephfs/libcephfs.h | 48 + ceph/src/include/cmp.h | 22 + ceph/src/include/dlist.h | 127 - ceph/src/include/encoding.h | 99 +- ceph/src/include/filepath.h | 1 + ceph/src/include/frag.h | 53 +- ceph/src/include/int_types.h | 14 +- ceph/src/include/interval_set.h | 1 + ceph/src/include/krbd.h | 46 + ceph/src/include/linux_fiemap.h | 2 - ceph/src/include/lru.h | 15 +- ceph/src/include/msgr.h | 2 +- ceph/src/include/object.h | 3 - ceph/src/include/rados.h | 301 +- ceph/src/include/rados/buffer.h | 114 +- ceph/src/include/rados/librados.h | 1088 +- ceph/src/include/rados/librados.hpp | 232 +- ceph/src/include/rados/rados_types.h | 9 + ceph/src/include/rados/rados_types.hpp | 11 + .../include/radosstriper/libradosstriper.h | 574 + .../include/radosstriper/libradosstriper.hpp | 224 + ceph/src/include/rbd/features.h | 19 +- ceph/src/include/rbd/librbd.h | 240 +- ceph/src/include/rbd/librbd.hpp | 27 +- ceph/src/include/rbd/object_map_types.h | 12 + ceph/src/include/rbd_types.h | 8 +- ceph/src/include/str_map.h | 119 +- ceph/src/include/stringify.h | 14 +- ceph/src/include/types.h | 47 +- ceph/src/include/unordered_map.h | 2 + ceph/src/include/util.h | 34 + ceph/src/include/utime.h | 23 +- ceph/src/include/xlist.h | 29 +- ceph/src/init-ceph.in | 41 +- ceph/src/init-radosgw | 95 +- ceph/src/init-radosgw.sysv | 118 - ceph/src/init-rbdmap | 91 +- ceph/src/java/Makefile.am | 8 +- ceph/src/java/Makefile.in | 172 +- ceph/src/java/native/libcephfs_jni.cc | 18 +- ceph/src/json_spirit/Makefile.am | 1 + .../json_spirit/json_spirit_reader_template.h | 34 +- ceph/src/key_value_store/Makefile.am | 5 + ceph/src/key_value_store/cls_kvs.cc | 4 +- .../src/key_value_store/key_value_structure.h | 2 +- .../key_value_store/kv_flat_btree_async.cc | 13 +- .../src/key_value_store/kv_flat_btree_async.h | 2 +- ceph/src/krbd.cc | 640 + ceph/src/libcephfs.cc | 164 +- ceph/src/librados-config.cc | 12 +- ceph/src/librados/AioCompletionImpl.h | 2 + ceph/src/librados/IoCtxImpl.cc | 518 +- ceph/src/librados/IoCtxImpl.h | 55 +- ceph/src/librados/ListObjectImpl.h | 78 + ceph/src/librados/Makefile.am | 35 +- ceph/src/librados/RadosClient.cc | 457 +- ceph/src/librados/RadosClient.h | 39 +- ceph/src/librados/RadosXattrIter.cc | 27 + ceph/src/librados/RadosXattrIter.h | 38 + ceph/src/librados/librados.cc | 1655 +- ceph/src/librados/snap_set_diff.cc | 2 +- ceph/src/libradosstriper/Makefile.am | 27 + .../libradosstriper/MultiAioCompletionImpl.cc | 61 + .../libradosstriper/MultiAioCompletionImpl.h | 174 + ceph/src/libradosstriper/RadosStriperImpl.cc | 1073 + ceph/src/libradosstriper/RadosStriperImpl.h | 338 + ceph/src/libradosstriper/libradosstriper.cc | 613 + ceph/src/librbd/AioCompletion.cc | 103 +- ceph/src/librbd/AioCompletion.h | 95 +- ceph/src/librbd/AioRequest.cc | 512 +- ceph/src/librbd/AioRequest.h | 289 +- ceph/src/librbd/AsyncFlattenRequest.cc | 176 + ceph/src/librbd/AsyncFlattenRequest.h | 77 + ceph/src/librbd/AsyncObjectThrottle.cc | 100 + ceph/src/librbd/AsyncObjectThrottle.h | 73 + ceph/src/librbd/AsyncOperation.cc | 56 + ceph/src/librbd/AsyncOperation.h | 48 + ceph/src/librbd/AsyncRequest.cc | 43 + ceph/src/librbd/AsyncRequest.h | 81 + ceph/src/librbd/AsyncResizeRequest.cc | 292 + ceph/src/librbd/AsyncResizeRequest.h | 103 + ceph/src/librbd/AsyncTrimRequest.cc | 278 + ceph/src/librbd/AsyncTrimRequest.h | 78 + ceph/src/librbd/CopyupRequest.cc | 222 + ceph/src/librbd/CopyupRequest.h | 80 + ceph/src/librbd/ImageCtx.cc | 501 +- ceph/src/librbd/ImageCtx.h | 104 +- ceph/src/librbd/ImageWatcher.cc | 1063 + ceph/src/librbd/ImageWatcher.h | 276 + ceph/src/librbd/LibrbdWriteback.cc | 72 +- ceph/src/librbd/LibrbdWriteback.h | 15 +- ceph/src/librbd/Makefile.am | 60 +- ceph/src/librbd/ObjectMap.cc | 509 + ceph/src/librbd/ObjectMap.h | 140 + ceph/src/librbd/SnapInfo.h | 11 +- ceph/src/librbd/TaskFinisher.h | 142 + ceph/src/librbd/WatchCtx.cc | 36 - ceph/src/librbd/WatchCtx.h | 32 - ceph/src/librbd/WatchNotifyTypes.cc | 393 + ceph/src/librbd/WatchNotifyTypes.h | 246 + ceph/src/librbd/internal.cc | 1588 +- ceph/src/librbd/internal.h | 55 +- ceph/src/librbd/librbd.cc | 920 +- ceph/src/libs3/GNUmakefile | 19 +- ceph/src/libs3/inc/util.h | 2 +- ceph/src/libs3/src/general.c | 2 +- ceph/src/libs3/src/request.c | 2 +- ceph/src/libs3/src/s3.c | 8 +- ceph/src/log/Log.cc | 45 +- ceph/src/log/Log.h | 11 + ceph/src/log/test.cc | 22 + ceph/src/mds/Anchor.cc | 64 - ceph/src/mds/Anchor.h | 55 - ceph/src/mds/AnchorClient.cc | 129 - ceph/src/mds/AnchorClient.h | 46 - ceph/src/mds/AnchorServer.cc | 351 - ceph/src/mds/AnchorServer.h | 87 - ceph/src/mds/Beacon.cc | 354 + ceph/src/mds/Beacon.h | 108 + ceph/src/mds/CDentry.cc | 51 +- ceph/src/mds/CDentry.h | 93 +- ceph/src/mds/CDir.cc | 490 +- ceph/src/mds/CDir.h | 194 +- ceph/src/mds/CInode.cc | 810 +- ceph/src/mds/CInode.h | 383 +- ceph/src/mds/Capability.h | 36 +- ceph/src/mds/Dumper.cc | 269 - ceph/src/mds/InoTable.cc | 19 +- ceph/src/mds/InoTable.h | 16 + ceph/src/mds/JournalPointer.cc | 112 + ceph/src/mds/JournalPointer.h | 86 + ceph/src/mds/LocalLock.h | 2 +- ceph/src/mds/Locker.cc | 465 +- ceph/src/mds/Locker.h | 58 +- ceph/src/mds/LogEvent.cc | 67 +- ceph/src/mds/LogEvent.h | 28 +- ceph/src/mds/LogSegment.h | 20 +- ceph/src/mds/MDBalancer.cc | 118 +- ceph/src/mds/MDBalancer.h | 23 +- ceph/src/mds/MDCache.cc | 2638 +- ceph/src/mds/MDCache.h | 369 +- ceph/src/mds/MDLog.cc | 898 +- ceph/src/mds/MDLog.h | 164 +- ceph/src/mds/MDS.cc | 1769 +- ceph/src/mds/MDS.h | 275 +- ceph/src/mds/MDSAuthCaps.cc | 216 + ceph/src/mds/MDSAuthCaps.h | 87 + ceph/src/mds/MDSContext.cc | 81 + ceph/src/mds/MDSContext.h | 165 + ceph/src/mds/MDSContinuation.h | 35 + ceph/src/mds/MDSMap.cc | 146 +- ceph/src/mds/MDSMap.h | 317 +- ceph/src/mds/MDSTable.cc | 58 +- ceph/src/mds/MDSTable.h | 21 +- ceph/src/mds/MDSTableClient.cc | 19 +- ceph/src/mds/MDSTableClient.h | 25 +- ceph/src/mds/MDSTableServer.cc | 45 +- ceph/src/mds/MDSTableServer.h | 28 +- ceph/src/mds/Makefile-client.am | 4 + ceph/src/mds/Makefile-server.am | 67 + ceph/src/mds/Makefile.am | 82 +- ceph/src/mds/Migrator.cc | 338 +- ceph/src/mds/Migrator.h | 52 +- ceph/src/mds/Mutation.cc | 100 +- ceph/src/mds/Mutation.h | 159 +- ceph/src/mds/RecoveryQueue.cc | 181 + ceph/src/mds/RecoveryQueue.h | 48 + ceph/src/mds/ScatterLock.h | 8 + ceph/src/mds/Server.cc | 1760 +- ceph/src/mds/Server.h | 50 +- ceph/src/mds/SessionMap.cc | 224 +- ceph/src/mds/SessionMap.h | 177 +- ceph/src/mds/SimpleLock.h | 46 +- ceph/src/mds/SnapClient.h | 8 +- ceph/src/mds/SnapRealm.cc | 43 +- ceph/src/mds/SnapRealm.h | 6 +- ceph/src/mds/SnapServer.cc | 48 +- ceph/src/mds/SnapServer.h | 2 +- ceph/src/mds/events/EExport.h | 2 + ceph/src/mds/events/EFragment.h | 2 + ceph/src/mds/events/EImportStart.h | 2 + ceph/src/mds/events/EMetaBlob.h | 151 +- .../{include/triple.h => mds/events/ENoOp.h} | 25 +- ceph/src/mds/events/EOpen.h | 2 + ceph/src/mds/events/ESession.h | 12 +- ceph/src/mds/events/ESlaveUpdate.h | 4 +- ceph/src/mds/events/ESubtreeMap.h | 5 +- ceph/src/mds/events/ETableServer.h | 6 +- ceph/src/mds/events/EUpdate.h | 3 + ceph/src/mds/flock.cc | 14 +- ceph/src/mds/inode_backtrace.cc | 48 + ceph/src/mds/inode_backtrace.h | 22 + ceph/src/mds/journal.cc | 603 +- ceph/src/mds/locks.c | 6 - ceph/src/mds/mds_table_types.h | 4 +- ceph/src/mds/mdstypes.cc | 141 +- ceph/src/mds/mdstypes.h | 241 +- ceph/src/mds/snap.h | 3 +- ceph/src/messages/MBackfillReserve.h | 6 +- ceph/src/messages/MClientCapRelease.h | 14 +- ceph/src/messages/MClientCaps.h | 34 +- ceph/src/messages/MClientQuota.h | 50 + ceph/src/messages/MClientReply.h | 9 +- ceph/src/messages/MClientRequest.h | 19 +- ceph/src/messages/MClientSession.h | 23 +- ceph/src/messages/MCommand.h | 2 +- ceph/src/messages/MDataPing.h | 93 + ceph/src/messages/MDirUpdate.h | 7 +- ceph/src/messages/MDiscover.h | 15 +- ceph/src/messages/MDiscoverReply.h | 34 +- ceph/src/messages/MExportDirDiscover.h | 6 +- ceph/src/messages/MExportDirNotify.h | 2 - ceph/src/messages/MExportDirNotifyAck.h | 2 - ceph/src/messages/MExportDirPrep.h | 6 +- ceph/src/messages/MForward.h | 14 +- ceph/src/messages/MGatherCaps.h | 32 + ceph/src/messages/MHeartbeat.h | 4 +- ceph/src/messages/MLogAck.h | 6 +- ceph/src/messages/MMDSBeacon.h | 135 +- ceph/src/messages/MMDSCacheRejoin.h | 4 - ceph/src/messages/MMDSFragmentNotify.h | 2 - ceph/src/messages/MMDSLoadTargets.h | 6 +- ceph/src/messages/MMDSOpenInoReply.h | 4 +- ceph/src/messages/MMDSSlaveRequest.h | 14 +- ceph/src/messages/MMonElection.h | 2 +- ceph/src/messages/MMonGetOSDMap.h | 87 + ceph/src/messages/MOSDBoot.h | 20 +- ceph/src/messages/MOSDECSubOpRead.h | 4 +- ceph/src/messages/MOSDMap.h | 7 +- ceph/src/messages/MOSDMarkMeDown.h | 27 +- ceph/src/messages/MOSDOp.h | 38 +- ceph/src/messages/MOSDOpReply.h | 17 +- ceph/src/messages/MOSDPGBackfill.h | 2 +- ceph/src/messages/MOSDPGCreate.h | 25 +- ceph/src/messages/MOSDPGLog.h | 4 +- ceph/src/messages/MOSDPGPull.h | 4 +- ceph/src/messages/MOSDPGPush.h | 4 +- ceph/src/messages/MOSDPGPushReply.h | 4 +- ceph/src/messages/MOSDPGQuery.h | 2 +- ceph/src/messages/MOSDPGRemove.h | 2 +- ceph/src/messages/MOSDPGScan.h | 4 +- ceph/src/messages/MOSDPGTemp.h | 2 +- ceph/src/messages/MOSDPGTrim.h | 2 +- ceph/src/messages/MOSDRepOp.h | 138 + ceph/src/messages/MOSDRepOpReply.h | 120 + ceph/src/messages/MOSDRepScrub.h | 31 +- ceph/src/messages/MOSDSubOp.h | 61 +- ceph/src/messages/MOSDSubOpReply.h | 6 +- ceph/src/messages/MPGStats.h | 2 +- ceph/src/messages/MPing.h | 2 - ceph/src/messages/MRecoveryReserve.h | 2 +- ceph/src/messages/MRoute.h | 6 +- ceph/src/messages/MWatchNotify.h | 46 +- ceph/src/messages/Makefile.am | 6 + ceph/src/mkcephfs.in | 564 - ceph/src/mon/AuthMonitor.cc | 30 +- ceph/src/mon/AuthMonitor.h | 20 +- ceph/src/mon/ConfigKeyService.cc | 19 +- ceph/src/mon/DataHealthService.cc | 6 +- ceph/src/mon/Elector.cc | 16 +- ceph/src/mon/LogMonitor.cc | 178 +- ceph/src/mon/LogMonitor.h | 108 +- ceph/src/mon/MDSMonitor.cc | 873 +- ceph/src/mon/MDSMonitor.h | 34 +- ceph/src/mon/Makefile.am | 5 + ceph/src/mon/MonCap.cc | 36 +- ceph/src/mon/MonCap.h | 8 +- ceph/src/mon/MonClient.cc | 60 +- ceph/src/mon/MonCommands.h | 126 +- ceph/src/mon/MonMap.cc | 2 +- ceph/src/mon/Monitor.cc | 1479 +- ceph/src/mon/Monitor.h | 251 +- ceph/src/mon/MonitorDBStore.h | 170 +- ceph/src/mon/MonitorStore.cc | 16 +- ceph/src/mon/MonmapMonitor.cc | 14 +- ceph/src/mon/MonmapMonitor.h | 4 +- ceph/src/mon/OSDMonitor.cc | 1641 +- ceph/src/mon/OSDMonitor.h | 43 +- ceph/src/mon/PGMap.cc | 449 +- ceph/src/mon/PGMap.h | 63 +- ceph/src/mon/PGMonitor.cc | 336 +- ceph/src/mon/PGMonitor.h | 4 +- ceph/src/mon/Paxos.cc | 390 +- ceph/src/mon/Paxos.h | 116 +- ceph/src/mon/PaxosService.cc | 66 +- ceph/src/mon/PaxosService.h | 34 +- ceph/src/mon/Session.h | 12 +- ceph/src/mon/mon_types.h | 23 +- ceph/src/mount/mount.ceph.c | 48 +- ceph/src/mount/mtab.c | 14 +- ceph/src/msg/Connection.h | 190 + ceph/src/msg/Dispatcher.h | 97 +- ceph/src/msg/Makefile.am | 82 +- ceph/src/msg/Message.cc | 66 +- ceph/src/msg/Message.h | 232 +- ceph/src/msg/Messenger.cc | 44 +- ceph/src/msg/Messenger.h | 232 +- ceph/src/msg/SimplePolicyMessenger.h | 114 + ceph/src/msg/async/AsyncConnection.cc | 2369 + ceph/src/msg/async/AsyncConnection.h | 304 + ceph/src/msg/async/AsyncMessenger.cc | 770 + ceph/src/msg/async/AsyncMessenger.h | 469 + ceph/src/msg/async/Event.cc | 388 + ceph/src/msg/async/Event.h | 156 + ceph/src/msg/async/EventEpoll.cc | 130 + ceph/src/msg/async/EventEpoll.h | 48 + ceph/src/msg/async/EventKqueue.cc | 122 + ceph/src/msg/async/EventKqueue.h | 48 + ceph/src/msg/async/EventSelect.cc | 92 + ceph/src/msg/async/EventSelect.h | 44 + ceph/src/msg/async/net_handler.cc | 145 + ceph/src/msg/async/net_handler.h | 37 + ceph/src/msg/msg_types.h | 7 - ceph/src/msg/{ => simple}/Accepter.cc | 100 +- ceph/src/msg/{ => simple}/Accepter.h | 0 ceph/src/msg/{ => simple}/DispatchQueue.cc | 122 +- ceph/src/msg/{ => simple}/DispatchQueue.h | 37 +- ceph/src/msg/{ => simple}/Pipe.cc | 334 +- ceph/src/msg/{ => simple}/Pipe.h | 74 +- ceph/src/msg/simple/PipeConnection.cc | 96 + ceph/src/msg/simple/PipeConnection.h | 55 + ceph/src/msg/{ => simple}/SimpleMessenger.cc | 187 +- ceph/src/msg/{ => simple}/SimpleMessenger.h | 112 +- ceph/src/msg/xio/DispatchStrategy.h | 37 + ceph/src/msg/xio/FastStrategy.h | 35 + ceph/src/msg/xio/QueueStrategy.cc | 113 + ceph/src/msg/xio/QueueStrategy.h | 61 + ceph/src/msg/xio/XioConnection.cc | 709 + ceph/src/msg/xio/XioConnection.h | 357 + ceph/src/msg/xio/XioInSeq.h | 84 + ceph/src/msg/xio/XioMessenger.cc | 1049 + ceph/src/msg/xio/XioMessenger.h | 142 + ceph/src/msg/xio/XioMsg.cc | 36 + ceph/src/msg/xio/XioMsg.h | 403 + ceph/src/msg/xio/XioPool.cc | 22 + ceph/src/msg/xio/XioPool.h | 221 + ceph/src/msg/xio/XioPortal.cc | 99 + ceph/src/msg/xio/XioPortal.h | 456 + ceph/src/msg/xio/XioSubmit.h | 55 + ceph/src/ocf/Makefile.in | 119 +- ceph/src/os/BtrfsFileStoreBackend.cc | 13 +- ceph/src/os/BtrfsFileStoreBackend.h | 5 +- ceph/src/os/CollectionIndex.h | 34 +- ceph/src/os/DBObjectMap.cc | 406 +- ceph/src/os/DBObjectMap.h | 113 +- ceph/src/os/FDCache.h | 31 +- ceph/src/os/FileJournal.cc | 213 +- ceph/src/os/FileJournal.h | 19 +- ceph/src/os/FileStore.cc | 1703 +- ceph/src/os/FileStore.h | 98 +- ceph/src/os/FlatIndex.cc | 6 +- ceph/src/os/FlatIndex.h | 10 +- ceph/src/os/GenericFileStoreBackend.cc | 16 +- ceph/src/os/GenericFileStoreBackend.h | 7 +- ceph/src/os/GenericObjectMap.cc | 43 +- ceph/src/os/GenericObjectMap.h | 6 +- ceph/src/os/HashIndex.cc | 151 +- ceph/src/os/HashIndex.h | 45 +- ceph/src/os/IndexManager.cc | 58 +- ceph/src/os/IndexManager.h | 51 +- ceph/src/os/JournalingObjectStore.cc | 9 +- ceph/src/os/JournalingObjectStore.h | 1 + ceph/src/os/KeyValueDB.cc | 48 + ceph/src/os/KeyValueDB.h | 20 +- ceph/src/os/KeyValueStore.cc | 721 +- ceph/src/os/KeyValueStore.h | 115 +- ceph/src/os/KineticStore.cc | 329 + ceph/src/os/KineticStore.h | 160 + ceph/src/os/LFNIndex.cc | 28 +- ceph/src/os/LFNIndex.h | 25 +- ceph/src/os/LevelDBStore.cc | 11 +- ceph/src/os/LevelDBStore.h | 19 +- ceph/src/os/Makefile.am | 30 + ceph/src/os/MemStore.cc | 443 +- ceph/src/os/MemStore.h | 52 +- ceph/src/os/ObjectStore.cc | 8 +- ceph/src/os/ObjectStore.h | 1372 +- ceph/src/os/RocksDBStore.cc | 512 + ceph/src/os/RocksDBStore.h | 333 + ceph/src/os/Transaction.cc | 736 +- ceph/src/os/WBThrottle.cc | 24 +- ceph/src/os/WBThrottle.h | 9 +- ceph/src/os/XfsFileStoreBackend.cc | 39 +- ceph/src/os/XfsFileStoreBackend.h | 5 +- ceph/src/os/chain_xattr.cc | 46 +- ceph/src/osd/Ager.cc | 1 - ceph/src/osd/ClassHandler.cc | 23 +- ceph/src/osd/ECBackend.cc | 114 +- ceph/src/osd/ECBackend.h | 30 +- ceph/src/osd/ECMsgTypes.cc | 79 +- ceph/src/osd/ECMsgTypes.h | 7 +- ceph/src/osd/ECTransaction.cc | 25 +- ceph/src/osd/ECTransaction.h | 12 +- ceph/src/osd/ECUtil.h | 8 +- ceph/src/osd/HitSet.h | 12 +- ceph/src/osd/Makefile.am | 12 + ceph/src/osd/OSD.cc | 4017 +- ceph/src/osd/OSD.h | 786 +- ceph/src/osd/OSDCap.cc | 8 +- ceph/src/osd/OSDMap.cc | 524 +- ceph/src/osd/OSDMap.h | 92 +- ceph/src/osd/OpRequest.cc | 79 +- ceph/src/osd/OpRequest.h | 53 +- ceph/src/osd/PG.cc | 1769 +- ceph/src/osd/PG.h | 237 +- ceph/src/osd/PGBackend.cc | 203 +- ceph/src/osd/PGBackend.h | 69 +- ceph/src/osd/PGLog.cc | 320 +- ceph/src/osd/PGLog.h | 180 +- ceph/src/osd/ReplicatedBackend.cc | 1734 +- ceph/src/osd/ReplicatedBackend.h | 37 +- ceph/src/osd/ReplicatedPG.cc | 3856 +- ceph/src/osd/ReplicatedPG.h | 300 +- ceph/src/osd/SnapMapper.cc | 16 +- ceph/src/osd/SnapMapper.h | 4 +- ceph/src/osd/Watch.cc | 144 +- ceph/src/osd/Watch.h | 45 +- ceph/src/osd/osd_types.cc | 871 +- ceph/src/osd/osd_types.h | 549 +- ceph/src/osdc/Blinker.h | 92 - ceph/src/osdc/Filer.cc | 117 +- ceph/src/osdc/Filer.h | 10 +- ceph/src/osdc/Journaler.cc | 516 +- ceph/src/osdc/Journaler.h | 279 +- ceph/src/osdc/Makefile.am | 1 - ceph/src/osdc/ObjectCacher.cc | 348 +- ceph/src/osdc/ObjectCacher.h | 71 +- ceph/src/osdc/Objecter.cc | 2842 +- ceph/src/osdc/Objecter.h | 816 +- ceph/src/osdc/Striper.cc | 21 +- ceph/src/osdc/Striper.h | 11 +- ceph/src/osdc/WritebackHandler.h | 11 +- ceph/src/perfglue/Makefile.am | 12 + ceph/src/perfglue/cpu_profiler.cc | 13 +- ceph/src/perfglue/heap_profiler.cc | 48 +- ceph/src/pybind/ceph_argparse.py | 63 +- ceph/src/pybind/ceph_rest_api.py | 2 +- ceph/src/pybind/cephfs.py | 60 +- ceph/src/pybind/rados.py | 470 +- ceph/src/pybind/rbd.py | 85 +- ceph/src/rbd-replay-many | 88 + ceph/src/rbd.cc | 1496 +- ceph/src/rbd_fuse/{rbd-fuse.c => rbd-fuse.cc} | 164 +- ceph/src/rbd_replay/BoundedBuffer.hpp | 71 + ceph/src/rbd_replay/Deser.cc | 67 + ceph/src/rbd_replay/Deser.hpp | 52 + ceph/src/rbd_replay/ImageNameMap.cc | 69 + ceph/src/rbd_replay/ImageNameMap.hpp | 54 + ceph/src/rbd_replay/Makefile.am | 61 + ceph/src/rbd_replay/PendingIO.cc | 44 + ceph/src/rbd_replay/PendingIO.hpp | 64 + ceph/src/rbd_replay/Replayer.cc | 331 + ceph/src/rbd_replay/Replayer.hpp | 164 + ceph/src/rbd_replay/Ser.cc | 53 + ceph/src/rbd_replay/Ser.hpp | 50 + ceph/src/rbd_replay/actions.cc | 380 + ceph/src/rbd_replay/actions.hpp | 358 + ceph/src/rbd_replay/ios.cc | 273 + ceph/src/rbd_replay/ios.hpp | 371 + ceph/src/rbd_replay/rbd-replay-prep.cc | 538 + ceph/src/rbd_replay/rbd-replay.cc | 127 + ceph/src/rbd_replay/rbd_loc.cc | 130 + ceph/src/rbd_replay/rbd_loc.hpp | 90 + ceph/src/rbd_replay/rbd_replay_debug.hpp | 34 + ceph/src/rgw/Makefile.am | 29 +- ceph/src/rgw/logrotate.conf | 2 +- ceph/src/rgw/rgw_acl.cc | 3 + ceph/src/rgw/rgw_acl.h | 3 + ceph/src/rgw/rgw_acl_s3.cc | 3 + ceph/src/rgw/rgw_acl_s3.h | 3 + ceph/src/rgw/rgw_acl_swift.cc | 2 + ceph/src/rgw/rgw_acl_swift.h | 5 +- ceph/src/rgw/rgw_admin.cc | 919 +- ceph/src/rgw/rgw_auth_s3.cc | 2 + ceph/src/rgw/rgw_auth_s3.h | 3 + ceph/src/rgw/rgw_bucket.cc | 287 +- ceph/src/rgw/rgw_bucket.h | 56 +- ceph/src/rgw/rgw_cache.cc | 146 +- ceph/src/rgw/rgw_cache.h | 157 +- ceph/src/rgw/rgw_civetweb.cc | 39 +- ceph/src/rgw/rgw_civetweb.h | 5 + ceph/src/rgw/rgw_civetweb_log.cc | 7 +- ceph/src/rgw/rgw_civetweb_log.h | 1 + ceph/src/rgw/rgw_client_io.cc | 9 +- ceph/src/rgw/rgw_client_io.h | 3 + ceph/src/rgw/rgw_common.cc | 142 +- ceph/src/rgw/rgw_common.h | 425 +- ceph/src/rgw/rgw_cors_s3.cc | 2 +- ceph/src/rgw/rgw_dencoder.cc | 14 +- ceph/src/rgw/rgw_env.cc | 3 + ceph/src/rgw/rgw_fcgi.cc | 5 +- ceph/src/rgw/rgw_fcgi.h | 3 + ceph/src/rgw/rgw_formats.cc | 28 +- ceph/src/rgw/rgw_formats.h | 10 +- ceph/src/rgw/rgw_gc.cc | 29 +- ceph/src/rgw/rgw_gc.h | 3 + ceph/src/rgw/rgw_http_client.cc | 3 + ceph/src/rgw/rgw_http_client.h | 3 + ceph/src/rgw/rgw_http_errors.h | 5 + ceph/src/rgw/rgw_json_enc.cc | 50 +- ceph/src/rgw/rgw_jsonparser.cc | 3 + ceph/src/rgw/rgw_keystone.cc | 3 + ceph/src/rgw/rgw_keystone.h | 9 +- ceph/src/rgw/rgw_loadgen.cc | 2 + ceph/src/rgw/rgw_loadgen.h | 3 + ceph/src/rgw/rgw_log.cc | 53 +- ceph/src/rgw/rgw_log.h | 46 +- ceph/src/rgw/rgw_main.cc | 139 +- ceph/src/rgw/rgw_metadata.cc | 9 +- ceph/src/rgw/rgw_metadata.h | 3 + ceph/src/rgw/rgw_multi.cc | 3 + ceph/src/rgw/rgw_multi.h | 3 + ceph/src/rgw/rgw_multi_del.cc | 18 +- ceph/src/rgw/rgw_multi_del.h | 20 +- ceph/src/rgw/rgw_multiparser.cc | 3 + ceph/src/rgw/rgw_op.cc | 816 +- ceph/src/rgw/rgw_op.h | 162 +- ceph/src/rgw/rgw_orphan.cc | 810 + ceph/src/rgw/rgw_orphan.h | 209 + ceph/src/rgw/rgw_policy_s3.cc | 2 + ceph/src/rgw/rgw_policy_s3.h | 3 + ceph/src/rgw/rgw_quota.cc | 11 +- ceph/src/rgw/rgw_quota.h | 2 +- ceph/src/rgw/rgw_rados.cc | 5018 ++- ceph/src/rgw/rgw_rados.h | 1457 +- ceph/src/rgw/rgw_replica_log.cc | 170 +- ceph/src/rgw/rgw_replica_log.h | 37 +- ceph/src/rgw/rgw_resolve.cc | 5 +- ceph/src/rgw/rgw_resolve.h | 3 + ceph/src/rgw/rgw_rest.cc | 328 +- ceph/src/rgw/rgw_rest.h | 17 +- ceph/src/rgw/rgw_rest_admin.h | 3 + ceph/src/rgw/rgw_rest_bucket.cc | 14 +- ceph/src/rgw/rgw_rest_bucket.h | 3 + ceph/src/rgw/rgw_rest_client.cc | 21 +- ceph/src/rgw/rgw_rest_client.h | 3 + ceph/src/rgw/rgw_rest_conn.cc | 21 +- ceph/src/rgw/rgw_rest_conn.h | 3 + ceph/src/rgw/rgw_rest_log.cc | 35 +- ceph/src/rgw/rgw_rest_log.h | 6 +- ceph/src/rgw/rgw_rest_metadata.cc | 2 +- ceph/src/rgw/rgw_rest_replica_log.cc | 71 +- ceph/src/rgw/rgw_rest_s3.cc | 396 +- ceph/src/rgw/rgw_rest_s3.h | 32 +- ceph/src/rgw/rgw_rest_swift.cc | 265 +- ceph/src/rgw/rgw_rest_swift.h | 6 + ceph/src/rgw/rgw_rest_usage.cc | 7 +- ceph/src/rgw/rgw_rest_usage.h | 3 + ceph/src/rgw/rgw_rest_user.cc | 34 +- ceph/src/rgw/rgw_rest_user.h | 3 + ceph/src/rgw/rgw_string.h | 3 + ceph/src/rgw/rgw_swift.cc | 16 +- ceph/src/rgw/rgw_swift.h | 3 + ceph/src/rgw/rgw_swift_auth.cc | 3 + ceph/src/rgw/rgw_swift_auth.h | 3 + ceph/src/rgw/rgw_tools.cc | 29 +- ceph/src/rgw/rgw_tools.h | 9 +- ceph/src/rgw/rgw_usage.cc | 2 + ceph/src/rgw/rgw_usage.h | 3 + ceph/src/rgw/rgw_user.cc | 120 +- ceph/src/rgw/rgw_user.h | 116 +- ceph/src/rgw/rgw_xml.cc | 5 +- ceph/src/rgw/rgw_xml.h | 3 + ceph/src/rocksdb/.arcconfig | 10 + ceph/src/rocksdb/.clang-format | 5 + ceph/src/rocksdb/.gitignore | 60 + ceph/src/rocksdb/CONTRIBUTING.md | 20 + ceph/src/rocksdb/HISTORY.md | 79 + ceph/src/rocksdb/INSTALL.md | 80 + ceph/src/rocksdb/LICENSE | 35 + ceph/src/rocksdb/Makefile.am | 273 + ceph/src/rocksdb/PATENTS | 23 + ceph/src/rocksdb/README | 82 + ceph/src/rocksdb/ROCKSDB_LITE.md | 20 + .../rocksdb/build_tools/build_detect_platform | 313 + .../rocksdb/build_tools/build_detect_version | 22 + .../src/rocksdb/build_tools/fbcode.clang31.sh | 74 + ceph/src/rocksdb/build_tools/fbcode.gcc471.sh | 70 + ceph/src/rocksdb/build_tools/fbcode.gcc481.sh | 81 + ceph/src/rocksdb/build_tools/format-diff.sh | 107 + .../rocksdb/build_tools/mac-install-gflags.sh | 25 + .../rocksdb/build_tools/make_new_version.sh | 46 + .../build_tools/regression_build_test.sh | 330 + ceph/src/rocksdb/build_tools/valgrind_test.sh | 15 + ceph/src/rocksdb/configure.ac | 80 + ceph/src/rocksdb/coverage/coverage_test.sh | 78 + .../src/rocksdb/coverage/parse_gcov_output.py | 118 + ceph/src/rocksdb/db/builder.cc | 224 + ceph/src/rocksdb/db/builder.h | 45 + ceph/src/rocksdb/db/c.cc | 1476 + ceph/src/rocksdb/db/c_test.c | 494 + ceph/src/rocksdb/db/column_family.cc | 583 + ceph/src/rocksdb/db/column_family.h | 418 + ceph/src/rocksdb/db/column_family_test.cc | 977 + ceph/src/rocksdb/db/compaction.cc | 261 + ceph/src/rocksdb/db/compaction.h | 151 + ceph/src/rocksdb/db/compaction_picker.cc | 889 + ceph/src/rocksdb/db/compaction_picker.h | 165 + ceph/src/rocksdb/db/corruption_test.cc | 440 + ceph/src/rocksdb/db/db_bench.cc | 2616 ++ ceph/src/rocksdb/db/db_filesnapshot.cc | 172 + ceph/src/rocksdb/db/db_impl.cc | 4587 ++ ceph/src/rocksdb/db/db_impl.h | 623 + ceph/src/rocksdb/db/db_impl_debug.cc | 132 + ceph/src/rocksdb/db/db_impl_readonly.cc | 154 + ceph/src/rocksdb/db/db_impl_readonly.h | 103 + ceph/src/rocksdb/db/db_iter.cc | 477 + ceph/src/rocksdb/db/db_iter.h | 27 + ceph/src/rocksdb/db/db_stats_logger.cc | 95 + ceph/src/rocksdb/db/db_test.cc | 6764 +++ ceph/src/rocksdb/db/dbformat.cc | 169 + ceph/src/rocksdb/db/dbformat.h | 340 + ceph/src/rocksdb/db/dbformat_test.cc | 117 + ceph/src/rocksdb/db/deletefile_test.cc | 295 + ceph/src/rocksdb/db/file_indexer.cc | 202 + ceph/src/rocksdb/db/file_indexer.h | 129 + ceph/src/rocksdb/db/file_indexer_test.cc | 330 + ceph/src/rocksdb/db/filename.cc | 261 + ceph/src/rocksdb/db/filename.h | 108 + ceph/src/rocksdb/db/filename_test.cc | 140 + ceph/src/rocksdb/db/internal_stats.cc | 369 + ceph/src/rocksdb/db/internal_stats.h | 187 + ceph/src/rocksdb/db/log_and_apply_bench.cc | 79 + ceph/src/rocksdb/db/log_format.h | 35 + ceph/src/rocksdb/db/log_reader.cc | 339 + ceph/src/rocksdb/db/log_reader.h | 130 + ceph/src/rocksdb/db/log_test.cc | 689 + ceph/src/rocksdb/db/log_writer.cc | 108 + ceph/src/rocksdb/db/log_writer.h | 55 + ceph/src/rocksdb/db/memtable.cc | 601 + ceph/src/rocksdb/db/memtable.h | 217 + ceph/src/rocksdb/db/memtable_list.cc | 277 + ceph/src/rocksdb/db/memtable_list.h | 152 + ceph/src/rocksdb/db/merge_context.h | 69 + ceph/src/rocksdb/db/merge_helper.cc | 209 + ceph/src/rocksdb/db/merge_helper.h | 105 + ceph/src/rocksdb/db/merge_operator.cc | 77 + ceph/src/rocksdb/db/merge_test.cc | 472 + ceph/src/rocksdb/db/perf_context_test.cc | 358 + ceph/src/rocksdb/db/plain_table_db_test.cc | 853 + ceph/src/rocksdb/db/prefix_test.cc | 487 + ceph/src/rocksdb/db/repair.cc | 403 + ceph/src/rocksdb/db/simple_table_db_test.cc | 794 + ceph/src/rocksdb/db/skiplist.h | 429 + ceph/src/rocksdb/db/skiplist_test.cc | 383 + ceph/src/rocksdb/db/snapshot.h | 86 + ceph/src/rocksdb/db/table_cache.cc | 197 + ceph/src/rocksdb/db/table_cache.h | 94 + .../rocksdb/db/table_properties_collector.cc | 83 + .../rocksdb/db/table_properties_collector.h | 72 + .../db/table_properties_collector_test.cc | 312 + ceph/src/rocksdb/db/tailing_iter.cc | 221 + ceph/src/rocksdb/db/tailing_iter.h | 97 + ceph/src/rocksdb/db/transaction_log_impl.cc | 261 + ceph/src/rocksdb/db/transaction_log_impl.h | 120 + ceph/src/rocksdb/db/version_edit.cc | 364 + ceph/src/rocksdb/db/version_edit.h | 176 + ceph/src/rocksdb/db/version_edit_test.cc | 65 + ceph/src/rocksdb/db/version_set.cc | 2780 ++ ceph/src/rocksdb/db/version_set.h | 493 + ceph/src/rocksdb/db/version_set_test.cc | 184 + ceph/src/rocksdb/db/write_batch.cc | 489 + ceph/src/rocksdb/db/write_batch_internal.h | 123 + ceph/src/rocksdb/db/write_batch_test.cc | 323 + ceph/src/rocksdb/doc/doc.css | 89 + ceph/src/rocksdb/doc/index.html | 831 + ceph/src/rocksdb/doc/log_format.txt | 75 + ceph/src/rocksdb/doc/rockslogo.jpg | Bin 0 -> 137232 bytes ceph/src/rocksdb/doc/rockslogo.png | Bin 0 -> 61703 bytes ceph/src/rocksdb/hdfs/README | 26 + ceph/src/rocksdb/hdfs/env_hdfs.h | 323 + ceph/src/rocksdb/hdfs/hdfs.h | 477 + ceph/src/rocksdb/helpers/memenv/memenv.cc | 395 + .../src/rocksdb/helpers/memenv/memenv_test.cc | 231 + ceph/src/rocksdb/include/rocksdb/c.h | 575 + ceph/src/rocksdb/include/rocksdb/cache.h | 140 + .../include/rocksdb/compaction_filter.h | 198 + ceph/src/rocksdb/include/rocksdb/comparator.h | 67 + ceph/src/rocksdb/include/rocksdb/db.h | 495 + ceph/src/rocksdb/include/rocksdb/env.h | 772 + .../rocksdb/include/rocksdb/filter_policy.h | 74 + .../include/rocksdb/flush_block_policy.h | 58 + ceph/src/rocksdb/include/rocksdb/iterator.h | 106 + ceph/src/rocksdb/include/rocksdb/ldb_tool.h | 18 + .../src/rocksdb/include/rocksdb/memtablerep.h | 270 + .../rocksdb/include/rocksdb/merge_operator.h | 182 + ceph/src/rocksdb/include/rocksdb/options.h | 930 + .../rocksdb/include/rocksdb/perf_context.h | 75 + ceph/src/rocksdb/include/rocksdb/slice.h | 136 + .../rocksdb/include/rocksdb/slice_transform.h | 47 + ceph/src/rocksdb/include/rocksdb/statistics.h | 268 + ceph/src/rocksdb/include/rocksdb/status.h | 145 + ceph/src/rocksdb/include/rocksdb/table.h | 206 + .../include/rocksdb/table_properties.h | 112 + .../rocksdb/include/rocksdb/transaction_log.h | 104 + ceph/src/rocksdb/include/rocksdb/types.h | 20 + .../include/rocksdb/universal_compaction.h | 83 + ceph/src/rocksdb/include/rocksdb/version.h | 6 + .../src/rocksdb/include/rocksdb/write_batch.h | 158 + .../rocksdb/include/utilities/backupable_db.h | 251 + ceph/src/rocksdb/include/utilities/db_ttl.h | 68 + ceph/src/rocksdb/include/utilities/geo_db.h | 105 + .../rocksdb/include/utilities/stackable_db.h | 215 + .../rocksdb/include/utilities/utility_db.h | 30 + ceph/src/rocksdb/java/RocksDBSample.java | 253 + ceph/src/rocksdb/java/jdb_bench.sh | 1 + .../java/org/rocksdb/BackupableDB.java | 80 + .../java/org/rocksdb/BackupableDBOptions.java | 44 + .../rocksdb/java/org/rocksdb/BloomFilter.java | 37 + ceph/src/rocksdb/java/org/rocksdb/Filter.java | 32 + .../rocksdb/HashLinkedListMemTableConfig.java | 52 + .../rocksdb/HashSkipListMemTableConfig.java | 97 + .../java/org/rocksdb/HistogramData.java | 43 + .../java/org/rocksdb/HistogramType.java | 39 + .../rocksdb/java/org/rocksdb/Iterator.java | 138 + .../java/org/rocksdb/MemTableConfig.java | 27 + .../src/rocksdb/java/org/rocksdb/Options.java | 2355 + .../java/org/rocksdb/PlainTableConfig.java | 123 + .../rocksdb/java/org/rocksdb/ReadOptions.java | 130 + .../src/rocksdb/java/org/rocksdb/RocksDB.java | 376 + .../java/org/rocksdb/RocksDBException.java | 23 + .../rocksdb/java/org/rocksdb/RocksObject.java | 35 + .../org/rocksdb/SkipListMemTableConfig.java | 15 + .../rocksdb/java/org/rocksdb/Statistics.java | 38 + .../java/org/rocksdb/TableFormatConfig.java | 20 + .../rocksdb/java/org/rocksdb/TickerType.java | 123 + .../org/rocksdb/VectorMemTableConfig.java | 40 + .../rocksdb/java/org/rocksdb/WriteBatch.java | 113 + .../java/org/rocksdb/WriteBatchTest.java | 124 + .../java/org/rocksdb/WriteOptions.java | 100 + .../org/rocksdb/benchmark/DbBenchmark.java | 1577 + .../org/rocksdb/test/BackupableDBTest.java | 41 + .../java/org/rocksdb/test/OptionsTest.java | 424 + .../org/rocksdb/test/ReadOptionsTest.java | 40 + .../java/org/rocksdb/util/Environment.java | 37 + .../java/org/rocksdb/util/SizeUnit.java | 16 + .../rocksdb/java/rocksjni/backupablejni.cc | 85 + ceph/src/rocksdb/java/rocksjni/filter.cc | 41 + ceph/src/rocksdb/java/rocksjni/iterator.cc | 145 + ceph/src/rocksdb/java/rocksjni/memtablejni.cc | 58 + ceph/src/rocksdb/java/rocksjni/options.cc | 1807 + ceph/src/rocksdb/java/rocksjni/portal.h | 383 + ceph/src/rocksdb/java/rocksjni/rocksjni.cc | 438 + ceph/src/rocksdb/java/rocksjni/statistics.cc | 50 + ceph/src/rocksdb/java/rocksjni/table.cc | 25 + ceph/src/rocksdb/java/rocksjni/write_batch.cc | 264 + .../linters/__phutil_library_init__.php | 3 + .../linters/__phutil_library_map__.php | 27 + .../cpp_linter/ArcanistCpplintLinter.php | 88 + .../linters/cpp_linter/FbcodeCppLinter.php | 99 + .../linters/cpp_linter/PfffCppLinter.php | 68 + .../src/rocksdb/linters/cpp_linter/cpplint.py | 4767 ++ .../lint_engine/FacebookFbcodeLintEngine.php | 147 + ceph/src/rocksdb/m4/libtool.m4 | 7997 ++++ ceph/src/rocksdb/m4/ltoptions.m4 | 384 + ceph/src/rocksdb/m4/ltsugar.m4 | 123 + ceph/src/rocksdb/m4/ltversion.m4 | 23 + ceph/src/rocksdb/m4/lt~obsolete.m4 | 98 + ceph/src/rocksdb/port/README | 10 + ceph/src/rocksdb/port/atomic_pointer.h | 157 + ceph/src/rocksdb/port/likely.h | 21 + ceph/src/rocksdb/port/port.h | 22 + ceph/src/rocksdb/port/port_example.h | 133 + ceph/src/rocksdb/port/port_posix.cc | 109 + ceph/src/rocksdb/port/port_posix.h | 488 + ceph/src/rocksdb/port/stack_trace.cc | 132 + ceph/src/rocksdb/port/stack_trace.h | 19 + ceph/src/rocksdb/port/win/stdint.h | 24 + ceph/src/rocksdb/table/block.cc | 307 + ceph/src/rocksdb/table/block.h | 61 + .../table/block_based_table_builder.cc | 689 + .../rocksdb/table/block_based_table_builder.h | 91 + .../table/block_based_table_factory.cc | 60 + .../rocksdb/table/block_based_table_factory.h | 48 + .../rocksdb/table/block_based_table_reader.cc | 1129 + .../rocksdb/table/block_based_table_reader.h | 198 + ceph/src/rocksdb/table/block_builder.cc | 134 + ceph/src/rocksdb/table/block_builder.h | 65 + ceph/src/rocksdb/table/block_hash_index.cc | 112 + ceph/src/rocksdb/table/block_hash_index.h | 72 + .../rocksdb/table/block_hash_index_test.cc | 117 + ceph/src/rocksdb/table/block_test.cc | 242 + ceph/src/rocksdb/table/filter_block.cc | 187 + ceph/src/rocksdb/table/filter_block.h | 92 + ceph/src/rocksdb/table/filter_block_test.cc | 139 + ceph/src/rocksdb/table/flush_block_policy.cc | 70 + ceph/src/rocksdb/table/format.cc | 371 + ceph/src/rocksdb/table/format.h | 198 + ceph/src/rocksdb/table/iter_heap.h | 44 + ceph/src/rocksdb/table/iterator.cc | 72 + ceph/src/rocksdb/table/iterator_wrapper.h | 64 + ceph/src/rocksdb/table/merger.cc | 301 + ceph/src/rocksdb/table/merger.h | 29 + ceph/src/rocksdb/table/meta_blocks.cc | 266 + ceph/src/rocksdb/table/meta_blocks.h | 127 + ceph/src/rocksdb/table/plain_table_builder.cc | 211 + ceph/src/rocksdb/table/plain_table_builder.h | 84 + ceph/src/rocksdb/table/plain_table_factory.cc | 54 + ceph/src/rocksdb/table/plain_table_factory.h | 94 + ceph/src/rocksdb/table/plain_table_reader.cc | 767 + ceph/src/rocksdb/table/plain_table_reader.h | 265 + ceph/src/rocksdb/table/table_builder.h | 55 + ceph/src/rocksdb/table/table_properties.cc | 115 + ceph/src/rocksdb/table/table_reader.h | 66 + ceph/src/rocksdb/table/table_reader_bench.cc | 271 + ceph/src/rocksdb/table/table_test.cc | 1805 + ceph/src/rocksdb/table/two_level_iterator.cc | 190 + ceph/src/rocksdb/table/two_level_iterator.h | 45 + ceph/src/rocksdb/tools/auto_sanity_test.sh | 71 + ceph/src/rocksdb/tools/blob_store_bench.cc | 280 + ceph/src/rocksdb/tools/db_crashtest.py | 150 + ceph/src/rocksdb/tools/db_crashtest2.py | 168 + ceph/src/rocksdb/tools/db_repl_stress.cc | 134 + ceph/src/rocksdb/tools/db_sanity_test.cc | 203 + ceph/src/rocksdb/tools/db_stress.cc | 1732 + ceph/src/rocksdb/tools/ldb.cc | 13 + ceph/src/rocksdb/tools/ldb_test.py | 383 + ceph/src/rocksdb/tools/reduce_levels_test.cc | 197 + ceph/src/rocksdb/tools/sst_dump.cc | 367 + ceph/src/rocksdb/util/arena.cc | 120 + ceph/src/rocksdb/util/arena.h | 115 + ceph/src/rocksdb/util/arena_test.cc | 133 + ceph/src/rocksdb/util/auto_roll_logger.cc | 116 + ceph/src/rocksdb/util/auto_roll_logger.h | 91 + .../src/rocksdb/util/auto_roll_logger_test.cc | 292 + ceph/src/rocksdb/util/autovector.h | 307 + ceph/src/rocksdb/util/autovector_test.cc | 294 + ceph/src/rocksdb/util/benchharness.cc | 398 + ceph/src/rocksdb/util/benchharness.h | 357 + ceph/src/rocksdb/util/benchharness_test.cc | 67 + ceph/src/rocksdb/util/blob_store.cc | 270 + ceph/src/rocksdb/util/blob_store.h | 163 + ceph/src/rocksdb/util/blob_store_test.cc | 200 + ceph/src/rocksdb/util/bloom.cc | 111 + ceph/src/rocksdb/util/bloom_test.cc | 170 + ceph/src/rocksdb/util/build_version.h | 16 + ceph/src/rocksdb/util/cache.cc | 481 + ceph/src/rocksdb/util/cache_test.cc | 449 + ceph/src/rocksdb/util/coding.cc | 169 + ceph/src/rocksdb/util/coding.h | 294 + ceph/src/rocksdb/util/coding_test.cc | 296 + ceph/src/rocksdb/util/comparator.cc | 86 + ceph/src/rocksdb/util/crc32c.cc | 393 + ceph/src/rocksdb/util/crc32c.h | 46 + ceph/src/rocksdb/util/crc32c_test.cc | 77 + ceph/src/rocksdb/util/dynamic_bloom.cc | 53 + ceph/src/rocksdb/util/dynamic_bloom.h | 109 + ceph/src/rocksdb/util/dynamic_bloom_test.cc | 202 + ceph/src/rocksdb/util/env.cc | 251 + ceph/src/rocksdb/util/env_hdfs.cc | 523 + ceph/src/rocksdb/util/env_posix.cc | 1654 + ceph/src/rocksdb/util/env_test.cc | 550 + ceph/src/rocksdb/util/filelock_test.cc | 58 + ceph/src/rocksdb/util/filter_policy.cc | 16 + ceph/src/rocksdb/util/hash.cc | 49 + ceph/src/rocksdb/util/hash.h | 20 + ceph/src/rocksdb/util/hash_cuckoo_rep.cc | 627 + ceph/src/rocksdb/util/hash_cuckoo_rep.h | 42 + ceph/src/rocksdb/util/hash_linklist_rep.cc | 483 + ceph/src/rocksdb/util/hash_linklist_rep.h | 38 + ceph/src/rocksdb/util/hash_skiplist_rep.cc | 336 + ceph/src/rocksdb/util/hash_skiplist_rep.h | 43 + ceph/src/rocksdb/util/histogram.cc | 198 + ceph/src/rocksdb/util/histogram.h | 79 + ceph/src/rocksdb/util/histogram_test.cc | 62 + ceph/src/rocksdb/util/ldb_cmd.cc | 1839 + ceph/src/rocksdb/util/ldb_cmd.h | 722 + .../src/rocksdb/util/ldb_cmd_execute_result.h | 76 + ceph/src/rocksdb/util/ldb_tool.cc | 107 + ceph/src/rocksdb/util/log_buffer.cc | 73 + ceph/src/rocksdb/util/log_buffer.h | 48 + ceph/src/rocksdb/util/log_write_bench.cc | 69 + ceph/src/rocksdb/util/logging.cc | 77 + ceph/src/rocksdb/util/logging.h | 44 + .../rocksdb/util/manual_compaction_test.cc | 156 + ceph/src/rocksdb/util/murmurhash.cc | 183 + ceph/src/rocksdb/util/murmurhash.h | 42 + ceph/src/rocksdb/util/mutexlock.h | 78 + ceph/src/rocksdb/util/options.cc | 483 + ceph/src/rocksdb/util/perf_context.cc | 86 + ceph/src/rocksdb/util/perf_context_imp.h | 88 + ceph/src/rocksdb/util/posix_logger.h | 161 + ceph/src/rocksdb/util/random.h | 90 + ceph/src/rocksdb/util/signal_test.cc | 34 + ceph/src/rocksdb/util/skiplistrep.cc | 123 + ceph/src/rocksdb/util/slice.cc | 73 + ceph/src/rocksdb/util/statistics.cc | 94 + ceph/src/rocksdb/util/statistics.h | 66 + ceph/src/rocksdb/util/stats_logger.h | 26 + ceph/src/rocksdb/util/status.cc | 86 + ceph/src/rocksdb/util/stl_wrappers.h | 32 + ceph/src/rocksdb/util/stop_watch.h | 67 + ceph/src/rocksdb/util/string_util.cc | 23 + ceph/src/rocksdb/util/string_util.h | 15 + ceph/src/rocksdb/util/sync_point.cc | 64 + ceph/src/rocksdb/util/sync_point.h | 80 + ceph/src/rocksdb/util/testharness.cc | 84 + ceph/src/rocksdb/util/testharness.h | 142 + ceph/src/rocksdb/util/testutil.cc | 56 + ceph/src/rocksdb/util/testutil.h | 80 + ceph/src/rocksdb/util/thread_local.cc | 243 + ceph/src/rocksdb/util/thread_local.h | 166 + ceph/src/rocksdb/util/thread_local_test.cc | 472 + ceph/src/rocksdb/util/vectorrep.cc | 282 + ceph/src/rocksdb/util/xxhash.cc | 475 + ceph/src/rocksdb/util/xxhash.h | 164 + .../utilities/backupable/backupable_db.cc | 1306 + .../backupable/backupable_db_test.cc | 976 + .../src/rocksdb/utilities/geodb/geodb_impl.cc | 431 + ceph/src/rocksdb/utilities/geodb/geodb_impl.h | 191 + .../src/rocksdb/utilities/geodb/geodb_test.cc | 123 + ceph/src/rocksdb/utilities/merge_operators.h | 45 + .../rocksdb/utilities/merge_operators/put.cc | 68 + .../string_append/stringappend.cc | 60 + .../string_append/stringappend.h | 31 + .../string_append/stringappend2.cc | 113 + .../string_append/stringappend2.h | 51 + .../string_append/stringappend_test.cc | 595 + .../utilities/merge_operators/uint64add.cc | 65 + ceph/src/rocksdb/utilities/redis/README | 14 + .../utilities/redis/redis_list_exception.h | 22 + .../utilities/redis/redis_list_iterator.h | 310 + .../rocksdb/utilities/redis/redis_lists.cc | 552 + .../src/rocksdb/utilities/redis/redis_lists.h | 108 + .../utilities/redis/redis_lists_test.cc | 884 + ceph/src/rocksdb/utilities/ttl/db_ttl_impl.cc | 284 + ceph/src/rocksdb/utilities/ttl/db_ttl_impl.h | 314 + ceph/src/rocksdb/utilities/ttl/ttl_test.cc | 595 + ceph/src/sample.ceph.conf | 276 +- ceph/src/stop.sh | 15 +- ceph/src/test/Makefile-client.am | 550 + ceph/src/test/Makefile-server.am | 210 + ceph/src/test/Makefile.am | 683 +- ceph/src/test/ObjectMap/KeyValueDBMemory.cc | 4 +- ceph/src/test/ObjectMap/test_object_map.cc | 8 +- ceph/src/test/TestSignalHandlers.cc | 1 + ceph/src/test/TestTimers.cc | 38 +- ceph/src/test/bench/dumb_backend.h | 4 +- ceph/src/test/bench/small_io_bench_dumb.cc | 24 +- ceph/src/test/bench/small_io_bench_fs.cc | 26 +- ceph/src/test/bench/tp_bench.cc | 26 +- ceph/src/test/bench_log.cc | 9 +- ceph/src/test/bufferlist.cc | 254 +- ceph/src/test/centos-6/Dockerfile.in | 30 + ceph/src/test/centos-6/ceph.spec.in | 928 + ceph/src/test/centos-6/install-deps.sh | 67 + ceph/src/test/centos-7/Dockerfile.in | 33 + ceph/src/test/centos-7/ceph.spec.in | 928 + ceph/src/test/centos-7/install-deps.sh | 67 + ceph/src/test/ceph-disk.sh | 495 + ceph/src/test/ceph_objectstore_tool.py | 924 + ceph/src/test/cephtool-test-mds.sh | 20 + ceph/src/test/cephtool-test-mon.sh | 20 + ceph/src/test/cephtool-test-osd.sh | 20 + ceph/src/test/cli/crushtool/add-item.t | 3 + ceph/src/test/cli/crushtool/build.t | 50 +- .../crushtool/check-names.empty.crushmap.txt | 11 + .../test/cli/crushtool/check-names.empty.t | 5 + .../test/cli/crushtool/check-names.max-id.t | 7 + ceph/src/test/cli/crushtool/help.t | 7 + ceph/src/test/cli/crushtool/location.t | 16 + .../test/cli/crushtool/show-choose-tries.t | 109 + .../test/cli/crushtool/show-choose-tries.txt | 47 + ceph/src/test/cli/crushtool/straw2.t | 4 + ceph/src/test/cli/crushtool/straw2.txt | 43 + .../cli/crushtool/test-map-big-1.crushmap | Bin 0 -> 8936 bytes ceph/src/test/cli/osdmaptool/clobber.t | 8 +- ceph/src/test/cli/osdmaptool/create-print.t | 10 +- ceph/src/test/cli/osdmaptool/create-racks.t | 10 +- ceph/src/test/cli/osdmaptool/crush.t | 2 +- ceph/src/test/cli/osdmaptool/pool.t | 10 +- ceph/src/test/cli/osdmaptool/test-map-pgs.t | 16 +- ceph/src/test/cli/radosgw-admin/help.t | 4 +- ceph/src/test/cli/rbd/help.t | 28 +- ceph/src/test/cls_lock/test_cls_lock.cc | 40 + ceph/src/test/cls_rbd/test_cls_rbd.cc | 651 +- .../test/cls_refcount/test_cls_refcount.cc | 50 +- ceph/src/test/cls_rgw/test_cls_rgw.cc | 51 +- ceph/src/test/common/Readahead.cc | 130 + .../test/common/get_command_descriptions.cc | 7 +- ceph/src/test/common/test_bit_vector.cc | 249 + ceph/src/test/common/test_blkdev.cc | 85 + ceph/src/test/common/test_bloom_filter.cc | 16 + ceph/src/test/common/test_config.cc | 12 +- ceph/src/test/common/test_context.cc | 37 +- ceph/src/test/common/test_lru.cc | 133 + ceph/src/test/common/test_safe_io.cc | 37 + ceph/src/test/common/test_shared_cache.cc | 411 + .../test/common/test_sharedptr_registry.cc | 2 +- ceph/src/test/common/test_sloppy_crc_map.cc | 2 +- ceph/src/test/common/test_str_map.cc | 13 +- ceph/src/test/common/test_tableformatter.cc | 245 + ceph/src/test/confutils.cc | 1 - .../test/container-make-check-ubuntu-14.04.sh | 3 + ceph/src/test/coverage.sh | 29 + .../{TestCrushWrapper.cc => CrushWrapper.cc} | 343 +- ceph/src/test/crush/crush.cc | 650 + ceph/src/test/crush/indep.cc | 265 - ceph/src/test/daemon_config.cc | 50 + ceph/src/test/debian-jessie/Dockerfile.in | 31 + ceph/src/test/debian-jessie/install-deps.sh | 67 + ceph/src/test/encoding/ceph_dencoder.cc | 8 +- ceph/src/test/encoding/types.h | 56 +- .../test/erasure-code/ErasureCodeExample.h | 25 +- .../erasure-code/ErasureCodePluginExample.cc | 8 +- .../ErasureCodePluginFailToInitialize.cc | 9 +- .../ErasureCodePluginFailToRegister.cc | 9 +- .../erasure-code/ErasureCodePluginHangs.cc | 9 +- .../ErasureCodePluginMissingEntryPoint.cc | 8 +- .../ErasureCodePluginMissingVersion.cc | 3 + ceph/src/test/erasure-code/Makefile.am | 125 +- ceph/src/test/erasure-code/TestErasureCode.cc | 170 + .../erasure-code/TestErasureCodeExample.cc | 2 +- .../test/erasure-code/TestErasureCodeIsa.cc | 964 + .../erasure-code/TestErasureCodeJerasure.cc | 151 +- .../test/erasure-code/TestErasureCodeLrc.cc | 936 + .../erasure-code/TestErasureCodePlugin.cc | 29 +- .../erasure-code/TestErasureCodePluginIsa.cc | 69 + .../TestErasureCodePluginJerasure.cc | 28 +- .../erasure-code/TestErasureCodePluginLrc.cc | 59 + .../test/erasure-code/TestErasureCodeShec.cc | 3014 ++ .../erasure-code/TestErasureCodeShec_all.cc | 330 + .../TestErasureCodeShec_thread.cc | 231 + .../erasure-code/TestJerasurePluginGeneric.cc | 10 +- .../erasure-code/TestJerasurePluginNEON.cc | 25 + .../erasure-code/TestJerasurePluginSSE3.cc | 10 +- .../erasure-code/TestJerasurePluginSSE4.cc | 10 +- .../test/erasure-code/ceph_erasure_code.cc | 57 +- .../ceph_erasure_code_benchmark.cc | 172 +- .../ceph_erasure_code_benchmark.h | 18 +- .../ceph_erasure_code_non_regression.cc | 4 +- .../test/erasure-code/test-erasure-code.sh | 299 + ceph/src/test/escape.cc | 5 +- ceph/src/test/filestore/TestFileStore.cc | 87 + ceph/src/test/formatter.cc | 21 +- ceph/src/test/fs/mds_types.cc | 252 + ceph/src/test/kv_store_bench.cc | 22 +- ceph/src/test/kv_store_bench.h | 1 + ceph/src/test/libcephfs/test.cc | 66 +- ceph/src/test/librados/TestCase.cc | 296 +- ceph/src/test/librados/TestCase.h | 112 +- ceph/src/test/librados/aio.cc | 245 + ceph/src/test/librados/c_read_operations.cc | 42 +- ceph/src/test/librados/c_write_operations.cc | 56 + ceph/src/test/librados/io.cc | 82 +- ceph/src/test/librados/list.cc | 44 +- ceph/src/test/librados/misc.cc | 163 + ceph/src/test/librados/nlist.cc | 689 + ceph/src/test/librados/pool.cc | 48 + ceph/src/test/librados/snapshots.cc | 76 +- ceph/src/test/librados/tier.cc | 654 +- ceph/src/test/librados/watch_notify.cc | 442 +- .../librados_test_stub/LibradosTestStub.cc | 1045 + .../librados_test_stub/TestClassHandler.cc | 113 + .../librados_test_stub/TestClassHandler.h | 66 + .../test/librados_test_stub/TestIoCtxImpl.cc | 265 + .../test/librados_test_stub/TestIoCtxImpl.h | 148 + .../librados_test_stub/TestMemIoCtxImpl.cc | 615 + .../librados_test_stub/TestMemIoCtxImpl.h | 72 + .../librados_test_stub/TestMemRadosClient.cc | 128 + .../librados_test_stub/TestMemRadosClient.h | 99 + .../librados_test_stub/TestRadosClient.cc | 228 + .../test/librados_test_stub/TestRadosClient.h | 100 + .../librados_test_stub/TestWatchNotify.cc | 233 + .../test/librados_test_stub/TestWatchNotify.h | 93 + ceph/src/test/libradosstriper/TestCase.cc | 79 + ceph/src/test/libradosstriper/TestCase.h | 82 + ceph/src/test/libradosstriper/aio.cc | 574 + ceph/src/test/libradosstriper/io.cc | 406 + ceph/src/test/libradosstriper/striping.cc | 316 + ceph/src/test/librbd/{fsx.c => fsx.cc} | 1024 +- ceph/src/test/librbd/test_ImageWatcher.cc | 974 + ceph/src/test/librbd/test_ObjectMap.cc | 124 + ceph/src/test/librbd/test_fixture.cc | 85 + ceph/src/test/librbd/test_fixture.h | 47 + ceph/src/test/librbd/test_internal.cc | 392 + ceph/src/test/librbd/test_librbd.cc | 2001 +- ceph/src/test/librbd/test_main.cc | 46 + ceph/src/test/librbd/test_support.cc | 30 + ceph/src/test/librbd/test_support.h | 19 + ceph/src/test/mds/TestMDSAuthCaps.cc | 151 + ceph/src/test/messenger/Makefile.am | 76 + ceph/src/test/messenger/message_helper.h | 134 + ceph/src/test/messenger/simple_client.cc | 160 + ceph/src/test/messenger/simple_dispatcher.cc | 84 + ceph/src/test/messenger/simple_dispatcher.h | 124 + ceph/src/test/messenger/simple_server.cc | 106 + ceph/src/test/messenger/xio_client.cc | 187 + ceph/src/test/messenger/xio_dispatcher.cc | 76 + ceph/src/test/messenger/xio_dispatcher.h | 124 + ceph/src/test/messenger/xio_server.cc | 122 + ceph/src/test/mon/misc.sh | 91 + ceph/src/test/mon/mkfs.sh | 189 + ceph/src/test/mon/mon-handle-forward.sh | 57 + ceph/src/test/mon/mon-test-helpers.sh | 24 +- ceph/src/test/mon/moncap.cc | 5 +- ceph/src/test/mon/osd-crush.sh | 224 + ceph/src/test/mon/osd-erasure-code-profile.sh | 196 + ceph/src/test/mon/osd-pool-create.sh | 259 + ceph/src/test/mon/test-mon-msg.cc | 337 + ceph/src/test/mon/test_mon_workloadgen.cc | 33 +- ceph/src/test/msgr/test_async_driver.cc | 307 + ceph/src/test/msgr/test_msgr.cc | 1189 + ceph/src/test/multi_stress_watch.cc | 7 + .../objectstore/DeterministicOpSequence.cc | 102 +- .../objectstore/DeterministicOpSequence.h | 14 +- ceph/src/test/objectstore/FileStoreDiff.cc | 4 +- .../ObjectStoreTransactionBenchmark.cc | 269 + .../test/objectstore/TestObjectStoreState.cc | 7 + .../test/objectstore/TestObjectStoreState.h | 10 +- ceph/src/test/objectstore/chain_xattr.cc | 48 +- ceph/src/test/objectstore/store_test.cc | 598 +- .../objectstore/test_idempotent_sequence.cc | 4 +- .../test/objectstore/workload_generator.cc | 12 +- .../src/test/objectstore/workload_generator.h | 2 +- ceph/src/test/omap_bench.h | 2 +- ceph/src/test/os/TestFlatIndex.cc | 6 +- ceph/src/test/os/TestLFNIndex.cc | 71 +- ceph/src/test/osd/Object.cc | 10 +- ceph/src/test/osd/Object.h | 20 +- ceph/src/test/osd/RadosModel.cc | 1 + ceph/src/test/osd/RadosModel.h | 83 +- ceph/src/test/osd/TestOSDMap.cc | 7 +- ceph/src/test/osd/TestOSDScrub.cc | 157 + ceph/src/test/osd/TestPGLog.cc | 311 +- ceph/src/test/osd/TestRados.cc | 30 +- ceph/src/test/osd/hitset.cc | 4 +- ceph/src/test/osd/osd-bench.sh | 82 + ceph/src/test/osd/osd-config.sh | 108 + ceph/src/test/osd/osd-copy-from.sh | 63 + ceph/src/test/osd/osd-scrub-repair.sh | 163 + ceph/src/test/osd/osd-test-helpers.sh | 36 +- ceph/src/test/osd/types.cc | 38 +- ceph/src/test/osdc/FakeWriteback.cc | 6 +- ceph/src/test/osdc/FakeWriteback.h | 8 +- ceph/src/test/osdc/object_cacher_stress.cc | 2 +- ceph/src/test/perf_counters.cc | 45 +- ceph/src/test/pybind/test_ceph_argparse.py | 1160 + ceph/src/test/rgw/test_rgw_manifest.cc | 2 +- ceph/src/test/run-cli-tests | 3 + ceph/src/test/signals.cc | 10 + ceph/src/test/strtol.cc | 13 +- ceph/src/test/system/rados_list_parallel.cc | 20 +- ceph/src/test/system/rados_watch_notify.cc | 6 + ceph/src/test/system/st_rados_create_pool.cc | 8 +- ceph/src/test/system/st_rados_list_objects.cc | 13 +- ceph/src/test/system/st_rados_notify.cc | 7 + ceph/src/test/system/st_rados_watch.cc | 10 +- ceph/src/test/system/systest_runnable.cc | 2 + ceph/src/test/test-ceph-helpers.sh | 20 + ceph/src/test/test_arch.cc | 90 +- ceph/src/test/test_filejournal.cc | 22 +- ceph/src/test/test_rbd_replay.cc | 225 + ceph/src/test/test_rgw_admin_log.cc | 56 +- ceph/src/test/test_rgw_admin_meta.cc | 6 +- ceph/src/test/test_rgw_admin_opstate.cc | 2 +- ceph/src/test/test_snap_mapper.cc | 2 +- ceph/src/test/test_str_list.cc | 19 +- ceph/src/test/test_stress_watch.cc | 12 +- ceph/src/test/test_striper.cc | 19 + ceph/src/test/testmsgr.cc | 145 - ceph/src/test/ubuntu-12.04/Dockerfile.in | 31 + ceph/src/test/ubuntu-12.04/install-deps.sh | 67 + ceph/src/test/ubuntu-14.04/Dockerfile.in | 31 + ceph/src/test/ubuntu-14.04/install-deps.sh | 67 + ceph/src/tools/Makefile-client.am | 34 + ceph/src/tools/Makefile-server.am | 52 + ceph/src/tools/Makefile.am | 77 +- ceph/src/tools/ceph_authtool.cc | 400 +- ceph/src/tools/ceph_conf.cc | 13 +- ceph/src/tools/ceph_filestore_dump.cc | 1429 - ceph/src/tools/ceph_filestore_tool.cc | 260 - ceph/src/tools/ceph_kvstore_tool.cc | 14 +- ceph/src/tools/ceph_monstore_tool.cc | 596 +- ceph/src/tools/ceph_objectstore_tool.cc | 3159 ++ ceph/src/tools/ceph_osdomap_tool.cc | 40 +- ceph/src/tools/cephfs/Dumper.cc | 312 + ceph/src/{mds => tools/cephfs}/Dumper.h | 16 +- ceph/src/tools/cephfs/EventOutput.cc | 133 + ceph/src/tools/cephfs/EventOutput.h | 42 + ceph/src/tools/cephfs/JournalFilter.cc | 276 + ceph/src/tools/cephfs/JournalFilter.h | 64 + ceph/src/tools/cephfs/JournalScanner.cc | 382 + ceph/src/tools/cephfs/JournalScanner.h | 125 + ceph/src/tools/cephfs/JournalTool.cc | 1244 + ceph/src/tools/cephfs/JournalTool.h | 80 + ceph/src/{mds => tools/cephfs}/MDSUtility.cc | 50 +- ceph/src/{mds => tools/cephfs}/MDSUtility.h | 4 +- ceph/src/{mds => tools/cephfs}/Resetter.cc | 60 +- ceph/src/{mds => tools/cephfs}/Resetter.h | 11 +- ceph/src/tools/cephfs/TableTool.cc | 306 + ceph/src/tools/cephfs/TableTool.h | 50 + ceph/src/tools/cephfs/cephfs-journal-tool.cc | 58 + ceph/src/tools/cephfs/cephfs-table-tool.cc | 46 + ceph/src/tools/common.h | 132 - ceph/src/tools/crushtool.cc | 116 +- ceph/src/tools/dupstore.cc | 113 - ceph/src/tools/mon_store_converter.cc | 336 - ceph/src/tools/monmaptool.cc | 14 +- ceph/src/tools/osdmaptool.cc | 20 +- ceph/src/tools/psim.cc | 14 +- ceph/src/tools/rados/rados.cc | 565 +- ceph/src/tools/rados/rados_export.cc | 6 +- ceph/src/tools/rados/rados_import.cc | 6 +- ceph/src/tools/rados/rados_sync.cc | 4 +- ceph/src/tools/radosacl.cc | 11 +- ceph/src/tools/rest_bench.cc | 30 +- ceph/src/tools/scratchtool.c | 65 +- ceph/src/tools/scratchtoolpp.cc | 19 +- ceph/src/tracing/Makefile.am | 79 + ceph/src/tracing/Makefile.in | 818 + ceph/src/tracing/librados.tp | 3339 ++ ceph/src/tracing/librbd.tp | 1464 + ceph/src/tracing/objectstore.tp | 768 + ceph/src/tracing/oprequest.tp | 47 + ceph/src/tracing/osd.tp | 758 + ceph/src/tracing/pg.tp | 18 + ceph/src/tracing/tracing-common.h | 96 + ceph/src/upstart/ceph-mds.conf | 2 +- ceph/src/upstart/ceph-mon.conf | 2 +- ceph/src/upstart/ceph-osd.conf | 35 +- ceph/src/vstart.sh | 253 +- ceph/src/yasm-wrapper | 10 +- ceph/udev/95-ceph-osd.rules | 20 +- debian/README.Debian | 120 + debian/ceph-common.install | 4 + debian/ceph-common.lintian-overrides | 2 + debian/ceph-common.manpages | 1 + debian/ceph-fuse.lintian-overrides | 2 + debian/ceph-fuse.manpages | 1 + debian/ceph-mds.install | 3 + debian/ceph-mds.lintian-overrides | 3 + debian/ceph-test.install | 6 +- debian/ceph-test.lintian-overrides | 5 + debian/ceph.examples | 1 + debian/ceph.init | 1 + debian/ceph.install | 19 +- debian/ceph.lintian-overrides | 3 + debian/ceph.rbdmap.init | 1 + debian/ceph.service | 15 + debian/changelog | 383 +- debian/clean | 4 + debian/control | 314 +- debian/copyright | 787 +- debian/etc/default/ceph | 9 + debian/etc/pm/sleep.d/25-ceph | 12 + debian/lib-systemd/system-sleep/ceph | 12 + .../system/ceph-create-keys.service | 9 + debian/lib-systemd/system/ceph-mds.service | 17 + debian/lib-systemd/system/ceph-mon.service | 20 + debian/lib-systemd/system/ceph-osd@.service | 22 + debian/libcephfs1.lintian-overrides | 2 + debian/libcephfs1.symbols | 282 + debian/librados2.lintian-overrides | 2 + debian/librados2.symbols | 169 + debian/libradosstriper-dev.install | 5 + debian/libradosstriper1.install | 1 + debian/libradosstriper1.symbols | 174 + debian/librbd1.install | 3 - debian/librbd1.symbols | 69 + debian/man/ceph-crush-location.1 | 24 + debian/man/mount.fuse.ceph.8 | 30 + debian/patches/arch.patch | 17 + debian/patches/ceph-osd-prestart-path.patch | 11 + debian/patches/fix-argparse-defaults.patch | 26 + debian/patches/fix-cycles-arch.patch | 19 + debian/patches/modules.patch | 95 +- debian/patches/rbdmap3-lazyumount.patch | 51 + debian/patches/sample.ceph.conf.patch | 172 + debian/patches/series | 13 +- debian/patches/sleep-recover.patch | 16 + ...wnload => virtualenv-never-download.patch} | 10 +- debian/patches/vivid-does-systemd.patch | 18 + debian/python-ceph.install | 1 - debian/python-cephfs.install | 1 + debian/python-rados.install | 1 + debian/python-rbd.install | 1 + debian/radosgw.init | 1 + debian/radosgw.lintian-overrides | 3 - debian/rules | 58 +- tests/integration_tests.conf | 2 +- 1914 files changed, 490879 insertions(+), 60350 deletions(-) create mode 100755 ceph/install-deps.sh create mode 100644 ceph/m4/ax_arm.m4 create mode 100644 ceph/m4/ax_cxx_compile_stdcxx_11.m4 create mode 100644 ceph/man/Makefile-client.am create mode 100644 ceph/man/Makefile-server.am create mode 100644 ceph/man/ceph-create-keys.8 create mode 100644 ceph/man/ceph-deploy.8 create mode 100644 ceph/man/ceph-disk.8 delete mode 100644 ceph/man/mkcephfs.8 create mode 100644 ceph/man/rbd-replay-many.8 create mode 100644 ceph/man/rbd-replay-prep.8 create mode 100644 ceph/man/rbd-replay.8 create mode 100644 ceph/src/Makefile-client.am create mode 100644 ceph/src/Makefile-rocksdb.am create mode 100644 ceph/src/Makefile-server.am rename ceph/src/arch/{neon.c => arm.c} (74%) create mode 100644 ceph/src/arch/arm.h delete mode 100644 ceph/src/arch/neon.h create mode 100644 ceph/src/ceph-osd-prestart.sh create mode 100644 ceph/src/cls/Makefile-client.am create mode 100644 ceph/src/cls/Makefile-server.am create mode 100644 ceph/src/common/ContextCompletion.cc create mode 100644 ceph/src/common/ContextCompletion.h create mode 100644 ceph/src/common/Continuation.h create mode 100644 ceph/src/common/Cycles.cc create mode 100644 ceph/src/common/Cycles.h create mode 100644 ceph/src/common/Initialize.h create mode 100644 ceph/src/common/QueueRing.h create mode 100644 ceph/src/common/Readahead.cc create mode 100644 ceph/src/common/Readahead.h create mode 100644 ceph/src/common/address_helper.cc create mode 100644 ceph/src/common/address_helper.h create mode 100644 ceph/src/common/bit_vector.hpp create mode 100644 ceph/src/common/module.c create mode 100644 ceph/src/common/module.h create mode 100644 ceph/src/common/types.cc create mode 100644 ceph/src/common/valgrind.h create mode 100644 ceph/src/crush/CrushTreeDumper.h create mode 100644 ceph/src/crush/crush_ln_table.h create mode 100644 ceph/src/erasure-code/ErasureCode.cc create mode 100644 ceph/src/erasure-code/ErasureCode.h create mode 100644 ceph/src/erasure-code/isa/ErasureCodeIsa.cc create mode 100644 ceph/src/erasure-code/isa/ErasureCodeIsa.h create mode 100644 ceph/src/erasure-code/isa/ErasureCodeIsaTableCache.cc create mode 100644 ceph/src/erasure-code/isa/ErasureCodeIsaTableCache.h create mode 100644 ceph/src/erasure-code/isa/ErasureCodePluginIsa.cc create mode 100644 ceph/src/erasure-code/isa/Makefile.am create mode 100644 ceph/src/erasure-code/isa/isa-l/erasure_code/ec_base.c create mode 100644 ceph/src/erasure-code/isa/isa-l/erasure_code/ec_base.h create mode 100644 ceph/src/erasure-code/isa/isa-l/erasure_code/ec_highlevel_func.c create mode 100644 ceph/src/erasure-code/isa/isa-l/erasure_code/ec_multibinary.asm.s create mode 100644 ceph/src/erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_avx.asm.s create mode 100644 ceph/src/erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_avx2.asm.s create mode 100644 ceph/src/erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_sse.asm.s create mode 100644 ceph/src/erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_avx.asm.s create mode 100644 ceph/src/erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_avx2.asm.s create mode 100644 ceph/src/erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_sse.asm.s create mode 100644 ceph/src/erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_avx.asm.s create mode 100644 ceph/src/erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_avx2.asm.s create mode 100644 ceph/src/erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_sse.asm.s create mode 100644 ceph/src/erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_avx.asm.s create mode 100644 ceph/src/erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_avx2.asm.s create mode 100644 ceph/src/erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_sse.asm.s create mode 100644 ceph/src/erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_avx.asm.s create mode 100644 ceph/src/erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_avx2.asm.s create mode 100644 ceph/src/erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_sse.asm.s create mode 100644 ceph/src/erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_avx.asm.s create mode 100644 ceph/src/erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_avx2.asm.s create mode 100644 ceph/src/erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_sse.asm.s create mode 100644 ceph/src/erasure-code/isa/isa-l/erasure_code/gf_vect_mul_avx.asm.s create mode 100644 ceph/src/erasure-code/isa/isa-l/erasure_code/gf_vect_mul_sse.asm.s create mode 100644 ceph/src/erasure-code/isa/isa-l/include/erasure_code.h create mode 100644 ceph/src/erasure-code/isa/isa-l/include/gf_vect_mul.h create mode 100644 ceph/src/erasure-code/isa/isa-l/include/reg_sizes.asm create mode 100644 ceph/src/erasure-code/isa/isa-l/include/types.h create mode 100644 ceph/src/erasure-code/isa/xor_op.cc create mode 100644 ceph/src/erasure-code/isa/xor_op.h create mode 100644 ceph/src/erasure-code/jerasure/gf-complete/include/gf_w16.h create mode 100644 ceph/src/erasure-code/jerasure/gf-complete/include/gf_w32.h create mode 100644 ceph/src/erasure-code/jerasure/gf-complete/include/gf_w4.h create mode 100644 ceph/src/erasure-code/jerasure/gf-complete/include/gf_w64.h create mode 100644 ceph/src/erasure-code/jerasure/gf-complete/include/gf_w8.h create mode 100644 ceph/src/erasure-code/jerasure/gf-complete/src/neon/gf_w16_neon.c create mode 100644 ceph/src/erasure-code/jerasure/gf-complete/src/neon/gf_w32_neon.c create mode 100644 ceph/src/erasure-code/jerasure/gf-complete/src/neon/gf_w4_neon.c create mode 100644 ceph/src/erasure-code/jerasure/gf-complete/src/neon/gf_w64_neon.c create mode 100644 ceph/src/erasure-code/jerasure/gf-complete/src/neon/gf_w8_neon.c create mode 100644 ceph/src/erasure-code/lrc/ErasureCodeLrc.cc create mode 100644 ceph/src/erasure-code/lrc/ErasureCodeLrc.h create mode 100644 ceph/src/erasure-code/lrc/ErasureCodePluginLrc.cc create mode 100644 ceph/src/erasure-code/lrc/Makefile.am create mode 100644 ceph/src/erasure-code/shec/ErasureCodePluginShec.cc create mode 100644 ceph/src/erasure-code/shec/ErasureCodeShec.cc create mode 100644 ceph/src/erasure-code/shec/ErasureCodeShec.h create mode 100644 ceph/src/erasure-code/shec/ErasureCodeShecTableCache.cc create mode 100644 ceph/src/erasure-code/shec/ErasureCodeShecTableCache.h create mode 100644 ceph/src/erasure-code/shec/Makefile.am create mode 100755 ceph/src/erasure-code/shec/determinant.c create mode 100644 ceph/src/erasure-code/shec/shec.cc create mode 100755 ceph/src/erasure-code/shec/shec.h create mode 100644 ceph/src/gmock/CHANGES create mode 100644 ceph/src/gmock/CMakeLists.txt create mode 100644 ceph/src/gmock/CONTRIBUTORS rename ceph/src/{gtest/COPYING => gmock/LICENSE} (100%) create mode 100644 ceph/src/gmock/Makefile.am create mode 100644 ceph/src/gmock/Makefile.in create mode 100644 ceph/src/gmock/README create mode 100644 ceph/src/gmock/aclocal.m4 create mode 100755 ceph/src/gmock/build-aux/compile rename ceph/src/{gtest => gmock}/build-aux/config.guess (92%) rename ceph/src/{gtest => gmock}/build-aux/config.h.in (100%) rename ceph/src/{gtest => gmock}/build-aux/config.sub (94%) rename ceph/src/{gtest => gmock}/build-aux/depcomp (56%) rename ceph/src/{gtest => gmock}/build-aux/install-sh (97%) rename ceph/src/{gtest => gmock}/build-aux/ltmain.sh (99%) create mode 100755 ceph/src/gmock/build-aux/missing create mode 100755 ceph/src/gmock/build-aux/test-driver create mode 100755 ceph/src/gmock/configure create mode 100644 ceph/src/gmock/configure.ac create mode 100644 ceph/src/gmock/fused-src/gmock-gtest-all.cc create mode 100644 ceph/src/gmock/fused-src/gmock/gmock.h create mode 100644 ceph/src/gmock/fused-src/gmock_main.cc rename ceph/src/{gtest => gmock}/fused-src/gtest/gtest.h (83%) rename ceph/src/{ => gmock}/gtest/CHANGES (56%) create mode 100644 ceph/src/gmock/gtest/CMakeLists.txt rename ceph/src/{ => gmock}/gtest/CONTRIBUTORS (97%) create mode 100644 ceph/src/gmock/gtest/LICENSE rename ceph/src/{ => gmock}/gtest/Makefile.am (78%) create mode 100644 ceph/src/gmock/gtest/Makefile.in rename ceph/src/{ => gmock}/gtest/README (88%) rename ceph/src/{ => gmock}/gtest/aclocal.m4 (65%) create mode 100755 ceph/src/gmock/gtest/build-aux/compile create mode 100755 ceph/src/gmock/gtest/build-aux/config.guess create mode 100644 ceph/src/gmock/gtest/build-aux/config.h.in create mode 100755 ceph/src/gmock/gtest/build-aux/config.sub create mode 100755 ceph/src/gmock/gtest/build-aux/depcomp create mode 100755 ceph/src/gmock/gtest/build-aux/install-sh create mode 100644 ceph/src/gmock/gtest/build-aux/ltmain.sh create mode 100755 ceph/src/gmock/gtest/build-aux/missing create mode 100755 ceph/src/gmock/gtest/build-aux/test-driver create mode 100644 ceph/src/gmock/gtest/cmake/internal_utils.cmake rename ceph/src/{ => gmock}/gtest/codegear/gtest.cbproj (100%) rename ceph/src/{ => gmock}/gtest/codegear/gtest.groupproj (100%) rename ceph/src/{ => gmock}/gtest/codegear/gtest_all.cc (100%) rename ceph/src/{ => gmock}/gtest/codegear/gtest_link.cc (100%) rename ceph/src/{ => gmock}/gtest/codegear/gtest_main.cbproj (100%) rename ceph/src/{ => gmock}/gtest/codegear/gtest_unittest.cbproj (100%) rename ceph/src/{ => gmock}/gtest/configure (97%) rename ceph/src/{ => gmock}/gtest/configure.ac (95%) rename ceph/src/{ => gmock}/gtest/fused-src/gtest/gtest-all.cc (75%) create mode 100644 ceph/src/gmock/gtest/fused-src/gtest/gtest.h rename ceph/src/{gtest/src => gmock/gtest/fused-src/gtest}/gtest_main.cc (92%) rename ceph/src/{ => gmock}/gtest/include/gtest/gtest-death-test.h (85%) rename ceph/src/{ => gmock}/gtest/include/gtest/gtest-message.h (73%) rename ceph/src/{ => gmock}/gtest/include/gtest/gtest-param-test.h (97%) rename ceph/src/{ => gmock}/gtest/include/gtest/gtest-param-test.h.pump (87%) create mode 100644 ceph/src/gmock/gtest/include/gtest/gtest-printers.h rename ceph/src/{ => gmock}/gtest/include/gtest/gtest-spi.h (98%) rename ceph/src/{ => gmock}/gtest/include/gtest/gtest-test-part.h (92%) rename ceph/src/{ => gmock}/gtest/include/gtest/gtest-typed-test.h (92%) rename ceph/src/{ => gmock}/gtest/include/gtest/gtest.h (77%) rename ceph/src/{ => gmock}/gtest/include/gtest/gtest_pred_impl.h (84%) rename ceph/src/{ => gmock}/gtest/include/gtest/gtest_prod.h (100%) rename ceph/src/{ => gmock}/gtest/include/gtest/internal/gtest-death-test-internal.h (83%) rename ceph/src/{ => gmock}/gtest/include/gtest/internal/gtest-filepath.h (96%) rename ceph/src/{ => gmock}/gtest/include/gtest/internal/gtest-internal.h (62%) rename ceph/src/{ => gmock}/gtest/include/gtest/internal/gtest-linked_ptr.h (95%) rename ceph/src/{ => gmock}/gtest/include/gtest/internal/gtest-param-util-generated.h (83%) rename ceph/src/{ => gmock}/gtest/include/gtest/internal/gtest-param-util-generated.h.pump (96%) rename ceph/src/{ => gmock}/gtest/include/gtest/internal/gtest-param-util.h (94%) rename ceph/src/{ => gmock}/gtest/include/gtest/internal/gtest-port.h (65%) create mode 100644 ceph/src/gmock/gtest/include/gtest/internal/gtest-string.h rename ceph/src/{ => gmock}/gtest/include/gtest/internal/gtest-tuple.h (93%) rename ceph/src/{ => gmock}/gtest/include/gtest/internal/gtest-tuple.h.pump (96%) rename ceph/src/{ => gmock}/gtest/include/gtest/internal/gtest-type-util.h (99%) rename ceph/src/{ => gmock}/gtest/include/gtest/internal/gtest-type-util.h.pump (91%) rename ceph/src/{ => gmock}/gtest/m4/acx_pthread.m4 (100%) rename ceph/src/{ => gmock}/gtest/m4/gtest.m4 (100%) rename ceph/src/{ => gmock}/gtest/m4/libtool.m4 (99%) rename ceph/src/{ => gmock}/gtest/m4/ltoptions.m4 (100%) rename ceph/src/{ => gmock}/gtest/m4/ltsugar.m4 (100%) rename ceph/src/{ => gmock}/gtest/m4/ltversion.m4 (100%) rename ceph/src/{ => gmock}/gtest/m4/lt~obsolete.m4 (100%) rename ceph/src/{ => gmock}/gtest/make/Makefile (92%) rename ceph/src/{ => gmock}/gtest/msvc/gtest-md.sln (100%) create mode 100644 ceph/src/gmock/gtest/msvc/gtest-md.vcproj rename ceph/src/{ => gmock}/gtest/msvc/gtest.sln (100%) create mode 100644 ceph/src/gmock/gtest/msvc/gtest.vcproj rename ceph/src/{ => gmock}/gtest/msvc/gtest_main-md.vcproj (75%) rename ceph/src/{ => gmock}/gtest/msvc/gtest_main.vcproj (75%) rename ceph/src/{ => gmock}/gtest/msvc/gtest_prod_test-md.vcproj (100%) rename ceph/src/{ => gmock}/gtest/msvc/gtest_prod_test.vcproj (100%) rename ceph/src/{ => gmock}/gtest/msvc/gtest_unittest-md.vcproj (100%) rename ceph/src/{ => gmock}/gtest/msvc/gtest_unittest.vcproj (100%) rename ceph/src/{ => gmock}/gtest/samples/prime_tables.h (100%) rename ceph/src/{ => gmock}/gtest/samples/sample1.cc (100%) rename ceph/src/{ => gmock}/gtest/samples/sample1.h (100%) rename ceph/src/{ => gmock}/gtest/samples/sample10_unittest.cc (97%) rename ceph/src/{ => gmock}/gtest/samples/sample1_unittest.cc (98%) rename ceph/src/{ => gmock}/gtest/samples/sample2.cc (100%) rename ceph/src/{ => gmock}/gtest/samples/sample2.h (99%) rename ceph/src/{ => gmock}/gtest/samples/sample2_unittest.cc (93%) rename ceph/src/{ => gmock}/gtest/samples/sample3-inl.h (98%) rename ceph/src/{ => gmock}/gtest/samples/sample3_unittest.cc (99%) rename ceph/src/{ => gmock}/gtest/samples/sample4.cc (100%) rename ceph/src/{ => gmock}/gtest/samples/sample4.h (100%) rename ceph/src/{ => gmock}/gtest/samples/sample4_unittest.cc (98%) rename ceph/src/{ => gmock}/gtest/samples/sample5_unittest.cc (95%) rename ceph/src/{ => gmock}/gtest/samples/sample6_unittest.cc (99%) rename ceph/src/{ => gmock}/gtest/samples/sample7_unittest.cc (87%) rename ceph/src/{ => gmock}/gtest/samples/sample8_unittest.cc (99%) rename ceph/src/{ => gmock}/gtest/samples/sample9_unittest.cc (98%) rename ceph/src/{ => gmock}/gtest/scripts/fuse_gtest_files.py (93%) rename ceph/src/{ => gmock}/gtest/scripts/gen_gtest_pred_impl.py (98%) rename ceph/src/{ => gmock}/gtest/scripts/gtest-config.in (98%) rename ceph/src/{ => gmock}/gtest/scripts/pump.py (92%) rename ceph/src/{ => gmock}/gtest/scripts/test/Makefile (91%) rename ceph/src/{ => gmock}/gtest/src/gtest-all.cc (97%) rename ceph/src/{ => gmock}/gtest/src/gtest-death-test.cc (74%) rename ceph/src/{ => gmock}/gtest/src/gtest-filepath.cc (91%) rename ceph/src/{ => gmock}/gtest/src/gtest-internal-inl.h (77%) rename ceph/src/{ => gmock}/gtest/src/gtest-port.cc (79%) create mode 100644 ceph/src/gmock/gtest/src/gtest-printers.cc rename ceph/src/{ => gmock}/gtest/src/gtest-test-part.cc (94%) rename ceph/src/{ => gmock}/gtest/src/gtest-typed-test.cc (93%) rename ceph/src/{ => gmock}/gtest/src/gtest.cc (74%) rename ceph/src/{gtest/fused-src/gtest => gmock/gtest/src}/gtest_main.cc (92%) create mode 100644 ceph/src/gmock/gtest/test/gtest-death-test_ex_test.cc rename ceph/src/{ => gmock}/gtest/test/gtest-death-test_test.cc (82%) rename ceph/src/{ => gmock}/gtest/test/gtest-filepath_test.cc (73%) rename ceph/src/{ => gmock}/gtest/test/gtest-linked_ptr_test.cc (94%) rename ceph/src/{ => gmock}/gtest/test/gtest-listener_test.cc (91%) rename ceph/src/{ => gmock}/gtest/test/gtest-message_test.cc (69%) rename ceph/src/{ => gmock}/gtest/test/gtest-options_test.cc (76%) rename ceph/src/{ => gmock}/gtest/test/gtest-param-test2_test.cc (99%) rename ceph/src/{ => gmock}/gtest/test/gtest-param-test_test.cc (91%) rename ceph/src/{ => gmock}/gtest/test/gtest-param-test_test.h (96%) rename ceph/src/{ => gmock}/gtest/test/gtest-port_test.cc (72%) create mode 100644 ceph/src/gmock/gtest/test/gtest-printers_test.cc rename ceph/src/{ => gmock}/gtest/test/gtest-test-part_test.cc (99%) rename ceph/src/{ => gmock}/gtest/test/gtest-tuple_test.cc (99%) rename ceph/src/{ => gmock}/gtest/test/gtest-typed-test2_test.cc (98%) rename ceph/src/{ => gmock}/gtest/test/gtest-typed-test_test.cc (99%) rename ceph/src/{ => gmock}/gtest/test/gtest-typed-test_test.h (98%) rename ceph/src/{ => gmock}/gtest/test/gtest-unittest-api_test.cc (88%) rename ceph/src/{ => gmock}/gtest/test/gtest_all_test.cc (98%) rename ceph/src/{ => gmock}/gtest/test/gtest_break_on_failure_unittest.py (94%) rename ceph/src/{ => gmock}/gtest/test/gtest_break_on_failure_unittest_.cc (96%) create mode 100755 ceph/src/gmock/gtest/test/gtest_catch_exceptions_test.py create mode 100644 ceph/src/gmock/gtest/test/gtest_catch_exceptions_test_.cc rename ceph/src/{ => gmock}/gtest/test/gtest_color_test.py (100%) rename ceph/src/{ => gmock}/gtest/test/gtest_color_test_.cc (99%) rename ceph/src/{ => gmock}/gtest/test/gtest_env_var_test.py (98%) rename ceph/src/{ => gmock}/gtest/test/gtest_env_var_test_.cc (99%) rename ceph/src/{ => gmock}/gtest/test/gtest_environment_test.cc (96%) rename ceph/src/{ => gmock}/gtest/test/gtest_filter_unittest.py (100%) rename ceph/src/{ => gmock}/gtest/test/gtest_filter_unittest_.cc (99%) rename ceph/src/{ => gmock}/gtest/test/gtest_help_test.py (93%) rename ceph/src/{ => gmock}/gtest/test/gtest_help_test_.cc (98%) rename ceph/src/{ => gmock}/gtest/test/gtest_list_tests_unittest.py (66%) create mode 100644 ceph/src/gmock/gtest/test/gtest_list_tests_unittest_.cc rename ceph/src/{ => gmock}/gtest/test/gtest_main_unittest.cc (98%) rename ceph/src/{ => gmock}/gtest/test/gtest_no_test_unittest.cc (85%) rename ceph/src/{ => gmock}/gtest/test/gtest_output_test.py (90%) rename ceph/src/{ => gmock}/gtest/test/gtest_output_test_.cc (88%) rename ceph/src/{ => gmock}/gtest/test/gtest_output_test_golden_lin.txt (93%) rename ceph/src/{ => gmock}/gtest/test/gtest_pred_impl_unittest.cc (99%) create mode 100644 ceph/src/gmock/gtest/test/gtest_premature_exit_test.cc rename ceph/src/{ => gmock}/gtest/test/gtest_prod_test.cc (98%) rename ceph/src/{ => gmock}/gtest/test/gtest_repeat_test.cc (96%) rename ceph/src/{ => gmock}/gtest/test/gtest_shuffle_test.py (100%) rename ceph/src/{ => gmock}/gtest/test/gtest_shuffle_test_.cc (98%) rename ceph/src/{ => gmock}/gtest/test/gtest_sole_header_test.cc (98%) rename ceph/src/{ => gmock}/gtest/test/gtest_stress_test.cc (98%) rename ceph/src/{ => gmock}/gtest/test/gtest_test_utils.py (93%) rename ceph/src/{ => gmock}/gtest/test/gtest_throw_on_failure_ex_test.cc (99%) rename ceph/src/{ => gmock}/gtest/test/gtest_throw_on_failure_test.py (100%) rename ceph/src/{ => gmock}/gtest/test/gtest_throw_on_failure_test_.cc (78%) rename ceph/src/{ => gmock}/gtest/test/gtest_uninitialized_test.py (100%) rename ceph/src/{ => gmock}/gtest/test/gtest_uninitialized_test_.cc (98%) rename ceph/src/{ => gmock}/gtest/test/gtest_unittest.cc (81%) rename ceph/src/{ => gmock}/gtest/test/gtest_xml_outfile1_test_.cc (98%) rename ceph/src/{ => gmock}/gtest/test/gtest_xml_outfile2_test_.cc (98%) rename ceph/src/{ => gmock}/gtest/test/gtest_xml_outfiles_test.py (98%) rename ceph/src/{ => gmock}/gtest/test/gtest_xml_output_unittest.py (52%) rename ceph/src/{ => gmock}/gtest/test/gtest_xml_output_unittest_.cc (67%) rename ceph/src/{ => gmock}/gtest/test/gtest_xml_test_utils.py (68%) rename ceph/src/{ => gmock}/gtest/test/production.cc (100%) rename ceph/src/{ => gmock}/gtest/test/production.h (98%) rename ceph/src/{ => gmock}/gtest/xcode/Config/DebugProject.xcconfig (100%) rename ceph/src/{ => gmock}/gtest/xcode/Config/FrameworkTarget.xcconfig (100%) rename ceph/src/{ => gmock}/gtest/xcode/Config/General.xcconfig (100%) rename ceph/src/{ => gmock}/gtest/xcode/Config/ReleaseProject.xcconfig (100%) rename ceph/src/{ => gmock}/gtest/xcode/Config/StaticLibraryTarget.xcconfig (100%) rename ceph/src/{ => gmock}/gtest/xcode/Config/TestTarget.xcconfig (100%) rename ceph/src/{ => gmock}/gtest/xcode/Resources/Info.plist (100%) rename ceph/src/{ => gmock}/gtest/xcode/Samples/FrameworkSample/Info.plist (100%) rename ceph/src/{ => gmock}/gtest/xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj (100%) rename ceph/src/{ => gmock}/gtest/xcode/Samples/FrameworkSample/runtests.sh (100%) rename ceph/src/{ => gmock}/gtest/xcode/Samples/FrameworkSample/widget.cc (100%) rename ceph/src/{ => gmock}/gtest/xcode/Samples/FrameworkSample/widget.h (100%) rename ceph/src/{ => gmock}/gtest/xcode/Samples/FrameworkSample/widget_test.cc (99%) rename ceph/src/{ => gmock}/gtest/xcode/Scripts/runtests.sh (100%) rename ceph/src/{ => gmock}/gtest/xcode/Scripts/versiongenerate.py (100%) rename ceph/src/{ => gmock}/gtest/xcode/gtest.xcodeproj/project.pbxproj (94%) create mode 100644 ceph/src/gmock/include/gmock/gmock-actions.h create mode 100644 ceph/src/gmock/include/gmock/gmock-cardinalities.h create mode 100644 ceph/src/gmock/include/gmock/gmock-generated-actions.h create mode 100644 ceph/src/gmock/include/gmock/gmock-generated-actions.h.pump create mode 100644 ceph/src/gmock/include/gmock/gmock-generated-function-mockers.h create mode 100644 ceph/src/gmock/include/gmock/gmock-generated-function-mockers.h.pump create mode 100644 ceph/src/gmock/include/gmock/gmock-generated-matchers.h create mode 100644 ceph/src/gmock/include/gmock/gmock-generated-matchers.h.pump create mode 100644 ceph/src/gmock/include/gmock/gmock-generated-nice-strict.h create mode 100644 ceph/src/gmock/include/gmock/gmock-generated-nice-strict.h.pump create mode 100644 ceph/src/gmock/include/gmock/gmock-matchers.h create mode 100644 ceph/src/gmock/include/gmock/gmock-more-actions.h rename ceph/src/{gtest/test/gtest_list_tests_unittest_.cc => gmock/include/gmock/gmock-more-matchers.h} (62%) create mode 100644 ceph/src/gmock/include/gmock/gmock-spec-builders.h create mode 100644 ceph/src/gmock/include/gmock/gmock.h create mode 100644 ceph/src/gmock/include/gmock/internal/gmock-generated-internal-utils.h create mode 100644 ceph/src/gmock/include/gmock/internal/gmock-generated-internal-utils.h.pump create mode 100644 ceph/src/gmock/include/gmock/internal/gmock-internal-utils.h create mode 100644 ceph/src/gmock/include/gmock/internal/gmock-port.h create mode 100644 ceph/src/gmock/make/Makefile create mode 100644 ceph/src/gmock/msvc/2005/gmock.sln create mode 100644 ceph/src/gmock/msvc/2005/gmock.vcproj create mode 100644 ceph/src/gmock/msvc/2005/gmock_config.vsprops create mode 100644 ceph/src/gmock/msvc/2005/gmock_main.vcproj create mode 100644 ceph/src/gmock/msvc/2005/gmock_test.vcproj create mode 100644 ceph/src/gmock/msvc/2010/gmock.sln create mode 100644 ceph/src/gmock/msvc/2010/gmock.vcxproj create mode 100644 ceph/src/gmock/msvc/2010/gmock_config.props create mode 100644 ceph/src/gmock/msvc/2010/gmock_main.vcxproj create mode 100644 ceph/src/gmock/msvc/2010/gmock_test.vcxproj create mode 100755 ceph/src/gmock/scripts/fuse_gmock_files.py create mode 100644 ceph/src/gmock/scripts/generator/LICENSE create mode 100644 ceph/src/gmock/scripts/generator/README create mode 100644 ceph/src/gmock/scripts/generator/README.cppclean create mode 100755 ceph/src/gmock/scripts/generator/cpp/__init__.py create mode 100755 ceph/src/gmock/scripts/generator/cpp/ast.py create mode 100755 ceph/src/gmock/scripts/generator/cpp/gmock_class.py create mode 100755 ceph/src/gmock/scripts/generator/cpp/keywords.py create mode 100755 ceph/src/gmock/scripts/generator/cpp/tokenize.py create mode 100755 ceph/src/gmock/scripts/generator/cpp/utils.py create mode 100755 ceph/src/gmock/scripts/generator/gmock_gen.py create mode 100755 ceph/src/gmock/scripts/gmock-config.in create mode 100644 ceph/src/gmock/src/gmock-all.cc create mode 100644 ceph/src/gmock/src/gmock-cardinalities.cc create mode 100644 ceph/src/gmock/src/gmock-internal-utils.cc create mode 100644 ceph/src/gmock/src/gmock-matchers.cc create mode 100644 ceph/src/gmock/src/gmock-spec-builders.cc create mode 100644 ceph/src/gmock/src/gmock.cc create mode 100644 ceph/src/gmock/src/gmock_main.cc create mode 100644 ceph/src/gmock/test/gmock-actions_test.cc create mode 100644 ceph/src/gmock/test/gmock-cardinalities_test.cc create mode 100644 ceph/src/gmock/test/gmock-generated-actions_test.cc create mode 100644 ceph/src/gmock/test/gmock-generated-function-mockers_test.cc create mode 100644 ceph/src/gmock/test/gmock-generated-internal-utils_test.cc create mode 100644 ceph/src/gmock/test/gmock-generated-matchers_test.cc create mode 100644 ceph/src/gmock/test/gmock-internal-utils_test.cc create mode 100644 ceph/src/gmock/test/gmock-matchers_test.cc create mode 100644 ceph/src/gmock/test/gmock-more-actions_test.cc create mode 100644 ceph/src/gmock/test/gmock-nice-strict_test.cc create mode 100644 ceph/src/gmock/test/gmock-port_test.cc create mode 100644 ceph/src/gmock/test/gmock-spec-builders_test.cc create mode 100644 ceph/src/gmock/test/gmock_all_test.cc create mode 100644 ceph/src/gmock/test/gmock_ex_test.cc create mode 100755 ceph/src/gmock/test/gmock_leak_test.py create mode 100644 ceph/src/gmock/test/gmock_leak_test_.cc create mode 100644 ceph/src/gmock/test/gmock_link2_test.cc create mode 100644 ceph/src/gmock/test/gmock_link_test.cc create mode 100644 ceph/src/gmock/test/gmock_link_test.h create mode 100755 ceph/src/gmock/test/gmock_output_test.py create mode 100644 ceph/src/gmock/test/gmock_output_test_.cc create mode 100644 ceph/src/gmock/test/gmock_output_test_golden.txt create mode 100644 ceph/src/gmock/test/gmock_stress_test.cc create mode 100644 ceph/src/gmock/test/gmock_test.cc create mode 100755 ceph/src/gmock/test/gmock_test_utils.py delete mode 100644 ceph/src/gtest/CMakeLists.txt delete mode 100644 ceph/src/gtest/Makefile.in delete mode 100755 ceph/src/gtest/build-aux/missing delete mode 100644 ceph/src/gtest/include/gtest/internal/gtest-string.h delete mode 100644 ceph/src/gtest/msvc/gtest-md.vcproj delete mode 100644 ceph/src/gtest/msvc/gtest.vcproj delete mode 100644 ceph/src/gtest/test/gtest_output_test_golden_win.txt delete mode 100755 ceph/src/gtest/test/run_tests_util.py delete mode 100755 ceph/src/gtest/test/run_tests_util_test.py delete mode 100644 ceph/src/include/dlist.h create mode 100644 ceph/src/include/krbd.h create mode 100644 ceph/src/include/radosstriper/libradosstriper.h create mode 100644 ceph/src/include/radosstriper/libradosstriper.hpp create mode 100644 ceph/src/include/rbd/object_map_types.h delete mode 100644 ceph/src/init-radosgw.sysv create mode 100644 ceph/src/krbd.cc create mode 100644 ceph/src/librados/ListObjectImpl.h create mode 100644 ceph/src/librados/RadosXattrIter.cc create mode 100644 ceph/src/librados/RadosXattrIter.h create mode 100644 ceph/src/libradosstriper/Makefile.am create mode 100644 ceph/src/libradosstriper/MultiAioCompletionImpl.cc create mode 100644 ceph/src/libradosstriper/MultiAioCompletionImpl.h create mode 100644 ceph/src/libradosstriper/RadosStriperImpl.cc create mode 100644 ceph/src/libradosstriper/RadosStriperImpl.h create mode 100644 ceph/src/libradosstriper/libradosstriper.cc create mode 100644 ceph/src/librbd/AsyncFlattenRequest.cc create mode 100644 ceph/src/librbd/AsyncFlattenRequest.h create mode 100644 ceph/src/librbd/AsyncObjectThrottle.cc create mode 100644 ceph/src/librbd/AsyncObjectThrottle.h create mode 100644 ceph/src/librbd/AsyncOperation.cc create mode 100644 ceph/src/librbd/AsyncOperation.h create mode 100644 ceph/src/librbd/AsyncRequest.cc create mode 100644 ceph/src/librbd/AsyncRequest.h create mode 100644 ceph/src/librbd/AsyncResizeRequest.cc create mode 100644 ceph/src/librbd/AsyncResizeRequest.h create mode 100644 ceph/src/librbd/AsyncTrimRequest.cc create mode 100644 ceph/src/librbd/AsyncTrimRequest.h create mode 100644 ceph/src/librbd/CopyupRequest.cc create mode 100644 ceph/src/librbd/CopyupRequest.h create mode 100644 ceph/src/librbd/ImageWatcher.cc create mode 100644 ceph/src/librbd/ImageWatcher.h create mode 100644 ceph/src/librbd/ObjectMap.cc create mode 100644 ceph/src/librbd/ObjectMap.h create mode 100644 ceph/src/librbd/TaskFinisher.h delete mode 100644 ceph/src/librbd/WatchCtx.cc delete mode 100644 ceph/src/librbd/WatchCtx.h create mode 100644 ceph/src/librbd/WatchNotifyTypes.cc create mode 100644 ceph/src/librbd/WatchNotifyTypes.h delete mode 100644 ceph/src/mds/Anchor.cc delete mode 100644 ceph/src/mds/Anchor.h delete mode 100644 ceph/src/mds/AnchorClient.cc delete mode 100644 ceph/src/mds/AnchorClient.h delete mode 100644 ceph/src/mds/AnchorServer.cc delete mode 100644 ceph/src/mds/AnchorServer.h create mode 100644 ceph/src/mds/Beacon.cc create mode 100644 ceph/src/mds/Beacon.h delete mode 100644 ceph/src/mds/Dumper.cc create mode 100644 ceph/src/mds/JournalPointer.cc create mode 100644 ceph/src/mds/JournalPointer.h create mode 100644 ceph/src/mds/MDSAuthCaps.cc create mode 100644 ceph/src/mds/MDSAuthCaps.h create mode 100644 ceph/src/mds/MDSContext.cc create mode 100644 ceph/src/mds/MDSContext.h create mode 100644 ceph/src/mds/MDSContinuation.h create mode 100644 ceph/src/mds/Makefile-client.am create mode 100644 ceph/src/mds/Makefile-server.am create mode 100644 ceph/src/mds/RecoveryQueue.cc create mode 100644 ceph/src/mds/RecoveryQueue.h rename ceph/src/{include/triple.h => mds/events/ENoOp.h} (52%) create mode 100644 ceph/src/messages/MClientQuota.h create mode 100644 ceph/src/messages/MDataPing.h create mode 100644 ceph/src/messages/MGatherCaps.h create mode 100644 ceph/src/messages/MMonGetOSDMap.h create mode 100644 ceph/src/messages/MOSDRepOp.h create mode 100644 ceph/src/messages/MOSDRepOpReply.h delete mode 100644 ceph/src/mkcephfs.in create mode 100644 ceph/src/msg/Connection.h create mode 100644 ceph/src/msg/SimplePolicyMessenger.h create mode 100644 ceph/src/msg/async/AsyncConnection.cc create mode 100644 ceph/src/msg/async/AsyncConnection.h create mode 100644 ceph/src/msg/async/AsyncMessenger.cc create mode 100644 ceph/src/msg/async/AsyncMessenger.h create mode 100644 ceph/src/msg/async/Event.cc create mode 100644 ceph/src/msg/async/Event.h create mode 100644 ceph/src/msg/async/EventEpoll.cc create mode 100644 ceph/src/msg/async/EventEpoll.h create mode 100644 ceph/src/msg/async/EventKqueue.cc create mode 100644 ceph/src/msg/async/EventKqueue.h create mode 100644 ceph/src/msg/async/EventSelect.cc create mode 100644 ceph/src/msg/async/EventSelect.h create mode 100644 ceph/src/msg/async/net_handler.cc create mode 100644 ceph/src/msg/async/net_handler.h rename ceph/src/msg/{ => simple}/Accepter.cc (69%) rename ceph/src/msg/{ => simple}/Accepter.h (100%) rename ceph/src/msg/{ => simple}/DispatchQueue.cc (57%) rename ceph/src/msg/{ => simple}/DispatchQueue.h (80%) rename ceph/src/msg/{ => simple}/Pipe.cc (89%) rename ceph/src/msg/{ => simple}/Pipe.h (81%) create mode 100644 ceph/src/msg/simple/PipeConnection.cc create mode 100644 ceph/src/msg/simple/PipeConnection.h rename ceph/src/msg/{ => simple}/SimpleMessenger.cc (82%) rename ceph/src/msg/{ => simple}/SimpleMessenger.h (79%) create mode 100644 ceph/src/msg/xio/DispatchStrategy.h create mode 100644 ceph/src/msg/xio/FastStrategy.h create mode 100644 ceph/src/msg/xio/QueueStrategy.cc create mode 100644 ceph/src/msg/xio/QueueStrategy.h create mode 100644 ceph/src/msg/xio/XioConnection.cc create mode 100644 ceph/src/msg/xio/XioConnection.h create mode 100644 ceph/src/msg/xio/XioInSeq.h create mode 100644 ceph/src/msg/xio/XioMessenger.cc create mode 100644 ceph/src/msg/xio/XioMessenger.h create mode 100644 ceph/src/msg/xio/XioMsg.cc create mode 100644 ceph/src/msg/xio/XioMsg.h create mode 100644 ceph/src/msg/xio/XioPool.cc create mode 100644 ceph/src/msg/xio/XioPool.h create mode 100644 ceph/src/msg/xio/XioPortal.cc create mode 100644 ceph/src/msg/xio/XioPortal.h create mode 100644 ceph/src/msg/xio/XioSubmit.h create mode 100644 ceph/src/os/KeyValueDB.cc create mode 100644 ceph/src/os/KineticStore.cc create mode 100644 ceph/src/os/KineticStore.h create mode 100644 ceph/src/os/RocksDBStore.cc create mode 100644 ceph/src/os/RocksDBStore.h delete mode 100644 ceph/src/osdc/Blinker.h create mode 100755 ceph/src/rbd-replay-many rename ceph/src/rbd_fuse/{rbd-fuse.c => rbd-fuse.cc} (81%) create mode 100644 ceph/src/rbd_replay/BoundedBuffer.hpp create mode 100644 ceph/src/rbd_replay/Deser.cc create mode 100644 ceph/src/rbd_replay/Deser.hpp create mode 100644 ceph/src/rbd_replay/ImageNameMap.cc create mode 100644 ceph/src/rbd_replay/ImageNameMap.hpp create mode 100644 ceph/src/rbd_replay/Makefile.am create mode 100644 ceph/src/rbd_replay/PendingIO.cc create mode 100644 ceph/src/rbd_replay/PendingIO.hpp create mode 100644 ceph/src/rbd_replay/Replayer.cc create mode 100644 ceph/src/rbd_replay/Replayer.hpp create mode 100644 ceph/src/rbd_replay/Ser.cc create mode 100644 ceph/src/rbd_replay/Ser.hpp create mode 100644 ceph/src/rbd_replay/actions.cc create mode 100644 ceph/src/rbd_replay/actions.hpp create mode 100644 ceph/src/rbd_replay/ios.cc create mode 100644 ceph/src/rbd_replay/ios.hpp create mode 100644 ceph/src/rbd_replay/rbd-replay-prep.cc create mode 100644 ceph/src/rbd_replay/rbd-replay.cc create mode 100644 ceph/src/rbd_replay/rbd_loc.cc create mode 100644 ceph/src/rbd_replay/rbd_loc.hpp create mode 100644 ceph/src/rbd_replay/rbd_replay_debug.hpp create mode 100644 ceph/src/rgw/rgw_orphan.cc create mode 100644 ceph/src/rgw/rgw_orphan.h create mode 100644 ceph/src/rocksdb/.arcconfig create mode 100644 ceph/src/rocksdb/.clang-format create mode 100644 ceph/src/rocksdb/.gitignore create mode 100644 ceph/src/rocksdb/CONTRIBUTING.md create mode 100644 ceph/src/rocksdb/HISTORY.md create mode 100644 ceph/src/rocksdb/INSTALL.md create mode 100644 ceph/src/rocksdb/LICENSE create mode 100644 ceph/src/rocksdb/Makefile.am create mode 100644 ceph/src/rocksdb/PATENTS create mode 100644 ceph/src/rocksdb/README create mode 100644 ceph/src/rocksdb/ROCKSDB_LITE.md create mode 100755 ceph/src/rocksdb/build_tools/build_detect_platform create mode 100755 ceph/src/rocksdb/build_tools/build_detect_version create mode 100644 ceph/src/rocksdb/build_tools/fbcode.clang31.sh create mode 100644 ceph/src/rocksdb/build_tools/fbcode.gcc471.sh create mode 100644 ceph/src/rocksdb/build_tools/fbcode.gcc481.sh create mode 100755 ceph/src/rocksdb/build_tools/format-diff.sh create mode 100755 ceph/src/rocksdb/build_tools/mac-install-gflags.sh create mode 100755 ceph/src/rocksdb/build_tools/make_new_version.sh create mode 100755 ceph/src/rocksdb/build_tools/regression_build_test.sh create mode 100755 ceph/src/rocksdb/build_tools/valgrind_test.sh create mode 100644 ceph/src/rocksdb/configure.ac create mode 100755 ceph/src/rocksdb/coverage/coverage_test.sh create mode 100644 ceph/src/rocksdb/coverage/parse_gcov_output.py create mode 100644 ceph/src/rocksdb/db/builder.cc create mode 100644 ceph/src/rocksdb/db/builder.h create mode 100644 ceph/src/rocksdb/db/c.cc create mode 100644 ceph/src/rocksdb/db/c_test.c create mode 100644 ceph/src/rocksdb/db/column_family.cc create mode 100644 ceph/src/rocksdb/db/column_family.h create mode 100644 ceph/src/rocksdb/db/column_family_test.cc create mode 100644 ceph/src/rocksdb/db/compaction.cc create mode 100644 ceph/src/rocksdb/db/compaction.h create mode 100644 ceph/src/rocksdb/db/compaction_picker.cc create mode 100644 ceph/src/rocksdb/db/compaction_picker.h create mode 100644 ceph/src/rocksdb/db/corruption_test.cc create mode 100644 ceph/src/rocksdb/db/db_bench.cc create mode 100644 ceph/src/rocksdb/db/db_filesnapshot.cc create mode 100644 ceph/src/rocksdb/db/db_impl.cc create mode 100644 ceph/src/rocksdb/db/db_impl.h create mode 100644 ceph/src/rocksdb/db/db_impl_debug.cc create mode 100644 ceph/src/rocksdb/db/db_impl_readonly.cc create mode 100644 ceph/src/rocksdb/db/db_impl_readonly.h create mode 100644 ceph/src/rocksdb/db/db_iter.cc create mode 100644 ceph/src/rocksdb/db/db_iter.h create mode 100644 ceph/src/rocksdb/db/db_stats_logger.cc create mode 100644 ceph/src/rocksdb/db/db_test.cc create mode 100644 ceph/src/rocksdb/db/dbformat.cc create mode 100644 ceph/src/rocksdb/db/dbformat.h create mode 100644 ceph/src/rocksdb/db/dbformat_test.cc create mode 100644 ceph/src/rocksdb/db/deletefile_test.cc create mode 100644 ceph/src/rocksdb/db/file_indexer.cc create mode 100644 ceph/src/rocksdb/db/file_indexer.h create mode 100644 ceph/src/rocksdb/db/file_indexer_test.cc create mode 100644 ceph/src/rocksdb/db/filename.cc create mode 100644 ceph/src/rocksdb/db/filename.h create mode 100644 ceph/src/rocksdb/db/filename_test.cc create mode 100644 ceph/src/rocksdb/db/internal_stats.cc create mode 100644 ceph/src/rocksdb/db/internal_stats.h create mode 100644 ceph/src/rocksdb/db/log_and_apply_bench.cc create mode 100644 ceph/src/rocksdb/db/log_format.h create mode 100644 ceph/src/rocksdb/db/log_reader.cc create mode 100644 ceph/src/rocksdb/db/log_reader.h create mode 100644 ceph/src/rocksdb/db/log_test.cc create mode 100644 ceph/src/rocksdb/db/log_writer.cc create mode 100644 ceph/src/rocksdb/db/log_writer.h create mode 100644 ceph/src/rocksdb/db/memtable.cc create mode 100644 ceph/src/rocksdb/db/memtable.h create mode 100644 ceph/src/rocksdb/db/memtable_list.cc create mode 100644 ceph/src/rocksdb/db/memtable_list.h create mode 100644 ceph/src/rocksdb/db/merge_context.h create mode 100644 ceph/src/rocksdb/db/merge_helper.cc create mode 100644 ceph/src/rocksdb/db/merge_helper.h create mode 100644 ceph/src/rocksdb/db/merge_operator.cc create mode 100644 ceph/src/rocksdb/db/merge_test.cc create mode 100644 ceph/src/rocksdb/db/perf_context_test.cc create mode 100644 ceph/src/rocksdb/db/plain_table_db_test.cc create mode 100644 ceph/src/rocksdb/db/prefix_test.cc create mode 100644 ceph/src/rocksdb/db/repair.cc create mode 100644 ceph/src/rocksdb/db/simple_table_db_test.cc create mode 100644 ceph/src/rocksdb/db/skiplist.h create mode 100644 ceph/src/rocksdb/db/skiplist_test.cc create mode 100644 ceph/src/rocksdb/db/snapshot.h create mode 100644 ceph/src/rocksdb/db/table_cache.cc create mode 100644 ceph/src/rocksdb/db/table_cache.h create mode 100644 ceph/src/rocksdb/db/table_properties_collector.cc create mode 100644 ceph/src/rocksdb/db/table_properties_collector.h create mode 100644 ceph/src/rocksdb/db/table_properties_collector_test.cc create mode 100644 ceph/src/rocksdb/db/tailing_iter.cc create mode 100644 ceph/src/rocksdb/db/tailing_iter.h create mode 100644 ceph/src/rocksdb/db/transaction_log_impl.cc create mode 100644 ceph/src/rocksdb/db/transaction_log_impl.h create mode 100644 ceph/src/rocksdb/db/version_edit.cc create mode 100644 ceph/src/rocksdb/db/version_edit.h create mode 100644 ceph/src/rocksdb/db/version_edit_test.cc create mode 100644 ceph/src/rocksdb/db/version_set.cc create mode 100644 ceph/src/rocksdb/db/version_set.h create mode 100644 ceph/src/rocksdb/db/version_set_test.cc create mode 100644 ceph/src/rocksdb/db/write_batch.cc create mode 100644 ceph/src/rocksdb/db/write_batch_internal.h create mode 100644 ceph/src/rocksdb/db/write_batch_test.cc create mode 100644 ceph/src/rocksdb/doc/doc.css create mode 100644 ceph/src/rocksdb/doc/index.html create mode 100644 ceph/src/rocksdb/doc/log_format.txt create mode 100644 ceph/src/rocksdb/doc/rockslogo.jpg create mode 100644 ceph/src/rocksdb/doc/rockslogo.png create mode 100644 ceph/src/rocksdb/hdfs/README create mode 100644 ceph/src/rocksdb/hdfs/env_hdfs.h create mode 100644 ceph/src/rocksdb/hdfs/hdfs.h create mode 100644 ceph/src/rocksdb/helpers/memenv/memenv.cc create mode 100644 ceph/src/rocksdb/helpers/memenv/memenv_test.cc create mode 100644 ceph/src/rocksdb/include/rocksdb/c.h create mode 100644 ceph/src/rocksdb/include/rocksdb/cache.h create mode 100644 ceph/src/rocksdb/include/rocksdb/compaction_filter.h create mode 100644 ceph/src/rocksdb/include/rocksdb/comparator.h create mode 100644 ceph/src/rocksdb/include/rocksdb/db.h create mode 100644 ceph/src/rocksdb/include/rocksdb/env.h create mode 100644 ceph/src/rocksdb/include/rocksdb/filter_policy.h create mode 100644 ceph/src/rocksdb/include/rocksdb/flush_block_policy.h create mode 100644 ceph/src/rocksdb/include/rocksdb/iterator.h create mode 100644 ceph/src/rocksdb/include/rocksdb/ldb_tool.h create mode 100644 ceph/src/rocksdb/include/rocksdb/memtablerep.h create mode 100644 ceph/src/rocksdb/include/rocksdb/merge_operator.h create mode 100644 ceph/src/rocksdb/include/rocksdb/options.h create mode 100644 ceph/src/rocksdb/include/rocksdb/perf_context.h create mode 100644 ceph/src/rocksdb/include/rocksdb/slice.h create mode 100644 ceph/src/rocksdb/include/rocksdb/slice_transform.h create mode 100644 ceph/src/rocksdb/include/rocksdb/statistics.h create mode 100644 ceph/src/rocksdb/include/rocksdb/status.h create mode 100644 ceph/src/rocksdb/include/rocksdb/table.h create mode 100644 ceph/src/rocksdb/include/rocksdb/table_properties.h create mode 100644 ceph/src/rocksdb/include/rocksdb/transaction_log.h create mode 100644 ceph/src/rocksdb/include/rocksdb/types.h create mode 100644 ceph/src/rocksdb/include/rocksdb/universal_compaction.h create mode 100644 ceph/src/rocksdb/include/rocksdb/version.h create mode 100644 ceph/src/rocksdb/include/rocksdb/write_batch.h create mode 100644 ceph/src/rocksdb/include/utilities/backupable_db.h create mode 100644 ceph/src/rocksdb/include/utilities/db_ttl.h create mode 100644 ceph/src/rocksdb/include/utilities/geo_db.h create mode 100644 ceph/src/rocksdb/include/utilities/stackable_db.h create mode 100644 ceph/src/rocksdb/include/utilities/utility_db.h create mode 100644 ceph/src/rocksdb/java/RocksDBSample.java create mode 100755 ceph/src/rocksdb/java/jdb_bench.sh create mode 100644 ceph/src/rocksdb/java/org/rocksdb/BackupableDB.java create mode 100644 ceph/src/rocksdb/java/org/rocksdb/BackupableDBOptions.java create mode 100644 ceph/src/rocksdb/java/org/rocksdb/BloomFilter.java create mode 100644 ceph/src/rocksdb/java/org/rocksdb/Filter.java create mode 100644 ceph/src/rocksdb/java/org/rocksdb/HashLinkedListMemTableConfig.java create mode 100644 ceph/src/rocksdb/java/org/rocksdb/HashSkipListMemTableConfig.java create mode 100644 ceph/src/rocksdb/java/org/rocksdb/HistogramData.java create mode 100644 ceph/src/rocksdb/java/org/rocksdb/HistogramType.java create mode 100644 ceph/src/rocksdb/java/org/rocksdb/Iterator.java create mode 100644 ceph/src/rocksdb/java/org/rocksdb/MemTableConfig.java create mode 100644 ceph/src/rocksdb/java/org/rocksdb/Options.java create mode 100644 ceph/src/rocksdb/java/org/rocksdb/PlainTableConfig.java create mode 100644 ceph/src/rocksdb/java/org/rocksdb/ReadOptions.java create mode 100644 ceph/src/rocksdb/java/org/rocksdb/RocksDB.java create mode 100644 ceph/src/rocksdb/java/org/rocksdb/RocksDBException.java create mode 100644 ceph/src/rocksdb/java/org/rocksdb/RocksObject.java create mode 100644 ceph/src/rocksdb/java/org/rocksdb/SkipListMemTableConfig.java create mode 100644 ceph/src/rocksdb/java/org/rocksdb/Statistics.java create mode 100644 ceph/src/rocksdb/java/org/rocksdb/TableFormatConfig.java create mode 100644 ceph/src/rocksdb/java/org/rocksdb/TickerType.java create mode 100644 ceph/src/rocksdb/java/org/rocksdb/VectorMemTableConfig.java create mode 100644 ceph/src/rocksdb/java/org/rocksdb/WriteBatch.java create mode 100644 ceph/src/rocksdb/java/org/rocksdb/WriteBatchTest.java create mode 100644 ceph/src/rocksdb/java/org/rocksdb/WriteOptions.java create mode 100644 ceph/src/rocksdb/java/org/rocksdb/benchmark/DbBenchmark.java create mode 100644 ceph/src/rocksdb/java/org/rocksdb/test/BackupableDBTest.java create mode 100644 ceph/src/rocksdb/java/org/rocksdb/test/OptionsTest.java create mode 100644 ceph/src/rocksdb/java/org/rocksdb/test/ReadOptionsTest.java create mode 100644 ceph/src/rocksdb/java/org/rocksdb/util/Environment.java create mode 100644 ceph/src/rocksdb/java/org/rocksdb/util/SizeUnit.java create mode 100644 ceph/src/rocksdb/java/rocksjni/backupablejni.cc create mode 100644 ceph/src/rocksdb/java/rocksjni/filter.cc create mode 100644 ceph/src/rocksdb/java/rocksjni/iterator.cc create mode 100644 ceph/src/rocksdb/java/rocksjni/memtablejni.cc create mode 100644 ceph/src/rocksdb/java/rocksjni/options.cc create mode 100644 ceph/src/rocksdb/java/rocksjni/portal.h create mode 100644 ceph/src/rocksdb/java/rocksjni/rocksjni.cc create mode 100644 ceph/src/rocksdb/java/rocksjni/statistics.cc create mode 100644 ceph/src/rocksdb/java/rocksjni/table.cc create mode 100644 ceph/src/rocksdb/java/rocksjni/write_batch.cc create mode 100644 ceph/src/rocksdb/linters/__phutil_library_init__.php create mode 100644 ceph/src/rocksdb/linters/__phutil_library_map__.php create mode 100644 ceph/src/rocksdb/linters/cpp_linter/ArcanistCpplintLinter.php create mode 100644 ceph/src/rocksdb/linters/cpp_linter/FbcodeCppLinter.php create mode 100644 ceph/src/rocksdb/linters/cpp_linter/PfffCppLinter.php create mode 100755 ceph/src/rocksdb/linters/cpp_linter/cpplint.py create mode 100644 ceph/src/rocksdb/linters/lint_engine/FacebookFbcodeLintEngine.php create mode 100644 ceph/src/rocksdb/m4/libtool.m4 create mode 100644 ceph/src/rocksdb/m4/ltoptions.m4 create mode 100644 ceph/src/rocksdb/m4/ltsugar.m4 create mode 100644 ceph/src/rocksdb/m4/ltversion.m4 create mode 100644 ceph/src/rocksdb/m4/lt~obsolete.m4 create mode 100644 ceph/src/rocksdb/port/README create mode 100644 ceph/src/rocksdb/port/atomic_pointer.h create mode 100644 ceph/src/rocksdb/port/likely.h create mode 100644 ceph/src/rocksdb/port/port.h create mode 100644 ceph/src/rocksdb/port/port_example.h create mode 100644 ceph/src/rocksdb/port/port_posix.cc create mode 100644 ceph/src/rocksdb/port/port_posix.h create mode 100644 ceph/src/rocksdb/port/stack_trace.cc create mode 100644 ceph/src/rocksdb/port/stack_trace.h create mode 100644 ceph/src/rocksdb/port/win/stdint.h create mode 100644 ceph/src/rocksdb/table/block.cc create mode 100644 ceph/src/rocksdb/table/block.h create mode 100644 ceph/src/rocksdb/table/block_based_table_builder.cc create mode 100644 ceph/src/rocksdb/table/block_based_table_builder.h create mode 100644 ceph/src/rocksdb/table/block_based_table_factory.cc create mode 100644 ceph/src/rocksdb/table/block_based_table_factory.h create mode 100644 ceph/src/rocksdb/table/block_based_table_reader.cc create mode 100644 ceph/src/rocksdb/table/block_based_table_reader.h create mode 100644 ceph/src/rocksdb/table/block_builder.cc create mode 100644 ceph/src/rocksdb/table/block_builder.h create mode 100644 ceph/src/rocksdb/table/block_hash_index.cc create mode 100644 ceph/src/rocksdb/table/block_hash_index.h create mode 100644 ceph/src/rocksdb/table/block_hash_index_test.cc create mode 100644 ceph/src/rocksdb/table/block_test.cc create mode 100644 ceph/src/rocksdb/table/filter_block.cc create mode 100644 ceph/src/rocksdb/table/filter_block.h create mode 100644 ceph/src/rocksdb/table/filter_block_test.cc create mode 100644 ceph/src/rocksdb/table/flush_block_policy.cc create mode 100644 ceph/src/rocksdb/table/format.cc create mode 100644 ceph/src/rocksdb/table/format.h create mode 100644 ceph/src/rocksdb/table/iter_heap.h create mode 100644 ceph/src/rocksdb/table/iterator.cc create mode 100644 ceph/src/rocksdb/table/iterator_wrapper.h create mode 100644 ceph/src/rocksdb/table/merger.cc create mode 100644 ceph/src/rocksdb/table/merger.h create mode 100644 ceph/src/rocksdb/table/meta_blocks.cc create mode 100644 ceph/src/rocksdb/table/meta_blocks.h create mode 100644 ceph/src/rocksdb/table/plain_table_builder.cc create mode 100644 ceph/src/rocksdb/table/plain_table_builder.h create mode 100644 ceph/src/rocksdb/table/plain_table_factory.cc create mode 100644 ceph/src/rocksdb/table/plain_table_factory.h create mode 100644 ceph/src/rocksdb/table/plain_table_reader.cc create mode 100644 ceph/src/rocksdb/table/plain_table_reader.h create mode 100644 ceph/src/rocksdb/table/table_builder.h create mode 100644 ceph/src/rocksdb/table/table_properties.cc create mode 100644 ceph/src/rocksdb/table/table_reader.h create mode 100644 ceph/src/rocksdb/table/table_reader_bench.cc create mode 100644 ceph/src/rocksdb/table/table_test.cc create mode 100644 ceph/src/rocksdb/table/two_level_iterator.cc create mode 100644 ceph/src/rocksdb/table/two_level_iterator.h create mode 100755 ceph/src/rocksdb/tools/auto_sanity_test.sh create mode 100644 ceph/src/rocksdb/tools/blob_store_bench.cc create mode 100644 ceph/src/rocksdb/tools/db_crashtest.py create mode 100644 ceph/src/rocksdb/tools/db_crashtest2.py create mode 100644 ceph/src/rocksdb/tools/db_repl_stress.cc create mode 100644 ceph/src/rocksdb/tools/db_sanity_test.cc create mode 100644 ceph/src/rocksdb/tools/db_stress.cc create mode 100644 ceph/src/rocksdb/tools/ldb.cc create mode 100644 ceph/src/rocksdb/tools/ldb_test.py create mode 100644 ceph/src/rocksdb/tools/reduce_levels_test.cc create mode 100644 ceph/src/rocksdb/tools/sst_dump.cc create mode 100644 ceph/src/rocksdb/util/arena.cc create mode 100644 ceph/src/rocksdb/util/arena.h create mode 100644 ceph/src/rocksdb/util/arena_test.cc create mode 100644 ceph/src/rocksdb/util/auto_roll_logger.cc create mode 100644 ceph/src/rocksdb/util/auto_roll_logger.h create mode 100755 ceph/src/rocksdb/util/auto_roll_logger_test.cc create mode 100644 ceph/src/rocksdb/util/autovector.h create mode 100644 ceph/src/rocksdb/util/autovector_test.cc create mode 100644 ceph/src/rocksdb/util/benchharness.cc create mode 100644 ceph/src/rocksdb/util/benchharness.h create mode 100644 ceph/src/rocksdb/util/benchharness_test.cc create mode 100644 ceph/src/rocksdb/util/blob_store.cc create mode 100644 ceph/src/rocksdb/util/blob_store.h create mode 100644 ceph/src/rocksdb/util/blob_store_test.cc create mode 100644 ceph/src/rocksdb/util/bloom.cc create mode 100644 ceph/src/rocksdb/util/bloom_test.cc create mode 100644 ceph/src/rocksdb/util/build_version.h create mode 100644 ceph/src/rocksdb/util/cache.cc create mode 100644 ceph/src/rocksdb/util/cache_test.cc create mode 100644 ceph/src/rocksdb/util/coding.cc create mode 100644 ceph/src/rocksdb/util/coding.h create mode 100644 ceph/src/rocksdb/util/coding_test.cc create mode 100644 ceph/src/rocksdb/util/comparator.cc create mode 100644 ceph/src/rocksdb/util/crc32c.cc create mode 100644 ceph/src/rocksdb/util/crc32c.h create mode 100644 ceph/src/rocksdb/util/crc32c_test.cc create mode 100644 ceph/src/rocksdb/util/dynamic_bloom.cc create mode 100644 ceph/src/rocksdb/util/dynamic_bloom.h create mode 100644 ceph/src/rocksdb/util/dynamic_bloom_test.cc create mode 100644 ceph/src/rocksdb/util/env.cc create mode 100644 ceph/src/rocksdb/util/env_hdfs.cc create mode 100644 ceph/src/rocksdb/util/env_posix.cc create mode 100644 ceph/src/rocksdb/util/env_test.cc create mode 100644 ceph/src/rocksdb/util/filelock_test.cc create mode 100644 ceph/src/rocksdb/util/filter_policy.cc create mode 100644 ceph/src/rocksdb/util/hash.cc create mode 100644 ceph/src/rocksdb/util/hash.h create mode 100644 ceph/src/rocksdb/util/hash_cuckoo_rep.cc create mode 100644 ceph/src/rocksdb/util/hash_cuckoo_rep.h create mode 100644 ceph/src/rocksdb/util/hash_linklist_rep.cc create mode 100644 ceph/src/rocksdb/util/hash_linklist_rep.h create mode 100644 ceph/src/rocksdb/util/hash_skiplist_rep.cc create mode 100644 ceph/src/rocksdb/util/hash_skiplist_rep.h create mode 100644 ceph/src/rocksdb/util/histogram.cc create mode 100644 ceph/src/rocksdb/util/histogram.h create mode 100644 ceph/src/rocksdb/util/histogram_test.cc create mode 100644 ceph/src/rocksdb/util/ldb_cmd.cc create mode 100644 ceph/src/rocksdb/util/ldb_cmd.h create mode 100644 ceph/src/rocksdb/util/ldb_cmd_execute_result.h create mode 100644 ceph/src/rocksdb/util/ldb_tool.cc create mode 100644 ceph/src/rocksdb/util/log_buffer.cc create mode 100644 ceph/src/rocksdb/util/log_buffer.h create mode 100644 ceph/src/rocksdb/util/log_write_bench.cc create mode 100644 ceph/src/rocksdb/util/logging.cc create mode 100644 ceph/src/rocksdb/util/logging.h create mode 100644 ceph/src/rocksdb/util/manual_compaction_test.cc create mode 100644 ceph/src/rocksdb/util/murmurhash.cc create mode 100644 ceph/src/rocksdb/util/murmurhash.h create mode 100644 ceph/src/rocksdb/util/mutexlock.h create mode 100644 ceph/src/rocksdb/util/options.cc create mode 100644 ceph/src/rocksdb/util/perf_context.cc create mode 100644 ceph/src/rocksdb/util/perf_context_imp.h create mode 100644 ceph/src/rocksdb/util/posix_logger.h create mode 100644 ceph/src/rocksdb/util/random.h create mode 100644 ceph/src/rocksdb/util/signal_test.cc create mode 100644 ceph/src/rocksdb/util/skiplistrep.cc create mode 100644 ceph/src/rocksdb/util/slice.cc create mode 100644 ceph/src/rocksdb/util/statistics.cc create mode 100644 ceph/src/rocksdb/util/statistics.h create mode 100644 ceph/src/rocksdb/util/stats_logger.h create mode 100644 ceph/src/rocksdb/util/status.cc create mode 100644 ceph/src/rocksdb/util/stl_wrappers.h create mode 100644 ceph/src/rocksdb/util/stop_watch.h create mode 100644 ceph/src/rocksdb/util/string_util.cc create mode 100644 ceph/src/rocksdb/util/string_util.h create mode 100644 ceph/src/rocksdb/util/sync_point.cc create mode 100644 ceph/src/rocksdb/util/sync_point.h create mode 100644 ceph/src/rocksdb/util/testharness.cc create mode 100644 ceph/src/rocksdb/util/testharness.h create mode 100644 ceph/src/rocksdb/util/testutil.cc create mode 100644 ceph/src/rocksdb/util/testutil.h create mode 100644 ceph/src/rocksdb/util/thread_local.cc create mode 100644 ceph/src/rocksdb/util/thread_local.h create mode 100644 ceph/src/rocksdb/util/thread_local_test.cc create mode 100644 ceph/src/rocksdb/util/vectorrep.cc create mode 100644 ceph/src/rocksdb/util/xxhash.cc create mode 100644 ceph/src/rocksdb/util/xxhash.h create mode 100644 ceph/src/rocksdb/utilities/backupable/backupable_db.cc create mode 100644 ceph/src/rocksdb/utilities/backupable/backupable_db_test.cc create mode 100644 ceph/src/rocksdb/utilities/geodb/geodb_impl.cc create mode 100644 ceph/src/rocksdb/utilities/geodb/geodb_impl.h create mode 100644 ceph/src/rocksdb/utilities/geodb/geodb_test.cc create mode 100644 ceph/src/rocksdb/utilities/merge_operators.h create mode 100644 ceph/src/rocksdb/utilities/merge_operators/put.cc create mode 100644 ceph/src/rocksdb/utilities/merge_operators/string_append/stringappend.cc create mode 100644 ceph/src/rocksdb/utilities/merge_operators/string_append/stringappend.h create mode 100644 ceph/src/rocksdb/utilities/merge_operators/string_append/stringappend2.cc create mode 100644 ceph/src/rocksdb/utilities/merge_operators/string_append/stringappend2.h create mode 100644 ceph/src/rocksdb/utilities/merge_operators/string_append/stringappend_test.cc create mode 100644 ceph/src/rocksdb/utilities/merge_operators/uint64add.cc create mode 100644 ceph/src/rocksdb/utilities/redis/README create mode 100644 ceph/src/rocksdb/utilities/redis/redis_list_exception.h create mode 100644 ceph/src/rocksdb/utilities/redis/redis_list_iterator.h create mode 100644 ceph/src/rocksdb/utilities/redis/redis_lists.cc create mode 100644 ceph/src/rocksdb/utilities/redis/redis_lists.h create mode 100644 ceph/src/rocksdb/utilities/redis/redis_lists_test.cc create mode 100644 ceph/src/rocksdb/utilities/ttl/db_ttl_impl.cc create mode 100644 ceph/src/rocksdb/utilities/ttl/db_ttl_impl.h create mode 100644 ceph/src/rocksdb/utilities/ttl/ttl_test.cc create mode 100644 ceph/src/test/Makefile-client.am create mode 100644 ceph/src/test/Makefile-server.am create mode 100644 ceph/src/test/centos-6/Dockerfile.in create mode 100644 ceph/src/test/centos-6/ceph.spec.in create mode 100755 ceph/src/test/centos-6/install-deps.sh create mode 100644 ceph/src/test/centos-7/Dockerfile.in create mode 100644 ceph/src/test/centos-7/ceph.spec.in create mode 100755 ceph/src/test/centos-7/install-deps.sh create mode 100755 ceph/src/test/ceph-disk.sh create mode 100755 ceph/src/test/ceph_objectstore_tool.py create mode 100755 ceph/src/test/cephtool-test-mds.sh create mode 100755 ceph/src/test/cephtool-test-mon.sh create mode 100755 ceph/src/test/cephtool-test-osd.sh create mode 100644 ceph/src/test/cli/crushtool/check-names.empty.crushmap.txt create mode 100644 ceph/src/test/cli/crushtool/check-names.empty.t create mode 100644 ceph/src/test/cli/crushtool/check-names.max-id.t create mode 100644 ceph/src/test/cli/crushtool/location.t create mode 100644 ceph/src/test/cli/crushtool/show-choose-tries.t create mode 100644 ceph/src/test/cli/crushtool/show-choose-tries.txt create mode 100644 ceph/src/test/cli/crushtool/straw2.t create mode 100644 ceph/src/test/cli/crushtool/straw2.txt create mode 100644 ceph/src/test/cli/crushtool/test-map-big-1.crushmap create mode 100644 ceph/src/test/common/Readahead.cc create mode 100644 ceph/src/test/common/test_bit_vector.cc create mode 100644 ceph/src/test/common/test_blkdev.cc create mode 100644 ceph/src/test/common/test_lru.cc create mode 100644 ceph/src/test/common/test_safe_io.cc create mode 100644 ceph/src/test/common/test_shared_cache.cc create mode 100644 ceph/src/test/common/test_tableformatter.cc create mode 100755 ceph/src/test/container-make-check-ubuntu-14.04.sh create mode 100755 ceph/src/test/coverage.sh rename ceph/src/test/crush/{TestCrushWrapper.cc => CrushWrapper.cc} (80%) create mode 100644 ceph/src/test/crush/crush.cc delete mode 100644 ceph/src/test/crush/indep.cc create mode 100644 ceph/src/test/debian-jessie/Dockerfile.in create mode 100755 ceph/src/test/debian-jessie/install-deps.sh create mode 100644 ceph/src/test/erasure-code/ErasureCodePluginMissingVersion.cc create mode 100644 ceph/src/test/erasure-code/TestErasureCode.cc create mode 100644 ceph/src/test/erasure-code/TestErasureCodeIsa.cc create mode 100644 ceph/src/test/erasure-code/TestErasureCodeLrc.cc create mode 100644 ceph/src/test/erasure-code/TestErasureCodePluginIsa.cc create mode 100644 ceph/src/test/erasure-code/TestErasureCodePluginLrc.cc create mode 100644 ceph/src/test/erasure-code/TestErasureCodeShec.cc create mode 100644 ceph/src/test/erasure-code/TestErasureCodeShec_all.cc create mode 100644 ceph/src/test/erasure-code/TestErasureCodeShec_thread.cc create mode 100644 ceph/src/test/erasure-code/TestJerasurePluginNEON.cc create mode 100755 ceph/src/test/erasure-code/test-erasure-code.sh create mode 100644 ceph/src/test/filestore/TestFileStore.cc create mode 100644 ceph/src/test/fs/mds_types.cc create mode 100644 ceph/src/test/librados/nlist.cc create mode 100644 ceph/src/test/librados_test_stub/LibradosTestStub.cc create mode 100644 ceph/src/test/librados_test_stub/TestClassHandler.cc create mode 100644 ceph/src/test/librados_test_stub/TestClassHandler.h create mode 100644 ceph/src/test/librados_test_stub/TestIoCtxImpl.cc create mode 100644 ceph/src/test/librados_test_stub/TestIoCtxImpl.h create mode 100644 ceph/src/test/librados_test_stub/TestMemIoCtxImpl.cc create mode 100644 ceph/src/test/librados_test_stub/TestMemIoCtxImpl.h create mode 100644 ceph/src/test/librados_test_stub/TestMemRadosClient.cc create mode 100644 ceph/src/test/librados_test_stub/TestMemRadosClient.h create mode 100644 ceph/src/test/librados_test_stub/TestRadosClient.cc create mode 100644 ceph/src/test/librados_test_stub/TestRadosClient.h create mode 100644 ceph/src/test/librados_test_stub/TestWatchNotify.cc create mode 100644 ceph/src/test/librados_test_stub/TestWatchNotify.h create mode 100644 ceph/src/test/libradosstriper/TestCase.cc create mode 100644 ceph/src/test/libradosstriper/TestCase.h create mode 100644 ceph/src/test/libradosstriper/aio.cc create mode 100644 ceph/src/test/libradosstriper/io.cc create mode 100644 ceph/src/test/libradosstriper/striping.cc rename ceph/src/test/librbd/{fsx.c => fsx.cc} (63%) create mode 100644 ceph/src/test/librbd/test_ImageWatcher.cc create mode 100644 ceph/src/test/librbd/test_ObjectMap.cc create mode 100644 ceph/src/test/librbd/test_fixture.cc create mode 100644 ceph/src/test/librbd/test_fixture.h create mode 100644 ceph/src/test/librbd/test_internal.cc create mode 100644 ceph/src/test/librbd/test_main.cc create mode 100644 ceph/src/test/librbd/test_support.cc create mode 100644 ceph/src/test/librbd/test_support.h create mode 100644 ceph/src/test/mds/TestMDSAuthCaps.cc create mode 100644 ceph/src/test/messenger/Makefile.am create mode 100644 ceph/src/test/messenger/message_helper.h create mode 100644 ceph/src/test/messenger/simple_client.cc create mode 100644 ceph/src/test/messenger/simple_dispatcher.cc create mode 100644 ceph/src/test/messenger/simple_dispatcher.h create mode 100644 ceph/src/test/messenger/simple_server.cc create mode 100644 ceph/src/test/messenger/xio_client.cc create mode 100644 ceph/src/test/messenger/xio_dispatcher.cc create mode 100644 ceph/src/test/messenger/xio_dispatcher.h create mode 100644 ceph/src/test/messenger/xio_server.cc create mode 100755 ceph/src/test/mon/misc.sh create mode 100755 ceph/src/test/mon/mkfs.sh create mode 100755 ceph/src/test/mon/mon-handle-forward.sh create mode 100755 ceph/src/test/mon/osd-crush.sh create mode 100755 ceph/src/test/mon/osd-erasure-code-profile.sh create mode 100755 ceph/src/test/mon/osd-pool-create.sh create mode 100644 ceph/src/test/mon/test-mon-msg.cc create mode 100644 ceph/src/test/msgr/test_async_driver.cc create mode 100644 ceph/src/test/msgr/test_msgr.cc create mode 100644 ceph/src/test/objectstore/ObjectStoreTransactionBenchmark.cc create mode 100644 ceph/src/test/osd/TestOSDScrub.cc create mode 100755 ceph/src/test/osd/osd-bench.sh create mode 100755 ceph/src/test/osd/osd-config.sh create mode 100755 ceph/src/test/osd/osd-copy-from.sh create mode 100755 ceph/src/test/osd/osd-scrub-repair.sh create mode 100755 ceph/src/test/pybind/test_ceph_argparse.py create mode 100755 ceph/src/test/test-ceph-helpers.sh create mode 100644 ceph/src/test/test_rbd_replay.cc delete mode 100644 ceph/src/test/testmsgr.cc create mode 100644 ceph/src/test/ubuntu-12.04/Dockerfile.in create mode 100755 ceph/src/test/ubuntu-12.04/install-deps.sh create mode 100644 ceph/src/test/ubuntu-14.04/Dockerfile.in create mode 100755 ceph/src/test/ubuntu-14.04/install-deps.sh create mode 100644 ceph/src/tools/Makefile-client.am create mode 100644 ceph/src/tools/Makefile-server.am delete mode 100644 ceph/src/tools/ceph_filestore_dump.cc delete mode 100644 ceph/src/tools/ceph_filestore_tool.cc create mode 100644 ceph/src/tools/ceph_objectstore_tool.cc create mode 100644 ceph/src/tools/cephfs/Dumper.cc rename ceph/src/{mds => tools/cephfs}/Dumper.h (79%) create mode 100644 ceph/src/tools/cephfs/EventOutput.cc create mode 100644 ceph/src/tools/cephfs/EventOutput.h create mode 100644 ceph/src/tools/cephfs/JournalFilter.cc create mode 100644 ceph/src/tools/cephfs/JournalFilter.h create mode 100644 ceph/src/tools/cephfs/JournalScanner.cc create mode 100644 ceph/src/tools/cephfs/JournalScanner.h create mode 100644 ceph/src/tools/cephfs/JournalTool.cc create mode 100644 ceph/src/tools/cephfs/JournalTool.h rename ceph/src/{mds => tools/cephfs}/MDSUtility.cc (80%) rename ceph/src/{mds => tools/cephfs}/MDSUtility.h (96%) rename ceph/src/{mds => tools/cephfs}/Resetter.cc (64%) rename ceph/src/{mds => tools/cephfs}/Resetter.h (83%) create mode 100644 ceph/src/tools/cephfs/TableTool.cc create mode 100644 ceph/src/tools/cephfs/TableTool.h create mode 100644 ceph/src/tools/cephfs/cephfs-journal-tool.cc create mode 100644 ceph/src/tools/cephfs/cephfs-table-tool.cc delete mode 100644 ceph/src/tools/common.h delete mode 100644 ceph/src/tools/dupstore.cc delete mode 100644 ceph/src/tools/mon_store_converter.cc create mode 100644 ceph/src/tracing/Makefile.am create mode 100644 ceph/src/tracing/Makefile.in create mode 100644 ceph/src/tracing/librados.tp create mode 100644 ceph/src/tracing/librbd.tp create mode 100644 ceph/src/tracing/objectstore.tp create mode 100644 ceph/src/tracing/oprequest.tp create mode 100644 ceph/src/tracing/osd.tp create mode 100644 ceph/src/tracing/pg.tp create mode 100644 ceph/src/tracing/tracing-common.h create mode 100644 debian/README.Debian create mode 100644 debian/ceph-common.lintian-overrides create mode 100644 debian/ceph-common.manpages create mode 100644 debian/ceph-fuse.lintian-overrides create mode 100644 debian/ceph-fuse.manpages create mode 100644 debian/ceph-test.lintian-overrides create mode 100644 debian/ceph.examples create mode 120000 debian/ceph.init create mode 120000 debian/ceph.rbdmap.init create mode 100644 debian/ceph.service create mode 100644 debian/clean create mode 100644 debian/etc/default/ceph create mode 100755 debian/etc/pm/sleep.d/25-ceph create mode 100755 debian/lib-systemd/system-sleep/ceph create mode 100644 debian/lib-systemd/system/ceph-create-keys.service create mode 100644 debian/lib-systemd/system/ceph-mds.service create mode 100644 debian/lib-systemd/system/ceph-mon.service create mode 100644 debian/lib-systemd/system/ceph-osd@.service create mode 100644 debian/libcephfs1.lintian-overrides create mode 100644 debian/libcephfs1.symbols create mode 100644 debian/librados2.lintian-overrides create mode 100644 debian/librados2.symbols create mode 100644 debian/libradosstriper-dev.install create mode 100644 debian/libradosstriper1.install create mode 100644 debian/libradosstriper1.symbols create mode 100644 debian/librbd1.symbols create mode 100644 debian/man/ceph-crush-location.1 create mode 100644 debian/man/mount.fuse.ceph.8 create mode 100644 debian/patches/arch.patch create mode 100644 debian/patches/ceph-osd-prestart-path.patch create mode 100644 debian/patches/fix-argparse-defaults.patch create mode 100644 debian/patches/fix-cycles-arch.patch create mode 100644 debian/patches/rbdmap3-lazyumount.patch create mode 100644 debian/patches/sample.ceph.conf.patch create mode 100644 debian/patches/sleep-recover.patch rename debian/patches/{virtualenv-never-download => virtualenv-never-download.patch} (77%) create mode 100644 debian/patches/vivid-does-systemd.patch delete mode 100644 debian/python-ceph.install create mode 100644 debian/python-cephfs.install create mode 100644 debian/python-rados.install create mode 100644 debian/python-rbd.install create mode 120000 debian/radosgw.init diff --git a/ceph/AUTHORS b/ceph/AUTHORS index 289f54bf..40a53166 100644 --- a/ceph/AUTHORS +++ b/ceph/AUTHORS @@ -1,19 +1,392 @@ -Ceph core ---------- - -Sage Weil -Yehuda Sadeh-Weinraub -Greg Farnum - -Kernel client -------------- - -Sage Weil -Patience Warnick -Yehuda Sadeh-Weinraub -Greg Farnum - -Contributors ------------- - +9seconds +Abhishek Dixit +Abhishek L +Abhishek Lekshmanan +Accela Zhao +Adam C. Emerson +Adam Crume +Adam Manzanares +Adam Spiers +Adam Twardowski +Ailing Zhang +Alan Grosskurth +Alan Somers +Alexandre Marangone +Alexandre Oliva +Alex Elder +Alexey Lapitsky +Alfredo Deza +Alfredo Deza +Ali Maredia +Allen Samuels +Alphat-PC +Anand Bhat +Andras Elso +Andreas Bluemle +Andreas Peters +Andre Noll +Andrew Bartlett +Andrew Bartlett +Andrew Farmer +Andrew Leung +Andrew Woodward +Andrey Kuznetsov +Andrey Stepachev +Andy Allan +Anols +Anton Aksola +Anton Blanchard +apovzner +Ariela +Aristoteles Neto +Armando Segnini +Ashish Chandra +atwardowski +Babu Shanmugam +Baptiste Veuillez +Bastian Blank +Benjamin Kerensa +Benoît Knecht +Billy Olsen +BJ Lougee +Bjørnar Ness +Blaine Gardner +Boris Ranto +Brandon Seibel +branto1 +Brian Chrisman +Brian Rak +Brown, David M JR +Caleb Miles +Carlos Maltzahn +carsonoid +Casey Bodley +Casey Marshall +CC Lien +Cesar Mello +Chen Baozi +Chendi Xue +Cheng Cheng +Chris Dunlop +Chris Glass +Chris Holcombe +Christian Brunner +Christian Marie +Christian Theune +Christophe Courtaut +Christopher O'Connell +Christoph Hellwig +Christos Stavrakakis +Colin Mattson +Colin P. McCabe +Dan Chai +Daniel Gollub +Daniel J. Hofmann +Dan Mick +Dan Mick +Danny Al-Gaaf +Dan van der Ster +David Anderson +David Disseldorp +David Moreau Simard +David Zafman +David Zafman +delco225 +Derek Yarnell +Derrick Schneider +Ding Dinghua +Dmitry Smirnov +Dmitry Yatsushkevich +Dmytro Iurchenko +Dominik Hannen +Dongmao Zhang +Dongsu Park +Dong Yuan +dwj192 +Eleanor Cawthon +Emily Popper +Eric Mourgaya +Erik Logtenberg +Erwin, Brock A +Esteban Molina-Estolano +Evan Felix +fangdong +Federico Gimenez +Federico Simoncelli +Feng He +Feng Wang +Filippos Giannakos +Florent Bautista +Florent Flament +Florian Haas +Francois Deppierraz +François Lafont +Frank Yu +Fred Ar +Gary Lowell +George Ryall +Gerben Meijer +git-harry +Greg Farnum +Greg Farnum +Guang G Yang +Guangliang Zhao +Guang Yang +guce +Guilhem Lettron +Haifeng Liu +Hannes Reinecke +Hannu Valtonen +Haomai Wang +Haomai Wang +Harpreet Dhillon +Hazem +Henry C Chang +Henry Chang +Herb Shiu +Hervé Rousseau +Holger Macht +Huamin Chen +Huang Jun +Ian Holsman +Ilya Dryomov +Ilya Dryomov +islepnev +James Page +James Ryan Cresawn +Jan Harkes +Janne Grunau +Jason Dillaman +Javier M. Mellid +Jenkins +Jenkins +Jens-Christian Fischer +Jerry7X <875016668@qq.com> +Jiang Heng +Jiantao He +Jian Wen +Jian Wen +Jim Schutt +João Eduardo Luís +João Eduardo Luís +Joao Eduardo Luis +Joe Buck +Johannes Erdfelt +John Spray +John Spray +Johnu George +John Wilkins +John Wilkins +Jojy George Varghese +Jonathan Davies +Jonathan Dieter +Jon Bernard +Jordi Llonch +Josef Bacik +Joseph McDonald +Josh Durgin +Josh Durgin +Josh Pieper +JP François +JuanJose 'JJ' Galvez +Kacper Kowalik +Kai Zhang +Karel Striegel +Karl Eichwalder +Kefu Chai +Kefu Chai +Ken Dreyer +Ken Dreyer +Ketor Meng +Kevin Cox +Kevin Dalley +Kevin Jones +Kim Vandry +Kuan Kai Chiu +Kun Huang +Kyle Bader +Kyle Marsh +Laszlo Boszormenyi +Laurent Barbe +Lei Dong +Liam Monahan +Li Wang +Lluis Pamies-Juarez +Loic Dachary +Loic Dachary Loic Dachary +Luis Pabón +Lukasz Jagiello +Ma Jianpeng +Marco Garcês +Marcus Sorensen +Mark Kampe +Mark Nelson +Mark Nelson +Markus Elfring +marnberg +Martin Ettl +Matt Benjamin +Matt Benjamin +Matthew Roy +Matthew Wodrich +Matt Richards +Mehdi Abaakouk +Michael McThrow +Michael Nelson +Michael Riederer +Michael Rodriguez +Michal Jarzabek +Mike Kelly +Mike Lundy +Mike Ryan +Min Chen +MingXin Liu +Mohammad Salehe +Moritz Möller +Mouad Benchchaoui +Mykola Golub +Mykola Golub +nairolf21 +Nathan Cutler +Nathan Cutler +Neil Horman +Neil Levine +Nikola Kotur +Nilamdyuti Goswami +Ning Yao +Noah Watkins +(no author) <(no author)@29311d96-e01e-0410-9327-a35deaab8ce9> +Orit Wasserman +Owen Synge +Padraig O'Sullivan +Pascal de Bruijn +Patience Warnick +Patrick McGarry +Patrick McGarry +Paul Chiang +Paul Meserve +Pavan Rallabhandi +Peter Reiher +Peter Vinson +Peter Wienemann +Pete V +Petr Machata +Pierre Rognant +qiushanggao +Radoslaw Zarzynski +Raju Kurunkad +Ray Lv +rca +renhwztetecs +riccardo80 +Riccardo Ferretti +ritz303 +Roald J. van Loon +RobertJansen1 +Robin H. Johnson +Rohan Mars +Roman Haritonov +Ron Allred +Rongze Zhu +root +Ross Turk +Ross Turk +Ruben Kerkhof +Ruifeng Yang <149233652@qq.com> +Rutger ter Borg +Sage Weil +Sage Weil +Sahid Orentino Ferdjaoui +Sam Lang +Samuel Just +Samuel Just +Sandon Van Ness +Sandon Van Ness +Scott A. Brandt +Scott Devoid +Sean Channel +Sebastien Han +Sebastien Ponce +Sharif Olorin +Shawn Edwards +shishir gowda +Shu, Xinxin +Shylesh Kumar +Simone Gotti +Simon Leinen +Somnath Roy +Sondra.Menthers +Stanislav Sedov +Stefan Eilemann +Stephan Renatus +Stephen F Taylor +Stephen Jahl +Steve MacGregor +Steve Stock +Stratos Psomadakis +Stuart Longland +Sushma Gurram +Swami Reddy +Sylvain Baubeau +Sylvain Munaut +Takeshi Miyamae +Takuya ASADA +Tamil Muthamizhan +Thomas Bechtold +ThomasCantin +Thomas Mueller +Thorsten Behrens +Thorsten Glaser +Tim Freund +Tim Serong +t-miyamae +tmuthamizhan +Tobias Florek +Tomasz Paskowski +Tom Callaway +Tommi Virtanen +topher +Travis Rhoden +Travis Rhoden +Tyler Brekke +Tyler Brekke +Vangelis Koukis +Ved-vampir +Venky Shankar +Vicente Cheng +Vikhyat Umrao +Viktor Suprun +Volker Assmann +VRan Liu +Vu Pham +Walter Huf +Wang, Yaguang +Warren Usui +Wei Luo +Wesley Spikes +Wido den Hollander +William A. Kennington III +wuxingyi +wuxingyi +Wyllys Ingersoll +Xan Peng +Xiaowei Chen +Xiaoxi Chen +Xihui He +Xing Lin +Xinze Chi +Xiong Yiliang +Yann Dupont +Yan, Zheng +Yan, Zheng +Yazen Ghannam +Yehuda Sadeh +Yehuda Sadeh +Yongyue Sun +Yuan Zhou +Yunchuan Wen +Yuri Weinstein +Zhe Zhang +Zhiqiang Wang +Zhi Zhang diff --git a/ceph/COPYING b/ceph/COPYING index a0034d58..06e20b17 100644 --- a/ceph/COPYING +++ b/ceph/COPYING @@ -17,7 +17,7 @@ License: LGPL2 or later Files: src/os/btrfs_ioctl.h Copyright: Copyright (C) 2007 Oracle. All rights reserved. -License: GPL2 +License: GPL2 (see COPYING-GPL2) Files: src/include/ceph_hash.cc Copyright: None @@ -96,12 +96,6 @@ License: FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -Files: src/test/common/Throttle.cc src/test/filestore/chain_xattr.cc -Copyright: Copyright (C) 2013 Cloudwatt -License: LGPL2 or later - Files: src/osd/ErasureCodePluginJerasure/*.{c,h} Copyright: Copyright (c) 2011, James S. Plank License: @@ -138,3 +132,12 @@ Packaging: Copyright (C) 2004-2009 by Sage Weil Copyright (C) 2010 Canonical, Ltd. Licensed under LGPL-2.1 + +File: qa/workunits/erasure-code/jquery.js + Copyright 2012 jQuery Foundation and other contributors + Released under the MIT license + http://jquery.org/license + +Files: qa/workunits/erasure-code/jquery.{flot.categories,flot}.js + Copyright (c) 2007-2014 IOLA and Ole Laursen. + Licensed under the MIT license. diff --git a/ceph/ChangeLog b/ceph/ChangeLog index e69de29b..ceb3dac6 100644 --- a/ceph/ChangeLog +++ b/ceph/ChangeLog @@ -0,0 +1,35899 @@ +9764da5 (HEAD, tag: v0.94.5) 0.94.5 +250dc07 osd/ReplicatedPG: remove stray debug line +d3abcbe librbd: potential assertion failure during cache read +991d0f0 tests: reproduce crash during read-induced CoW +51f3d6a qa: Use public qemu repo +9529269 (tag: v0.94.4) 0.94.4 +b203979 use git://git.ceph.com +0f4ef19 qa: http://ceph.com/qa -> http://download.ceph.com/qa +294f016 (origin/wip-13227-hammer) init-radosgw.sysv: remove +698d75c (origin/wip-13410-hammer) tests: robust test for the pool create crushmap test +2a28114 (origin/wip-13401-hammer) crush/CrushTester: test fewer inputs when running crushtool +abc5b5f tests: update to match crushmap validation message +25bd277 mon/OSDMonitor: fix crush injection error message +6635530 mon/OSDMonitor: only test crush ruleset for the newly created pool +cc1fedd crush/CrushTester: allow testing by ruleset +3228161 qa/workunits/cephtool/test.sh: don't assume crash_replay_interval=45 +ad83304 rgw:add --reset-regions for regionmap update +7de65e7 rgw : setting max number of buckets for users via ceph.conf option +297c04d rgw: init_rados failed leads to repeated delete +4b0686f rgw: delete finisher only after finalizing watches +6119b15 rgw: be more flexible with iso8601 timestamps +607904e init-radosgw: specify pid file to start-stop-daemon +f51ab26 rgw: fix radosgw start-up script. +544a98f init-radosgw: unify init-radosgw[.sysv] +2a733e9 init-radosgw: look in /var/lib/ceph/radosgw +d00c52b doc: rgw: fix typo in comments +eb001d3 rgw: init script waits until the radosgw stops +9ab9c44 rgw: don't read actual data on user manifest HEAD +9026c4a doc: remove mention of ceph-extra as a requirement +45ed24d doc: remove ceph-extras +faccdce doc: correct links to download.ceph.com +e9f4aec doc: Added "Hammer" in the list of major releases. +424fc1c rgw: set default value for env->get() call +e72bdc3 osd/ReplicatedPG: tolerate promotion completion with stopped agent +a3afb3f rgw: remove trailing :port from host for purposes of subdomain matching +77cb503 (origin/wip-13015-hammer) rgw: preserve all attrs if intra-zone copy +b9f2ed3 rgw: don't preserve acls when copying object +b3822f1 upstart: limit respawn to 3 in 30 mins (instead of 5 in 30s) +0d6a8c6 Pipe: Drop connect_seq increase line +4be8a28 osd/PG: peek_map_epoch: skip legacy PGs if infos object is missing +f237ed9 osd: allow peek_map_epoch to return an error +3a50b90 crypto: fix unbalanced ceph::crypto::init/ceph::crypto:shutdown +0a5b856 ReplicatedPG,Objecter: copy_get should include truncate_seq and size +82ea02a rgw: fix assignment of copy obj attributes +3b2affc rgw: add delimiter to prefix only when path is specified +9f69660 tests: tiering agent and proxy read +5656eec osd: trigger the cache agent after a promotion +dc693fc lockdep: allow lockdep to be dynamically enabled/disabled +805732b tests: librbd API test cannot use private md_config_t struct +7ac0173 tests: ensure old-format RBD tests still work +b68d757 librados_test_stub: implement conf get/set API methods +f0fa637 crypto: use NSS_InitContext/NSS_ShutdownContex to avoid memory leak +3f542aa auth: use crypto_init_mutex to protect NSS_Shutdown() +e487e8e auth: reinitialize NSS modules after fork() +00e73ad librbd: prevent race condition between resize requests +6c4ccc8 librbd: Add a paramter:purge_on_error in ImageCtx::invalidate_cache(). +0573491 librbd: Remvoe unused func ImageCtx::read_from_cache. +28838f2 osdc: clean up code in ObjectCacher::Object::map_write +5c4f152 osdc: Don't pass mutex into ObjectCacher::_wait_for_write. +86e7698 osdc: After write try merge bh. +c96541a osdc: Make last missing bh to wake up the reader. +4135b9a osdc: For trust_enoent is true, there is only one extent. +81376b6 osdc: In _readx() only no error can tidy read result. +e80bd0a (origin/wip-12859-hammer-loic) rgw: send Content-Length in response for GET on Swift account. +2e54245 rgw: force content_type for swift bucket stats request +5d57b63 rgw: we should not overide Swift sent content type +b8aafbc rgw: enforce Content-Type in Swift responses. +143cfc3 rgw: force content-type header for swift account responses without body +b5420d6 rgw: shouldn't return content-type: application/xml if content length is 0 +836f763 OSD: break connection->session->waiting message->connection cycle +77624af osd/PGLog: dirty_to is inclusive +aa00373 common: fix code format +aab35da test: add test case for insert empty ptr when buffer rebuild +2b0b7ae common: fix insert empty ptr when bufferlist rebuild +2348a5b osd: copy the RecoveryCtx::handle when creating a new RecoveryCtx instance from another one +bf72785 config: skip lockdep for intentionally recursive md_config_t lock +c94fd92 osd: Keep a reference count on Connection while calling send_message() +059bf98 WBThrottle::clear_object: signal if we cleared an object +a478385 ceph-disk: always check zap is applied on a full device +e471c5d librados: Make librados pool_create respect default_crush_ruleset +35fa47a (origin/wip-corpus-hammer) ceph-object-corpus: add 0.94.2-207-g88e7ee7 hammer objects +b80859e (origin/wip-11455-hammer) rgw: init some manifest fields when handling explicit objs +f47ba4b mon: test the crush ruleset when creating a pool +b58cbba erasure-code: set max_size to chunk_count() instead of 20 for shec +6f0af18 vstart.sh: set PATH to include pwd +da00bed rgw: rework X-Trans-Id header to be conform with Swift API. +9937c81 Transaction Id added in response +f1c7c62 rgw: api adjustment following a rebase +85911df rgw: orphans, fix check on number of shards +c1cf7df rgw: orphans, change default number of shards +bb1d4cc rgw: change error output related to orphans +2e0f6fe rgw: orphan, fix truncated detection +1bfebef radosgw-admin: simplify orphan command +f244b15 radosgw-admin: stat orphan objects before reporting leakage +f80e2b2 radosgw-admin: orphans finish command +88d32c6 rgw: cannot re-init an orphan scan job +80a4034 rgw: stat_async() sets the object locator appropriately +0082036 rgw: list_objects() sets namespace appropriately +1c37072 rgw: modify orphan search fingerprints +ef81367 rgw: compare oids and dump leaked objects +f4d0544 rgw: keep accurate state for linked objects orphan scan +748ea57 rgw: iterate over linked objects, store them +6c6aa5d rgw: add rgw_obj::parse_raw_oid() +62d562d rgw: iterate asynchronously over linked objects +00ecf2d rgw: async object stat functionality +7d1cc48 rgw-admin: build index of bucket indexes +c1b0e7a rgw: initial work of orphan detection tool implementation +b16129c Avoid an extra read on the atomic variable +1f6916d RGW: Make RADOS handles in RGW to be a configurable option +a13c7fd rgw:the arguments 'domain' should not be assigned when return false +6acf36f rgw:segmentation fault when rgw_gc_max_objs > HASH_PRIME +6b36514 rgw: avoid using slashes for generated secret keys +8ba6b2f rgw: url encode exposed bucket +0bc909e (origin/wip-12638-hammer) mon: add a cache layer over MonitorDBStore +bee8666 Objecter: pg_interval_t::is_new_interval needs pgid from previous pool +b5418b9 osd_types::is_new_interval: size change triggers new interval +f028389 (origin/liewegas-wip-hammer-feature-hammer) include/ceph_features: define HAMMER_0_94_4 feature +95cefea (tag: v0.94.3) 0.94.3 +81a311a (origin/hammer-12709) Workunits : fs/misc/chmod.sh : Include ACL characters in permission check. +153744d (origin/wip-12682-hammer) tests: increase test coverage for partial encodes/decodes +fca7876 common: bit_vector extent calculation incorrect for last page +3396a96 osd/OSDMap: handle incrementals that modify+del pool +3ab5d82 (origin/wip-12432-hammer) rgw: set http status in civetweb +10a0383 civetweb: update submodule to support setting of http status +00d802d hobject_t: fix get_boundary to work with new sorting regime +9b91adc (origin/wip-osd-compat-hammer) mon: disallow post-hammer OSDs if there are up pre-hammer OSDs +8a559c1 include/ceph_features: define MON_METADATA feature +4faa8e0 (origin/wip-12577-hammer) osd: include newlines in scrub errors +455eb2a osd: fix condition for loggin scrub errors +67e7946 osd: fix fallback logic; move into be_select_auth_object +0f57c70 osd: log a scrub error when we can't pick an auth object +d4f4c5c osd: repair record digest if all replicas match but do not match +acfed6b osd: move recorded vs on disk digest warning into be_compare_scrubmaps +674029b osd: be slightly paranoid about value of okseed +f2002b7 osd: be precise about "known" vs "best guess" +4e5d146 osd: record digest if object is clean (vs entire scrub chunk) +1357ed1 hobject_t: decode future hobject_t::get_min() properly +6d01d6b OSDMonitor::preprocess_get_osdmap: send the last map as well +2ecb3b7 Fh ref count will leak if readahead does not need to do read from osd +4c199bf (origin/wip-11998-hammer) debian/control: ceph-common (>> 0.94.2) must be >= 0.94.2-2 +a785193 ceph.spec.in: drop SUSE-specific %py_requires macro +8804b3f ceph.spec.in: remove SUSE-specific apache2-mod_fcgid dependency +b575ecc (origin/wip-12236-hammer) tests: verify that image shrink properly handles flush op +d4eb7bd librbd: invalidate cache outside cache callback context +92272dd (origin/wip-12235-hammer) librbd: don't cancel request lock early +58ae92f tests: new test for transitioning exclusive lock +7b21ccb tests: verify that librbd will periodically resend lock request +c95b37f common: Mutex shouldn't register w/ lockdep if disabled +117205a librbd: improve debugging output for ImageWatcher +08ae012 librados_test_stub: watcher id should be the instance id (gid) +704c0e0 librbd: retry lock requests periodically until acquired +dbaaed9 librbd: don't hold owner_lock for write during flush +e971820 (origin/wip-12345-hammer) lockdep: do not automatically collect all backtraces +27f7042 librbd: flush operations need to acquire owner lock +5b39983 librbd: avoid infinite loop if copyup fails +88b583b librbd: flush pending ops while not holding lock +a88b180 tests: fix possible deadlock in librbd ImageWatcher tests +321eb8d tests: enable lockdep for librbd unit tests +bfe5b90 librbd: owner_lock should be held during flush request +1e84fb0 osdc: ObjectCacher flusher might needs additional locks +506a45a librbd: fix recursive locking issues +acf5125 librbd: simplify state machine handling of exclusive lock +9454f04 librbd: ObjectMap::aio_update can acquire snap_lock out-of-order +3e0358e librbd: move copyup class method call to CopyupRequest +2ee64a8 librbd: simplify AioRequest constructor parameters +3e71a75 librbd/AioRequest.h: fix UNINIT_CTOR +cb57fe5 librbd: add object state accessor to ObjectMap +9249ab7 librbd: AsyncObjectThrottle should always hold owner_lock +26902b9 librbd: execute flush completion outside of cache_lock +571220d librbd: add AsyncRequest task enqueue helper method +8e280f4 librbd: disable lockdep on AioCompletion +b38da48 librbd: AioCompletion shouldn't hold its lock during callback +6fdd3f1 librbd: give locks unique names to prevent false lockdep failures +7004149 librbd: complete cache read in a new thread context +65ef695 librbd: require callers to ObjectMap::aio_update to acquire lock +58b8faf log: fix helgrind warnings regarding possible data race +a5203d3 librados_test_stub: fix helgrind warnings +b73e87e librados_test_stub: add support for flushing watches +2fa35b1 common: lockdep now support unregistering once destructed +7b85c7b common: add valgrind.h convenience wrapper +6d3db5f librbd: add work queue for op completions +64425e8 WorkQueue: ContextWQ can now accept a return code +eccf369 packaging: RGW depends on /etc/mime.types +e19f928 (origin/wip-12502-hammer) rgw: conversion tool to fix broken multipart objects +28d32f6 rgw: only scan for objects not in namespace +e22e2b4 rgw_admin: add --remove-bad flag to bucket check +7bddf5d rest_bench: bucketname is not mandatory as we have a default name +6e7358b rest_bench: drain the work queue to fix a crash Fixes: #3896 Signed-off-by: huangjun +1e05578 auth: check return value of keyring->get_secret +256620e Client: check dir is still complete after dropping locks in _readdir_cache_cb +8a2ad05 TestPGLog: fix invalid proc_replica_log test caes +df71e6b TestPGLog: fix noop log proc_replica_log test case +549ff9a TestPGLog: add test for 11358 +c224fc7 PGLog::proc_replica_log: handle split out overlapping entries +b8176d0 Mutex: fix leak of pthread_mutexattr +43a72e4 mon/PGMonitor: bug fix pg monitor get crush rule +0ca93db mon: ceph osd map shows NONE when an osd is missing +695f782 crush/CrushWrapper: fix adjust_subtree_weight debug +0bd4c81 crush/CrushWrapper: return changed from adjust_subtree_weight +05fc59b crush/CrushWrapper: adjust subtree base in adjust_subtree_weight +d2f31ad unittest_crush_wrapper: test adjust_subtree_weight +0ccdf34 unittest_crush_wrapper: attach buckets to root in adjust_item_weight test +1e73753 unittest_crush_wrapper: parse env +cd11b88 osd: pg_interval_t::check_new_interval should not rely on pool.min_size to determine if the PG was active +c5f0e22 osd: Move IsRecoverablePredicate/IsReadablePredicate to osd_types.h +42bff0b mon: OSDMonitor: fix hex output on 'osd reweight' +e004941 ceph.in: print more detailed warning for 'ceph tell' +f18900f ceph.in: print more detailed error message for 'tell' command +9916d37 mon/PGMonitor: avoid uint64_t overflow when checking pool 'target/max' status. Fixes: #12401 +4457d3e Update OSDMonitor.cc +add0f1e ceph.in: do not throw on unknown errno +fa19474 os/chain_xattr: handle read on chnk-aligned xattr +931ffe3 common/Cycles.cc: skip initialization if rdtsc is not implemented +0fde3a2 buffer: Fix bufferlist::zero bug with special case +dabc611 UnittestBuffer: Add bufferlist zero test case +d08db7a (origin/wip-11470.hammer) mon: PaxosService: call post_refresh() instead of post_paxos_update() +154f18c (origin/wip-12465-hammer) Log::reopen_log_file: take m_flush_mutex +b872882 (origin/wip-12237-hammer) librados_test_stub: read op should return number of bytes read +7d9fce3 tests: fixed TestObjectMap.InvalidateFlagInMemoryOnly +4a77be0 librbd: don't attempt to invalidate an object map in R/O mode +0aea70f tests: add new unit tests for object map invalidation +c732cb8 librbd: move object map codes to common location +27c99ea librbd: only update image flags when holding exclusive lock +ef45363 librbd: new ImageWatcher::is_lock_supported method +e4b55b3 Fixes: #12286 radosgw-admin: after subuser modify print only once user info. +9458b84 rgw: fix ListParts response +2357b6c rgw: If the client sends a Connection: close header respond accordingly. +f819332 ceph.spec.in: install 95-ceph-osd.rules, mount.ceph, and mount.fuse.ceph properly on SUSE +d8733be debian: move ceph_argparse into ceph-common +f99f312 (origin/wip-12384-hammer) test: potential memory leak in FlushAioPP +a4fc63a pybind: fix valgrind warning on rbd_get_parent_info call +aa3eb28 osdc: invalid read of freed memory +18ede75 krbd: fix incorrect types in the krbd API +488578c fsx: cleanup crypto library at exit +97ff6cb tests: add run-rbd-valgrind-unit-tests.sh +e690907 valgrind: update valgrind suppressions for lttng-ust +fe013e0 librbd: TaskFinisher should finish all queued tasks +43cd3ac tests: fix valgrind errors with librbd unit test +5d8d6a1 tests: librbd should release global data before exit +13f926e librados_test_stub: cleanup singleton memory allocation +1063f52 PG::find_best_info: ignore info.les for incomplete peer +7132277 Conditional-compile against minimal tcmalloc. +0818e9f ceph.spec.in: snappy-devel for all supported distros +8b576bd ceph.spec.in: python-argparse only in Python 2.6 +ad5745b OSD: add command_wq suicide timeout +059a579 OSD: add remove_wq suicide timeout +b8826bc OSD: add scrub_wq suicide timeout +878dd40 OSD: add snap_trim_wq suicide timeout +1157583 OSD: add recovery_wq suicide timeout +a82b450 OSD: add op_wq suicide timeout +89aa8ff (origin/wip-11833-hammer) mon: add an "osd crush tree" command +03c07d7 librbd: assertion failure race condition if watch disconnected +5c812c1 librbd: prevent object map updates from being interrupted +e50caab rgw: fix empty json response when getting user quota +ec70533 rgw: error out if frontend did not send all data +557865c rgw: fix reset_loc() +b1618a9 rgw: fix lack of account name in XML listing of Swift account. +e39dce7 rgw: generate the "Date" HTTP header for civetweb. +a5dbcbb Swift: Set Content-Length when requesting/checking Keystone tokens +cdde626 ceph.spec.in: do not run fdupes, even on SLE/openSUSE +3c8cdea client: reference counting 'struct Fh' +c78cc00 rgw: rectify 202 Accepted in response for PUT on existing bucket. +6417e8e rpm: add missing Java conditionals +3728477 Add rpm conditionals : cephfs_java +8f78001 ceph.spec.in: SUSE/openSUSE builds need libbz2-devel +4eb58ad ceph.spec.in: use _udevrulesdir to eliminate conditionals +7f1c0cc crush/CrushTester: return EINVAL if crushtool returns non-zero +2aaeea1 tests: TEST_crush_reject_empty must not run a mon +80afb81 ceph-helpers: implement test_expect_failure +6b5e9a1 tests: display the output of failed make check runs +5141301 (origin/wip-11975-hammer) mon: add "--check" to CrushTester::test_with_crushtool() +5ec27cf crushtool: rename "--check-names" to "--check" +2a8fe88 mon: check the new crush map against osdmap.max_osd +c0b0f52 crushtool: enable check against max_id +f041bbe crush/CrushTester: check if any item id is too large +cc1cc03 mon: validate new crush for unknown names +ff29a7f crushtool: add the "--check-names" option +960ea49 crush/CrushTester: add check_name_maps() method +5e72479 (origin/wip-12021-hammer) OSDMonitor: allow addition of cache pool with non-empty snaps with config +ecac1a4 Always provide summary for non-healthy cluster +1a32379 mon/PGMap: add more constness +84ebc3d mon/PGMap: sort pg states by the states in "pg ls" spec +e310461 mon: s/recovery/recoverying/ in "pg ls*" commands' spec +524f4a5 mon: always reply mdsbeacon +413e407 mon/MDSMonitor: rename labels to a better name +a03968a mon: send no_reply() to peon to drop ignored mdsbeacon +39f3459 mon: remove unnecessary error handling +0e5e7e1 mon: remove unused variable +7034720 ReplicatedPG::finish_promote: handle results->snaps is empty case +3e44dc1 ReplicatedPG::finish_promote: fix snap promote head snaps +5ef0846 tools: chunk reads in Dumper +408880b qa: update to newer Linux tarball +56c2688 rgw: simplify content length handling +d9bbef3 rgw: make compatability deconfliction optional. +0260abd rgw: improve content-length env var handling +8abc46a rgw: fix data corruption when race condition +89d0266 (origin/wip-fix-doc-hammer) doc: add the corresponding @endcond command for @cond +2aa77b3 doc: remove orphan: directive in ceph-create-keys.rst +ad66e40 doc: let doxygen ignore src/tracing +356bd2c (origin/wip-11806-hammer) debian: ceph-dbg steals ceph-objectstore-tool from ceph-test-dbg (take 2) +c5c627f rgw/logrotate.conf: Rename service name +582cf73 (origin/wip-12109-hammer, origin/wip-12109) tests: add librbd watch/notify version compatibility test +43b9aef qa/workunits/rbd: add notify_master/slave bootstrap scripts +f995fb5 qa/workunits/rbd: add new test_librbd_api workunit +a09da2a tests: create librbd API-only integration test suite +e149916 Increase max files open limit for OSD daemon. +22f58ce Makefile: install ceph-post-file keys with mode 600 +3e65a10 ceph-post-file: improve check for a source install +c1f6743 ceph-post-file: behave when sftp doesn't take -i +38d36b1 packaging: move SuSEfirewall2 templates out of src +24bc9f2 packaging: add SuSEfirewall2 service files +8acfb99 Bug fix to ceph systemV compatability script. +bd3fd92 Fixes to rcceph script +37d77d3 Increase max files open limit for OSD daemon. +78d894a qa/workunits/rados/test-upgarde-v9.0.1: fix exclude syntax +3e8d60a qa/workunits/rados/test-upgrade-v9.0.1: skip one more evict test +348a3d3 qa: add compatibility filtered rados api tests for upgrades +f68bf94 (origin/wip-11493-hammer) OSDMonitor: disallow ec pools as tiers +13c8d58 mon: prevent pool with snapshot state from being used as a tier +58e6266 test/librados/tier.cc: destroy and recreate cache pool on every test +3db1026 doc/release-notes: v0.94.2 +ed5442b (origin/wip-11770-hammer) tests: verify librbd blocking aio code path +20e1048 librbd: new rbd_non_blocking_aio config option +b4571b3 PendingReleaseNotes: document changes to librbd's aio_read methods +9ea1edd librbd: AioRequest::send no longer returns a result +272df2a tests: update librbd AIO tests to remove result code +dd2e4c1 librbd: internal AIO methods no longer return result +dbd4e29 Throttle: added pending_error method to SimpleThrottle +7df6091 librbd: add new fail method to AioCompletion +cf6e1f5 librbd: avoid blocking AIO API methods +e61974a librbd: add task pool / work queue for requests +5fb8561 (tag: v0.94.2) 0.94.2 +bfb1442 ReplicatedPG::release_op_ctx_locks: requeue in scrub queue if blocked +c7b6a63 ReplicatedPG::finish_ctx: take excl lock if operation is rw +1550a56 RadosModel: randomly prefix delete with assert_exists +4cdc5f7 RadosModel: assert exists on subsequent writes +25c730b test/librados/snapshots.cc: add test for 11677 +3d74164 ReplicatedPG::trim_object: write filtered snapset while we're at it +a116154 ReplicatedPG: start_flush: use filtered snapset +82988d6 ceph-disk: support NVMe device partitions +bd91fb0 mon: prevent bucket deletion when referenced by a rule +56565ee crush: fix crash from invalid 'take' argument +1440122 common/config: detect overflow of float values +9b947fa common/config: detect overflow of int values +d723e11 mds: clear CDir::STATE_REJOINUNDEF after fetching dirfrag +54f4e7d rgw: Use attrs from source bucket on copy +9dfef60 rgw: always check if token is expired +fdb43eb ceph.spec.in: tweak ceph-common for SUSE/openSUSE +ba1a016 admin/build-doc: fix dependency checks +5a60a03 (origin/wip-4846) man/ceph-create-keys.8: add missing file +19305b8 doc: add ceph-create-keys.8 +ffd0933 WorkQueue: added virtual destructor +a28adfb WorkQueue: add new ContextWQ work queue +1a321e4 rgw: Do not enclose the Bucket header in quotes +968573b debian: ceph-dbg steals ceph-objectstore-tool from ceph-test-dbg +a62c3aa ceph.in: handle unknown Exception correctly +cc7f744 ceph.in: improve the interactive mode +eb26388 ceph.in: parse quote correctly in interactive mode +344328d (origin/wip-11733-hammer) debian: set rest-bench-dbg ceph-test-dbg dependencies +293affe (origin/wip-11622-hammer) rgw: merge manifests correctly when there's prefix override +a43d248 rgw: restore buffer of multipart upload after EEXIST +558d639 json_sprit: fix the FTBFS on old gcc +678b3e6 json_spirit: use utf8 intenally when parsing \uHHHH +ef6641c ceph.spec: update OpenSUSE BuildRequires +0b6d442 (origin/wip-hammer-11535-admin-socket) common/admin_socket: close socket descriptor in destructor +95818da (origin/wip-hammer-package-perf-objectstore) packaging: include ceph_perf_objectstore +6e2dd40 (origin/hammer-uclient-checking) client: fix error handling in check_pool_perm +3c2e6ae client: use SaferCond in check_pool_perm +79b2ac2 client: check OSD caps before read/write +c548d8d tests: ceph-helpers kill_daemons fails when kill fails +fb10594 Added a "ceph hello world" for a simple check for ceph-deploy qa suite +46a4e8a packaging: mv ceph-objectstore-tool to main ceph pkg +f4a0dab rgw: send Content-Length in response for HEAD on Swift account. +32f4a74 rgw: send Content-Length in response for DELETE on Swift container. +d39a660 rgw: send Content-Length in response for PUT on Swift container. +02a3813 (origin/wip-11370-hammer) librbd: flatten should return -EROFS if image is read-only +af8939b librbd: allow snapshots to be created when snapshot is active +d21c0c0 librbd: better handling for duplicate flatten requests +ec0bd1d librbd: use generic helper for issuing async requests +8a6e6e4 OSD: handle the case where we resurrected an old, deleted pg +efbfe6f rgw: improve metadata handling on copy operation of Swift API. +d164d80 rgw: quota not respected in POST object +7f2a9ed rgw: fix handling empty metadata items on Swift container. +8e6efdb rgw: send Content-Length in response for GET on Swift container. +54b6290 rgw: enable end_header() to handle proposal of Content-Length. +c87aa11 rgw: Swift API. Complement the response to "show container details" +2cb5d60 rgw: enforce Content-Length in response for POST on Swift cont/obj. +d2043a5 rgw: send Last-Modified header in response for PUT on Swift object. +4d1f3f0 rgw: don't use rgw_socket_path if frontend is configured +3aef0f2 rgw: update keystone cache with token info +3edb196 civetweb: update max num of threads +bc6eb8d rgw: improve code formatting ONLY. +7aa1ae6 rgw: send X-Copied-From-Last-Modified header of Swift API. +150b9e2 rgw: dump object metadata in response for COPY request of Swift API. +e749701 rgw: refactor dumping metadata of Swift objects. +b034511 rgw: add support for X-Copied-From{-Account} headers of Swift API. +c9e6a0b rgw: send ETag, Last-Modified in response for copying Swift cobject. +7f41ff0 rgw: Swift API. Allows setting attributes with COPY object operation. +2f86995 rgw: improve format of X-Timestamp on Swift objects. +48b1981 rgw: add support for X-Timestamp on Swift containers. +893ffd3 tests: AioCompletion incorrectly freed +96b0db5 librbd: update ref count when queueing AioCompletion +0944051 librbd: failure to update the object map should always return success +7ee7dcf tests: librados_test_stub reads should deep-copy +113f3b1 mon: Total size of OSDs is a maginitude less than it is supposed to be. +6a04b55 Fix "disk zap" sgdisk invocation +8996907 osd: refuse to write a new erasure coded object with an offset > 0 +bc51476 ceph_json: add decode / encoder for multimap +7c7e651 cls_rgw: use multimap to keep pending operations in bucket index +cb75713 rgw: generate new tag for object when setting object attrs +7387c43 java: libcephfs_jni.so is in /usr/lib64 on rhel +856b2fa (origin/hammer-next) rgw-admin: a tool to fix object locator issue +512ae4c rgw: set a special object locator if object starts with underscore +da4d227 rgw: use correct oid when creating gc chains +4e84f31 rgw: civetweb should use unique request id +4789686 Move ceph-dencoder build to client +7eabb70 Rework mds/Makefile.am to support a dencoder client build +da7f683 Add support for PPC architecture, provide fallback +3001fad Fix clear_pipe after reaping progress +379ef71 rgw : Issue AIO for next chunk first before flush the (cached) data. +b903ad2 rgw/Makefile.am: Populate DENCODER_SOURCES properly +f994483 Dencoder should never be built with tcmalloc +8709e34 ceph-disk: more robust parted output parser +8d9f4d4 osdc: add epoch_t last_force_resend in Op/LingerOp. +2f34d2e rgw: do not pre-fetch data for HEAD requests +c6edc16 rgw - make starting quota/gc threads configurable +c615972 librbd: ImageWatcher should cancel in-flight ops on watch error +0e6a032 librbd: moved snap_create header update notification to initiator +2864da8 librbd: updated cache max objects calculation +0cdc93f librbd: acquire cache_lock before refreshing parent +a1b4aeb librados_test_stub: AIO operation callbacks should be via Finisher +3a58e30 (origin/hammer-11482) mds: remove caps from revoking list when caps are voluntarily released +f30fa4a (origin/wip-11453-hammer-rgw-init-as-root) init-radosgw: run RGW as root +0ee022b osd/ReplicatedPG: don't check order in finish_proxy_read +8a58d83 Fix ceph_test_async_driver failed +85a68f9 rgw: remove meta file after deleting bucket The meta file is deleted only if the bucket meta data is not synced +51f5763 release-notes: backport Hammer release notes +e4bfad3 (tag: v0.94.1) 0.94.1 +5ca771a crush: fix has_v4_buckets() +33e79ab crush: fix dump of has_v4_buckets +bd0ec49 bug fix: test case for lfn index +b5921d5 crush/mapper: fix divide-by-0 in straw2 +93c8f43 osd: fix negative degraded objects during backfilling +e61c4f0 (tag: v0.94) 0.94 +4347a32 debian: remove lttng checking from rules +57d2781 (origin/wip-11113-hammer) librbd: snap_remove should ignore -ENOENT errors +572a2f5 librbd: get_parent_info should protect against invalid parent +0b2e272 ReplicatedPG::cancel_pull: requeue waiters as well +23efab7 ReplicatedPG: don't write hitset while scrubbing, update scrub_cstat +85307b9 ReplicatedPG: in do_op, requeue op if we requeue waiters in agent_choose_mode +b1f078b ReplicatedPG: requeue waiting_for_active before waiting_for_cache_not_full +b0a3941 ReplicatedPG::promote_object: do not create obc if not promoting +bdc664f ECTransaction: write out the hinfo key on touch as well +8e5d4c6 osd: drop unused utime_t now arg to issue_repop +8db4056 osd: do not update mtime when recording digest +491474f test: Add testing for PGLog::filter_log() +1fcd3fb osd: Create a filter_log for PGLog +c751191 ceph-objectstore-tool, osd: Filter the pg_log_t for objects no longer in pg +ccc0839 (origin/wip-11177) common: send cluster log messages to 'cluster' channel by default +f9b98c9 ceph-objectstore-tool: Fix message and make it debug only to stderr +923d532 ceph-objectstore-tool: Remove bogus comment and eliminate a debug message +c176ebf (origin/wip-move-code) osd/: Move ReplicatedBackend methods into ReplicatedBackend.cc +e9d6096 ReplicatedPG: remove unused C_OnPushCommit +ddf0292 PG: set/clear CREATING in Primary state entry/exit +6f218b1 (origin/hammer-11205) qa/workunits/fs/misc: fix filelock_interrupt.py +1388d6b ReplicatedPG: trim backfill intervals based on peer's last_backfill_started +924ace8 (origin/wip-11145) rgw: shut down timer before erroring out +65bb4df ReplicatedPG::promote_object: check scrubber and block if necessary +78c5de7 osd/: s/is_degraded_object/is_degraded_or_backfilling_object +4a5bd05 Revert "osd/: update peer_missing and local missing if we write a degraded object" +6ed86b4 Revert "append_log: use remove_snap_mapped_object" +b84943c Revert "osd/: don't block writes on degraded objects" +9cefc59 Revert "ReplicatedPG: block writes on degraded objects for ec pools" +45bff59 Revert "Merge pull request #3641 from athanatos/wip-10731" +6f23d34 Revert "osd/: s/is_degraded_object/is_degraded_or_backfilling_object" +fc3ce48 (origin/wip-hammer-rgw) rgw: update makefile to enable civetweb config +2f1342e civetweb: update submodule +e5f3282 rgw: pass civetweb configurables to civetweb +a8ced2c rgw: don't overwrite bucket / object owner when setting acls +3edfa67 Revert "ReplicatedPG: only allow a degraded write if we have at least min_size copies" +5e4b7b0 Revert "Merge pull request #3911 from athanatos/wip-11057" +0a0d8f6 doc: Regenerate man/ceph.8 based on ceph.rst changes +eb890b1 doc: Break ceph osd pool get into sections based on pool type +b6512eb erasure code: add shec's documentation / change default layout +175aff8 ceph-objectstore-tool: Use exit status 11 for incompatible import attempt +68719f5 (origin/wip-omap-clear) osd: fix omap digest clearing for omap write ops +d5b3bd7 os/MemStore: make omap_clear zap the omap header too +d2467e4 ceph_test_rados_api_aio: verify omap_clear clears header, too +5b23f5b ceph-objectstore-tool: Output only unsupported features when incomatible +477ac92 (origin/wip-11102) osd: only complain about stored vs actual digest if all peers support it +9a2ff34 PG::find_best_info: reject infos with old last_epoch_started +f96d58b init-radosgw*: don't require rgw_socket_path to be defined +0712d8d PG: ensure that info.last_epoch_started only increases +2956ae2 doc: add last_epoch_started.rst +2da9584 PG: make sure to update history.last_epoch_started with first write +0d52aca osd: erasure-code-profile incremental rm before set +b92f9cf mon: informative message when erasure-code-profile set fails +f5fa25d (origin/wip-rgw-bootstrap) ceph-create-keys: create bootstrap-rgw key +679e266 mon: add 'bootstrap-rgw' profile +01379bd (origin/wip-refine-build-configuration-hammer) Compile test_build_librgw only if WITH_BUILD_TESTS +1c20417 (origin/wip-11123) osd: use (robust) helper for setting exists or clearing whiteout +f5a2aef PGLog::merge_log: in tail extend case, log.log might be empty +88d66ca mon: Support multiple args to ceph pg dump_stuck as in usage and man pages +a3dfeec Improve "ceph_argparse.py: add stderr note if nonrequired param is invalid" +bbe231a PGLog: split divergent priors as well +90a0393 PendingReleaseNotes: warn about lttng LD_PRELOAD for daemons +53cc492 ceph_test_rados_tier: add test case for delete+create compound ops +93ef911 PG: add config to ignore history les in find_best_info +d06c1d7 rhel 5.9 port fixes to compile librados only Signed-off-by: Rohan Mars +f4bc48d doc: Fix ceph command manpage to match ceph -h (hammer) +9495de47 doc: Fix ceph command manpage to match ceph -h (firefly) +5680456 PGBackend: do not rewrite ec object oi checksums +e0bf132 PGBackend: add debug option to rewrite digest even if present +3858d0b ReplicatedPG: finish_ctx: do not assume that the oi is for the head object +aceb860 Build ceph-dencoder if server and mds for now +c365cac rbd: regenerate rbd(8) man page +416cbff doc: Fix typo in ceph pg dump_stuck usage in man page +ba77bda (origin/wip-librbd-invalidate-object-map) librbd: invalidating snapshot object maps should set snapshot flag +ba4bb22 test_cls_rbd: verify set_flags updates snapshots +fa25b84 cls_rbd_client: add snap_id param to set_flags +2d86898 cls_rbd: set_flags can now update snapshots +c1892a0 rgw_main.cc: fix null-deref in case get_storage() fails +f5b0151 rgw/rgw_op.cc: fix potential null-deref in strcmp() +595e87f Fix XioLoopbackConnection Lifecycle. +e1eebb3 osd: refactor RepScrubWQ::_process() +052debd osd: fix a msg leak when OSD is stopping +3ae87c8 XIO: Handle requeue case of XIO messages +5a8d4c5 qa,cephtool: add test case for 'ceph osd tier add-cache' +83d0581 mon: Don't forget set read_tier/write_tier for 'osd tier add-cache'. +23d7991 tests: add unit test for multiple concurrent resize ops +194fcfd librbd: retrieve image size at start of resize op +0212ae4 librbd: do not invalidate oversized object map +7f246b8 librbd: avoid canceling object map / header updates +85737ab librbd: update size / parent overlap after resize completes +1d29890 librbd: use image size and parent overlap from active shrink op +9c5c665 librbd: queue multiple resize requests +6bc47eb xlist: add const versions of front / back +e7f9e3b librbd: use ImageCtx::get_parent_overlap helper function +286b385 librbd: resize/flatten should validate image is R/W +9dcd517 librbd: hold write snap_lock when refreshing object map +ac527a2 (origin/wip-11079) crushtool: improve straw2 compile/decompile test +6445d9e crush: fix crush_get_bucket_item_weight and bucket destroy for straw2 +b686eda crushtool: fix straw2 cli test +5b58ef1 osdc: fix a memory leak in C_TwoContexts +e3616a5 doc: rhel6.5 is rhel6 +147b1db (origin/wip-11068-debian-jessie) deb: add zlib1g-dev to Build-Depends for Debian/jessie +84f05c0 TestAsyncDriver: Fix typo in ceph_test_async_driver +918afc0 qa: make rbd-fuse exit cleanly with lttng +b6326a0 ReplicatedPG: block write on degraded object if there are waiters +7acfdac (origin/wip-11015) crushtool: test compilation of a rule with straw2 buckets +61308cc crush: parse alg names that include a digit +cb6813c tests: add Debian jessie dockerfile +657844a tests: DEBIAN_FRONTEND=noninteractive apt-get install +f8dec72 tests: jq is not available on Ubuntu precise +4add63c install-deps.sh: strip | in the list of packages +dbe2b24 (origin/wip-wn-rgw-hammer) rgw: flush watch after unregistering +3530a25 Client: do not require successful remount when unmounting +b90018f The erasure-code is actually required by libcommon +9b3e1f0 Minor syntax fix-ups for Makefile.am redesign +96c685e Minor changes in other Makefile.am files to make them support the build refinement +0f04633 Split Makefile.am in src/test +e82ac10 rgw: only finialize finisher if it's not null +7bab9f7 rgw: fix watch initialization and reinit on error +387e4f8 rgw: move watch reinit into a finisher +30c32b4 rgw: add support for new watch/notify functionality +04437e4 rgw: switch to new watch/notify API +e3a7ab7 Split Makefile.am in src/tools +14572ff Cleanup src/Makefile's a bit more +70c89d5 Split Makefile.am in src +e37af1b Reorganize structure of Makefile.am in src/include +da9935e Split Makefile.am in cls +9e1c49c ceph.spec.in: loosen ceph-test's dependencies +5cbe5ca man: move ENABLE_* to Makefile.am +e531dd4 Add new configure options to improve build refinement +c474106 Split Makefile.am in man +fa13a5d qa: fix up rbd permissions test +cb840cc librbd: remove unneeded assert from unregister_watch() +8dc0bf8 (origin/wip-10828) osdc/Objecter: clean up oncommit_sync (and fix leak) +f7d35b9 osdc/Objecter: count oncommit_sync as uncommitted +099264f (origin/hammer-backports-hadoop) hadoop: workunits don't need java path +2f2ace3 qa: update old replication tests +a6a6df6 cmake: build fixes +137800a (origin/wip-10968) librbd: delay completion of AioRequest::read_from_parent +7d2fe5b librbd: allow AioCompletions to be blocked +416ce76 librbd: delete Contexts when object map aio_update not required +1bfd760 librbd: handle possible aio_read return error code +fb2caa0 librbd: add log message for completion of AioRequest +1e3f814 mon: ignore crushtool validation if too long +7a5a635 mon: do not hardwire crushtool command line +eca153e (origin/wip-10962) test/cli-integration/rbd: updated to new CLI +6c2d929 rbd: permit v2 striping for clones and imports +b5050b6 rbd: fixed formatted output of rbd image features +6cff494 (origin/wip-10990) qa/workunits/rbd/copy.sh: remove all image locks +0e58463 librbd: missing callback log message for CopyupRequest object map update +ed9e358 librbd: hide flush log message if no flushes are pending +e2283e3 (origin/wip-10958) librbd: flush pending AIO after acquiring lock +472db64 librbd: hold snap_lock between clipping IO and registering AIO +7e89f51 mon: do not pollute directory with cvs files from crushtool +2e74959 (origin/wip-10546) mon: Monitor: fix timecheck rounds period +3f73eb4 (origin/wip-mon-datahealth-fix.hammer) test: encoding: add LevelDBStoreStats and ceph_data_stats to types.h +028806a mon/mon_types.h: allow testing encode/decode of LevelDBStoreStats +6c7f3a7 include/util.h: allow testing encoding/decoding of ceph_data_stats +b8c7bae include/util.h: initialize ceph_data_stats to zero +6c2dea9 mon: mon_types.h: initialize LevelDBStoreStats and avoid craziness +1584104 librbd: moved flush / cache invalidate to resize state machine +9fed4b9 librbd: add AIO version of invalidate_cache +bebf8e9 (tag: v0.93) 0.93 +6f31458 (origin/wip-hammer-gplv2-text) Add GPLv2 text file +2c666f3 librbd: C_SaferCond memory leak +7ed9640 (origin/wip-fusesystem-10710) ceph-fuse: test dentry invalidation options and fail out if we fail +694529a Client: support using dentry invalidation callbacks on older kernels +a6ebf67 Client: add functions to test remount functionality +cd95b29 Client: check for failures on system() invocation +3ec52da (origin/wip-10961) qa/workunits/rbd/copy.sh: explicitly choose the image format +286a886 (origin/hammer-10912) client: re-send requsets before composing the cap reconnect message +f3ad61a (origin/wip-10864-hammer-packaging-rbd-udev) packaging: move rbd udev rules to ceph-common +ec26f08 (origin/wip-librbd-mdlock) librbd: remove unnecessary md_lock usage +1f9782e librbd: move object_map_lock acquisition into refresh() +27e5ae6 librbd: don't check if object map is enabled before refreshing +876f128 librbd: remove object map on rollback if needed +f4d8d16 librbd: clarify md_lock usage +01dc05b test_librbd: add simple test for object map snapshot consistency +8582500 librbd: use snap_lock to protect ImageCtx->size +7fed0a3 librbd: hold snap_lock while reading parent info in diff_iterate +df42fd3 test_librbd: close ioctx after imagectx +06e5a39 rbd: fix --image-feature parsing +eef7466 librbd: apply flag read failure to all snaps +6ac8139 librbd: make ImageCtx->object_map always present +d611121 (origin/wip-librbd-async-operations) tests: add unit test to verify async requests time out +c295485 librbd: restart async requests if lock owner doesn't report progress +c611936 librbd: replace Finisher/SafeTimer use with facade +41e186a librbd: cancel in-progress maint operations before releasing lock +dde882c librbd: flush context potentially completing too early +04d360a librbd: take ImageCtx->snap_lock for write in add_snap() +40c2abb librbd: use snap_lock to protect ImageCtx->flags +bb4041f librbd: add locking asserts to ImageCtx +4bcbdbf librbd: fix ImageWatcher::is_lock_supported() locking +a94ceb6 librbd: add and use a test_features() helper +cffd93a librbd: use ImageCtx->snap_lock for ImageCtx->features +468839e (origin/wip-librbd-image-watcher-tests) tests: add additional test coverage for ImageWatcher RPC +915064a librbd: add ostream formatter for NotifyOp +260c820 fuse: do not invoke ll_register_callbacks() on finalize +75d8c01 (origin/wip-10862-hammer) mon: do not try and "deactivate" the last MDS +a79e905 (origin/wip-devel-python-split) qa: fix python-ceph reference +46b45e3 doc: fix python-ceph refs in docs +d1c82ea ceph.spec: specify version +2a23eac debian: split python-ceph +39982b1 Split python-ceph to appropriate python-* packages +bd40f23 (origin/wip-librbd-python-tests) tests: speed up Python RBD random data generation +655e616 tests: fix potential race conditions in test_ImageWatcher +9c03750 (origin/wip-osdc-watch-error) osdc: watch error callback invoked on cancelled context +a9bfd5d ceph_test_rados_api_watch_notify: wait longer for watch timeout +91cda52 (origin/wip-10788) osd: better debug for maybe_handle_cache +bee9154 osd,mon: explicitly specify OSD features in MOSDBoot +30c904e osd: do not proxy reads unless all OSDs proxy features too +e0e765f osd/OSDMap: cache get_up_osd_features +63f6c9b (origin/wip-librbd-snap-create-race) librbd: fixed snap create race conditions +69b3857 (origin/wip-10898) librbd: improved ImageWatcher duplicate message detection +942f875 librbd: add test instances for watch/notify messages +10d8686 librbd: minor cleanup of ImageWatcher messages +0ed296b (origin/wip-librbd-exclusive-lock-config) rbd: disable RBD exclusive locking by default +2b63dd2 DBObjectMap: lock header_lock on sync() +170c88d cmake: radosgw, radosgw-admin related fixes +4feb171 vstart.sh: can use binaries outside of ceph/src +55d3db9 (origin/wip-10919) cls_rbd: invalidate bufferlist CRC when updating object map +970bb49 (origin/wip-10883) osd: Fix FileJournal wrap to get header out first +01f04cb (origin/wip-10914) osdc: pass fadvise op flags to WritebackHandler read requests +c463242 osd/OSDMap: include pg_temp count in summary +d6e2689 PG: compensate for bug 10780 on older peers +1d0d3dc PG: add a config option to enable (by default) recovery below min_size +08eb584 (origin/wip-10899) librbd: fixed ImageWatcher recursive locking issues +48466f8 ReplicatedPG: only allow a degraded write if we have at least min_size copies +d05539e ECBackend: use tbl for empty transaction as well if necessary +e059d58 ReplicatedBackend: use tbl for empty transaction to backfill peer also +25f9363 osd/: s/is_degraded_object/is_degraded_or_backfilling_object +4f55d41 (origin/wip-10900) test/librbd/fsx.c: disable RBD object map for krbd +487c205 (origin/wip-10892) osd: clear obc cache on_shutdown +c341c52 (origin/wip-10884-hammer-rpm-devel-split) ceph.spec: split ceph-devel to appropriate *-devel packages +ea66f5c doc: RGW is "built on top of librgw" changed to "librados" +b220b2a librbd: enforce write ordering with snapshot +0de6b61 librbd: use separate files for snapshot object maps +e97a8f1 librados_test_stub: added IoCtx::write_full implementation +32e259c librbd: skip invalidating an invalid object map +4638eaf cls_rbd: added CRC validation to object map +ec922a6 osd: use op (not connection) features for copy-get encoding +70eab06 osd: pass features through to proxied read op +248be16 osd: set features explicitly in MOSDOp +e95d4cc tests: remove tests for when init() is not called in shec (#10839) +3e37c13 rm some useless codes +e7735d3 osd: number of degraded objects in EC pool is wrong when there is OSD down(in) +e0fbe5c cmake: add librbd/test_fixture.cc +caf2e1d cmake: add os/XfsFileStoreBackend.cc to rules +62dd0c2 erasure-code: mark the shec plugin as experimental +f9c90e7 tests: fix unused variable warning +3a3bb6d common: capture check_experimental_feature_enabled message +d8f0215 (origin/wip-10787) mon/OSDMonitor: note osd map epoch in one other place +d9b0cd3 mon/OSDMonitor: move osd epoch cache update into helper, add fixme +b80e6ae README.md: fix the indent of a command line usage +4038d21 cleanup: delete useless member variable +280a198 PG,ReplicatedPG: make missing_digests local to scrub_compare_maps +8e806bc Docs: OSD name, not id, needs to be given to remove an item from the CRUSH map. Include command for deleteing bucket from the CRUSH map. +a5759e9 mon/OSDMonitor: do not trust small values in osd epoch cache +87544f6 (origin/wip-10844) mon: MonCap: take EntityName instead when expanding profiles +fd83020 (origin/wip-decoding-oldest-snap) mds: fix decoding of InodeStore::oldest_snap +6918a98 tests: Dockerfile COPY with two arguments +98297e0 tests: update docker helper documentation +1023aa9 tests: add Dockerfile for centos-6 +b3771eb tests: one Dockerfile per repository:tag +b9b5868 osd: fix OSDCap parser on old boost/spirit +4ced591 osd/OpRequest: pass string by const& +74d5ccf osd/: include version_t in extra_reqids with promote +de6b53a (origin/hadoop) qa: hadoop plays nice with new teuthology task +3c05c9c tests: no need for python-flask at build time +b24a01b erasure-code: initialize all data members +1a9d717 erasure-code: fix uninitialized data members on SHEC +e2a5085 ReplicatedPG::on_change: requeue in_progress_async_reads close to last +a5ecaa1 ReplicatedPG::on_change: clean up callbacks_for_degraded_object +2d2dc13 mon/PGMonitor: drop pg ls debug line +65ce7b7 (origin/wip-da-fix-xio-configure) fix configure to reflect the missing libs for xio +a5804c4 (origin/wip-early-adopters) doc: add a page for CephFS early adopters +d237649 doc/cephfs: Ceph FS -> CephFS +65dfd5d doc/cephfs: clarify the 'not production ready' warning +700459b build-doc: package checks for fedora +c5a74a7 build-doc: don't ignore errors +94f9f60 tests: clone ceph-erasure-code-corpus from ceph +807cf57 xio: Fix out-of-order responses +807af4c cmake: Fix cmakelist to compile librbd +418ca0c (origin/wip-10784) osd: Update object state after removing watch from object info +27905fd osd: Simplify handle_watch_timeout() using existing support functions +45c388f (origin/wip-objecter-linger-locking) objecter: protect linger_op last_error and registered fields +69ee5ec objecter: remove unused RWLock::Context +e01c93d objecter: clarify a few lock assertions +a60d5fa objecter: remove dead race handling code +1b2da9b objecter: remove dead _get_op_target_session() method +4f36eae ceph.spec.in: junit always except for EPEL 6 +9656018 (origin/wip-10791-stopping) MDSMonitor: do not allow MDS to transition from STATE_STOPPING +6898f0b rgw: Swift API. The second way of specifying desirable response format. +e504003 (origin/wip-10719) rgw: remove multipart entries for bucket index when aborting +3e54acb rgw: encode rgw_obj::orig_obj +64d7265 librados: code reformatting only. +3f11ab0 librados: add info about restrictions on rados_monitor_log() usage. +f67bfa2 rgw: Swift API. Support for X-Remove-Container-Meta-{key} header. +cdfc23f rgw: fix doc, A typo in command line argument name +2f8d31e rgw: Swift API. Dump container's custom metadata. +90d0f0d rados: add 'watch/notify' in rados --help command. +b623c42 rados: Using readable format to print object mtime when call 'stat obj'. +d3fc5bd Fix bug: When run Test_filejournal testcase with gtest argument, all of testcases is failed. +93f32f0 erasure-code: fix compilation warnings +01e154d osd: fix PG leak in SnapTrimWQ._clear() +a850514 fsync-tester: print info about PATH and locations of lsof lookup +b14ca1f (origin/wip-10737) test_libcephfs: test we can't set layouts on existing files +36d37aa rados.py: keep reference to python callbacks +7002f93 ShardedThreadPool: make wait timeout on empty queue configurable +32d7617 osd/PG.c: use boolean to init `bool` variables +5aa6f91 WorkQueue: make wait timeout on empty queue configurable +a3b1583 add tests for ceph pg ls-by-pool +25d9837 add CLI ceph pg ls-by-pool +6ccced2 add tests for ceph pg ls-by-osd +39e2640 add CLI ceph pg ls-by-osd +742c5e8 add tests for ceph pg ls-by-primary +f814262 fix error : ceph pg ls 0 +203c06d (origin/wip-old-gcc) locally disable pragma warnings on gcc < 4.6 +93629d3 Pipe: conditionally compile IPTOS setting +b025fbf librbd: consolidate all async operation flush logic +0a00be2 xlist: added missing include +78b1fb5 ReplicatedPG::eval_repop: check waiting_for_* even if !m +d9c024b osd/ReplicatedPG: remove dup op mark start call +b4f2e75 osd: add perf counter for proxy read +169c620 osd/ReplicatedPG: add assertion in apply_and_flush_repops +918b378 mon: have two COMMAND two COMMAND_WITH_FLAG macros +7920db3 tests: make ceph_watch_wait output watchfile content on failure +ac9d75c mon: noforward flag for commands that are not supposed to be forwarded +3ff4821 mon: fix Monitor::_get_moncommand() +27bab65 (origin/wip-10765) rados: make 'watch' command unwatch when done +45f842d (origin/wip-doc-ports) doc: remind user to calculate the correct max port +c65d8ed doc: fix "7810" port typo +fe47e23 doc: correct default of ms_bind_port_max +d2eaeea AsyncConnection: fix incorrect condition for exchanging in_seq +ab6c65a mon/OSDMonitor: fix nan on 'osd df' variance +6fe509d mon/OSDMonitor: fix nan on 'osd df' use% +e070718 osdc/Objecter: do watch/notify op completions synchronously +1faa947 osdc/Objecter: remove unused on_reg_ack +9b6b7c3 Handle differently-named xmlstarlet binary for *suse +155a83c librados: rectify the pool name caching in IoCtxImpl. +293cd39 tests: run osd-scrub-repair.sh with make check +bae1f3e FileJournal: fix journalq population in do_read_entry() +15350a0 ceph_objectstore_tool: fix check_output on python2.6 +86fd8c3 (origin/wip-10761) librados_test_stub: added new blacklist_add method +7ecf864 tests: update librbd tests to handle blacklisting +25d7ac2 librbd: optionally blacklist clients before breaking locks +9dfd4ac mailmap: UMD is University of Maryland +a616de9 librados: add blacklist_add API method +6a91f2b libradosstriper: fixed write_full when ENOENT +0514536 (origin/wip-opath-setattr) client: handle O_PATH fds on setattr too +636a269 (origin/wip-librbd-maint-tests) tests: add simple tests for proxied maintenance operations +9f2f306 (origin/wip-10785) librbd: ensure ImageWatcher notifications are idempotent +f86fb97 rgw: obj delete operation can use remove_objs param +538395d rbd.py: Add rbd_read2/rbd_write2 funcion which can handle fadvise flags. +7890256 librbd: minor ImageWatcher cleanup +debd7f3 tests: relax librbd ImageWatcher test case state machine +dfee96e (origin/wip-10770) rgw: send appropriate op to cancel bucket index pending operation +cbfa08e mds: disallow layout changes for files with data +b3fdf15 (origin/wip-cephfs-snap1) mds: avoid propagrating unnecessary snap rstat to parent +32b0892 mds: update client_need_snapflush when splitting snap inode +6cb9b01 mds: fix rdlock snap inode +d62c67c mds: save the oldest snapid of inode +8624172 qa/workunits/snaps: remove snapshots when test finishes +b66e749 mds: split old_inode when needed +a464558 qa/workunits/snaps: don't assume snapshot is disabled +244267b ceph: don't count snap dentries when calculating new fragstat/neststat +c31ed41 mds: add snaprealm to open_past_parents after it's opened +01ff547 mds: avoid infinite loop of SnapRealm::_open_parents +dda08a0 mds: properly commit snaprealm to dirfrag +966e108 mds: don't manully create snaprealm during rename +f3b61e6 mds: don't mark dirfrag dirty after dropping stale dentries +ad6f0cf client: remove snapshot dentry during rmsnap +087ccd6 client: remove snaprealm from parent when closing it +505a5f5 client: check xattr version independent of inode version +13d8475 mds: remove superfluous assertion +b0e0e1c mds: temporarily disable recovery for snapshotted files +572e42e mds: verify backtrace by auth MDS only +d8e3ce8 mds: avoid sending snaptrace for snapshot inodes +1a648cd mds: optimize SnapRealm::split_at() +ed422be mds: fix reference after free +4391cdd mds: journal snaprealm for all types of inodes +a0f51a2 mds: always create multiversion inode when cow inode +5f58c4c mds: check multiversion inode when purging stray +6cd044a mds: properly project past snaprealm parent while renaming files +335f02b mds: properly update trace vector when quiting path traverse +f192e2d mds: properly update capability's client_follow +dbf09af mds: fix CInode::remove_need_snapflush +1e53bcb mds: provide correct snaps to purge_stale_snap_data() +040d5c5 mds: set last snapid according to removed snaps in data pools +5e5052b mds: update current_parent_since for newly snapshotted directory +1d9de22 mds: fix MDCache::journal_cow_dentry() +32b1a9a mds: check snaprealm before drop dentries in deleted directory +1479300 mds: properly update CInode->first during journal replay +5b75e30 (origin/wip-10827) osdc/Objecter: linger_register now acquires rwlock +3cf7fcc install-deps.sh: check for debian/control existence +09c152a run-make-check.sh: git --ancestry-path is not backward compatible +400ac23 mon: ignore osd failures from before up_from +3fba9ac Bug fix : AsyncConnection: fix wrong scope of data blocks +bb18d01 xio: Squash the whitespaces +16897aa cmake: Fix CMakeLists.txt to compile librbd +1d68abb xio: Fix release xio message on closed connection issue +41611ea Unconditionally chown rados log file. +484a147 osd: apply affinity if any affinity is not default +fffa5e2 osd,mon: add norebalance osdmap flag +f911411 NetHandler: Lower connect failed log level +c252e05 AsyncConnection: fixup for 2ffacbe (crc configuration in messenger) +2b6b100 AsyncConnection: Don't delete event if fd < 0 +a3fc9d4 AsyncConnection: fix wrong scope of data blocks +0db7c48 SubmittingPatches: clarify the use of branches in PRs +adebf22 rbd_recover_tool: move rbd_recover_tool directory to src/tools subdirectory +70ae314 (origin/wip-opath) client: fix O_PATH on older Linux systems +2f49de5 ReplicatedPG: block writes on degraded objects unless all peers support it +2a83ef3 include/encoding: fix an compile warning +71c6d98 msg: fixup for 2ffacbe (crc configuration in messenger) +2598fc5 (origin/wip-10734) ObjectStore: fix Transaction encoding version number +46f9ca4 (origin/wip-10782) pybind: fixed runtime errors with librbdpy +9124a76 (origin/wip-8600) test/vstart_wrapper.sh: set PATH before calling vstart.sh +189ef38 init-ceph.in: add $PWD to PATH if running as ./init-ceph +0d80691 qa: workunits: cephtool/test.sh: test 'ceph osd setcrushmap' +ff74873 mon: OSDMonitor: use CrushTester::test_with_crushtool +58ea017 crush: CrushTester: add test_with_crushtool() +481d563 tools: crushtool: allow '--infile -' to pipe read from STDIN +b2549a6 (origin/wip-export-dir) mds: implement export dir asok +190c7e3 client: implement support for O_PATH on Linux. +911e4c0 client: add support for O_NOFOLLOW in Client::open(). +a7a6fe4 rbd-recover-tool: add usefull information of this tool include README, FAQ, TODO +ea69219 rbd-recover-tool: add a test case for raw image & snapshot +4f395eb rbd-recover-tool: implement the function framework add control files & config files +aa3cda2 rbd-recover-tool: add the basic function files +97abcdd (origin/wip-traceless-reply) mds: properly record created inode in completed requests list +419800f client: re-send request when MDS enters reconnecting stage +b66caef mds: avoid sending traceless reply for request that created new inode +d12d92d mds: process completed requests in clientreplay stage +0548bea doc: Removed references to Inktank suppport. +2d1803b (origin/wip-da-SCA-20150129) xio/XioMsg.h: use static_cast instead of c-style cast +babac0c doc: Removed Inktank reference. +0d46790 mds/MDS.cc: don't compare integer with bool +aa7c968 EventKqueue.cc: clarify calculation precedence for '&' and '?' +df161d3 XioMessenger.cc: fix dead pointer usage +32dde2f cls_rgw.cc: prefer ++operator for non-primitive iter +72a7d0c rgw_rest_s3.cc: prefer !empty() over size() for emptiness check +33b5c58 src/.gitignore: add new files, resort alphabetical +bb09695 xio: use static_cast instead of c-style casts +64b7c36 rbd-fuse.cc: use static_cast instead of c-style cast +8ec3f76 XioMessenger.cc: use reinterpret_cast instead of c-style +c82da17 ReplicatedPG.cc: prefer ++operator for non-primitive iter +e10417d CrushTreeDumper.h: prefer ++operator for non-primitive iterator +4ec700b EventOutput.cc: prefer !empty() over size() for emptiness check +db37ef0 rgw/rgw_rados.cc: prefer !empty() over size() for emptiness check +1836f28 osd/PG.cc: prefer ++operator for non-primitive iterators +5c55424 osd/Ager.cc: remove already in .h included header +8256cef AsyncConnection.h: remove twice included header, resort includes +d70676a common/Cycles.cc: reduce scope of variable +25995a0 cls/statelog/cls_statelog_*.h: init memvars in ctor +863dde2 common/escape.c: move cppcheck-suppress to correct lines +d8456c4 cls_log_ops.h: ctor init cls_log_list_op::max_entries +4421b55 src/os/ObjectStore.h: reduce scope of variable +3cf04b8 TestErasureCodeIsa.cc: fix reassign before use old value +86b7c38 os/ObjectStore.h: use reinterpret_cast instead of c-style cast +a91cd60 msg/async/EventKqueue.h: init 'size' in constructor +8652ec9 sync/EventKqueue.cc: fix possible null pointer dereference +46e81d3 ObjectStore.h: prefer ++operator for non-primitive iterators +699e869 test_librbd.cc: close va_list before return in error case +cf85fb0 dumb_backend.h: fix warning about self init +19d5de9 install-deps.sh: babeltrace is not on wheezy +c6a60d9 ReplicatedPG::do_op: ignore snapset_obc if !exists +5f51856 librados: fix race condition in rados_monitor_log(). +510a1cc librados: fix message dropping in rados_monitor_log(). +4e791f3 install-deps.sh: get lsb_release if needed +85cdd12 tests: add Dockerfile for fedora +65c7e07 doc/release-notes: v0.92 +f4d6515 install-deps.sh: get lsb_release if needed +24349a8 (origin/wip-8903) librbd: removed lingering TODO message from ImageWatcher +17a8330 (origin/wip-10720) mds: fix leaked MDCache::logger +9e9356b librbd: fixed object map issues discovered via fsx +6071142 (origin/wip-librbd-watch-errors) librados_test_stub: added Rados::watch_flush +1b110a5 librbd: better handling for image watch errors +225a19f vstart.sh: fix .ceph_port typo +8d61c39 (origin/wip-librbd-invalid-map) librbd: prevent copyup during image shrink operations +be05d9d rdb: update init-rbdmap to fix duplicate mount point +fbcde04 cls_rbd: fixed object_map_resize boundary issue +14424c8 librbd: removing objects can lead to infinite loop +bb8c9ae librbd: pending AIO operations are now flushed asynchronously +60b019f Fix memory leak in python rados bindings +46f2d80 tests: RBD tests now check object map validity +d00891f rbd: add image flags to 'rbd info' +706a655 librbd: added get_flags API methods +16e4d71 cls_rbd: get_flags now reads all snapshot flags +7dd2de8 (origin/wip-10707) test/cls_rgw: fix test +e0f12d9 (origin/wip-autogen) Fix do_autogen.sh so that -L is allowed +cfab01e (origin/wip-10722) rgw: move perf cleanup before context cleanup +4074a91 pybind: fix error hiding and inconsistency on librados load. +cfcfafc Objecter::_op_submit_with_budget: add timeout before call +00a3ac3 (tag: v0.92, origin/wip-sam-v0.92) 0.92 +c656bce PGLog: improve PGLog::check() debugging +05ce2aa qa: use correct binary path on rpm-based systems +eb526af (origin/wip-10709) rbd: watch command should unwatch before exiting +2a0e9b7 (origin/wip-optional-encoding) encoding: ignore uninitialized instantiation in boost::optional decode +f40ee8c (origin/wip-lttng) do_autogen.sh: default to --with-lttng, -L to build without +7590387 (origin/wip-assert-version) librados: add missing tracepoints +57bac8e osd: change pg_stat plain to display CRUSH_ITEM_NONE in pgmap output section. +4aa9f3f man: add rbd status to doc/man/8/rbd.rst +a007c52 doc: add cephfs disaster recovery guidance +9dbd37b test: add rbd status to src/test/cli/rbd/help.t +6fc0b80 rbd: add status command to list the watchers of an image +4be91c6 add CLI ceph pg ls-by-primary +2ac116e add tests for ceph pg ls +a1f634b add CLI ceph pg ls [pool] [state] +1c164cf get pg status with specific pool, osd, state +0e046bd add is_acting_osd function to check if pg is on that osd +34473f7 librados: rectify the guard in RadosClient::wait_for_osdmap(). +624c056 librados: fix resources leakage in RadosClient::connect(). +65fbf22 librbd: RemoteAsyncRequest: fix comparison operator +1cf30e6 rbd: use IO hints for read/write operations +bd8671f ceph_test_rados: fix typo +ac161bf librados: expose rados_{read|write}_op_assert_version() in C +11b6424 Add test case for librados assert_version() +eb45f86 (origin/wip-10106) rgw: flush xml header on get acl request +de2e5fa (origin/wip-10572) rgw: finalize perfcounters after shutting down storage +cab246d librbd: Don't do readahead for random read. +77689f1 ReplicatedPG::C_ProxyRead: fix dropped lock +0e3af8d ReplicatedPG: only populate_obc_watchers if active +b31221a OSD: allow recovery in peered +818b91b osd/: go "peered" instead of "active" when < min_size +e5a96fd PG: move most of all_activated_and_commited into the AllReplicasActivated handler +5911b45 PG::proc_master_log: assume les and history.les from log source +c4793ab osd_types: add last_peered, last_became_peered +63e5f57 PG: break waiting_for_peered out of waiting_for_active +96c3af8 PG: remove very obsolete comment about backfill_pos +aac4c25 osd/: add state PG_STATE_PEERED +abd1154 doc: add documentation for undersized +1f165d2 ReplicatedPG: block writes on degraded objects for ec pools +964d177 append_log: use remove_snap_mapped_object +0a32d3b ReplicatedPG::agent_maybe_evict: take write lock, skip on failure +721c878 ReplicatedPG: if we got ENOENT and an obc, we need to check the locks +a81f3e6 ReplicatedPG::get_rw_locks: use excl lock for read & write_ordered +a8e041f osd_types: add excl obc lock +e00daf5 ReplicatedPG::cancel_pull: drop_recovery_read lock +f5134c8 ReplicatedPG::wait_for_unreadable_object: use prep_object_replica_pushes instead of recover_missing if not missing +a74296f PG::purge_strays: purge peer_missing as well +f9abffb osd/: don't block writes on degraded objects +c632fec osd/: update peer_missing and local missing if we write a degraded object +56b8fc8 ReplicatedPG: always take recovery_read_lock for recovery +1c25dba (origin/wip-10701) rgw: use strict_strtoll() for content length +b1435e6 xio: Enforce at least two portals if bind +cbf0691 (origin/wip-10698) rgw: fail s3 POST auth if keystone not configured +10ddab8 doc: Fixed hyperlink. +a0a5185 rgw: Response 204 when post on containers +b7ab624 xio: Remove whitespace changes +7c80248 ObjectCacher: Only r >= 0, it need the read data. +ef48a70 osdc: only external_call can touch object. +ed209a5 osdc: For read w/ DONTNEED, if read data contain all cached data, move this object into the tail of LRU. +3dca5ef osdc: Make ObjectCahce can hanle read with DONTNEED. +3d38e1f osdc: touch hit bh although there are missing or rx bh. +3687dcb osdc: Make ObjectCahce can hanle write with DONTNEED. +28e73a7 osdc: Make ObjectCache can accept fadvise_flags. +fc76c89 osdc: add new filed dontneed in BufferHead. +3373249 Fix ReplicatedPG do_xattr_cmp_u64 +2113524 Add tests for ceph dmcrypt encryption +998b461 Change ceph-disk default to use LUKS for encrypted partitions +c83a288 Rework ceph-disk to allow LUKS for encrypted partitions +707c78b Only create a key of 256 bits length, not 256 bytes +6a45b8e add all possible ceph-disk run-time requirements to build time deps +4c50f6a (origin/wip-rgw-versioning-4) rgw: more merge related fixes +01cc9d5 rgw: fix merge artifact +e26023e PG: set scrubber.start = scrubber.end after scrub_compare_maps +4f9e6ed PG: remove block_writes from scrubber +bed22b4 doc: improve incomplete state documentation +89bd6b1 (origin/wip-hints) librados: rename NOREUSE to NOCACHE +8571739 (origin/wip-10688-boost-157) support Boost 1.57.0 +f623906 (origin/wip-pg-reqids) osd/PGLog: only do slow extra_reqid search of object appears at least once +eefdb32 osd: preserved extra_reqids on promote, flush +4d310a8 osd: preserve extra_reqids in PGLog +2ad229c osd: allow extra reqids to be stashed in each pg_log_entry_t +ca71376 cls_rgw: fix rgw_bucket_olh_log_entry::epoch initialization +61378f2 add pg_string_state function +4feb864 (origin/wip-10194-master) rgw: reuse fcgx connection structure +32b9bb7 QueueRing: a reduced contention queue +ecd5e5a test/encoding/types.h: add new structs for testing +5849380 cls_rgw: add missing struct test instance generator +4184387 cls_rgw: fix encoding for cls_rgw_obj +5808c77 rgw: don't call send_response() explicitly +1859239 rgw-admin: set explicit "null" instance when needed +0ace0f5 rgw: fix a crash when getting ECANCELED in delete_obj() +00f21d8 workunits/rgw: adjust radosgw-admin output parsing +b685baa workunits/rgw: set radosgw-admin location through env variable +2e3f75f rgw: don't clear olh log if we lost in race +9c8424f rgw: guard olh modification +caefe69 rgw: version id should not contain underscore +0b9859b cmake: Fix CMakelist.txt to compile librbd, libcommon +51dd9b2 xio: Spread and accept connections using different portals +e761b74 async: directly call delete without check +68c6f0e (origin/t-miyamae-wip-mshec-r44) mSHEC r44 initial commit +e45e97b run-make-check: use nproc and shorter git expression +0a998f5 edited failure conclusion +4527e8f corrected some confusing numbers +94b60c5 osd: don't log op stats for proxy read in the cache tier +a66898f cleanup : remove unused perf counter +a871651 (origin/wip-4087) librbd: object map updates should use AIO +4328069 test: correct two issues with the librados_test_stub +b63246f librbd: refactor existing object map code to its own class +f4b9442 cls_rbd: object_map_resize shrink protection +91f24f3 librbd: copy-on-read should update the object map +8fa3767 rbd: only enable object map if enabled in ceph config +9aad59d librbd: Protect object map updates with a lock assertion +719515a librbd: Use RBD image flags for invalid object maps +8571e47 cls_rbd: Add support for image flags +a41878a librbd: Use object map for IO operations +7e751ce librbd: Implement object map for tracking in-use objects +13fd6d1 cls_rbd: Add methods for manipulating an image object map +ca214c9 (origin/wip-8251-2) rgw: also convert sharded replicalog entries +0a4956e rgw: get rid of replicalog index_by_instance param +c4a6eab rgw: fixing rebase casualties +791c15b rgw: convert old replicalog entries if needed +778a53a rgw-admin: add replicalog update command +1cb10d7 async: add same behavior when message seq mismatch with simple +8d56ade (origin/wip-librbd-tests) tests: ensure RBD integration tests exercise all features +b6d6f90 (origin/wip-mdsmon-args) mon/MDSMonitor: fix gid/rank/state parsing +9b9a682 msg/Pipe: set dscp as CS6 for heartbeat socket +1e236a3 mds: don't join on thread which has not been runned. +6939e8c (origin/zhouyuan-submodule_https_git) Update git submodule to use the same https protocol +e393810 librbd: make librbd cache send read op with fadvise_flags. +a23676b librbd: Don't do readahead for random read. +8d0295c rgw: extend replica log api (purge-all) +6b0151c utime: extend utime parsing +e274e10 rgw: fix replica log indexing +0be7925 (origin/wip-fuse-regress-note) Update PendingReleaseNotes for ceph-fuse change in Giant +77bd883 test_msgr: add auth enabled basic test +408db65 async_msgr: crc configuration in messenger +ce941f6 async: Delete authorizer when connected +a8e2579 (origin/wip-perf-filter) common: filtering in `perf dump` +e5ddc50 tests: bring back useful test 'ceph tell osd.foo' +7c59bc0 cleanup: replace some length() with !empty() +17add06 cleanup: replace some size() with !empty() +9a9670c tests: better EPEL installation method +bf05ec1 (origin/wip-gmock) tests: replace existing gtest 1.5.0 with gmock/gtest 1.7.0 +5301b2b (origin/wip-10637) librbd: trim header update not using AIO +5cbe0c5 gmock: use Google C++ Mocking Framework for unit tests +ca1d21e (origin/wip-install-deps) install-deps: fix LC_ALL setting +e4a97c6 librados_test_stub: add IoCtx::get_instance_id() +f6406c9 qa: small improvements to merge-diff test +4e88414 rbd-fuse: clean up when shutdown +75bdfec librados: fix typo in docs +4ac3cd7 librbd: throttle async progress callbacks +cd9d8eb librbd: add more robust retry handling to maintenance ops +1b6467b librbd: assert header lock ownership for maint operations +71e84e0 cls_lock: New assert_locked operation +376c7e0 librbd: Coordinate maintenance through exclusive lock leader +dfa96c5 librbd: Add maintenance operation requests to ImageWatcher +e6f1280 librados: Expose RadosClient instance id through librados +398bc96 librbd: Create async versions of long-running maintenance operations +87ef462 rgw: format mtime of radosgw-admin bucket stats +dc1630e (origin/wip-librbd-trim-error) librbd: trim would not complete if exclusive lock is lost +3347e0d bug: error when installing ceph dependencies with install-deps.sh +4e90a31 (origin/wip-10617) osd: add failure injection on pg removals +9b220bd ceph.spec.in: use wildcards to capture man pages +51e3ffa rgw: reorder bucket cleanup on bucket overwrite +313d6a5 rgw: access appropriate shard on bi_get(), bi_put() +b304af3 librbd: clean up log message for copy-on-read +879fd0c osd: do not ignore deleted pgs on startup +6f6facb (origin/wip-librbd-close-deadlock) librbd: potential deadlock on close_image +bda293a librbd: fix copy-on-read / resize down race condition +e917033 test: add rados_nobjects_list_xyz functions to librados test stub +7c7f072 librbd: eliminate CoR callback +9790b0f librbd: use finisher for copy-on-read copyup fulfillment +cfce41d ReplicatedPG::hit_set_persist: update ssc->snapset as well +f1f6f0b ReplicatedPG::hit_set_persist: write out oi.digest, these objects are immutable +4dda030 (origin/wip-noreuse) librados: add FADVISE_NOREUSE +9edd0a5 ceph.spec.in: move rgw logrotate to rgw subpackage +050a59e osd/OSDMap: remove unused variables +55dfe03 (origin/wip-4092) librbd: schedule header refresh after watch error +33f0afd doc: Some files still use http://ceph.newdream.net +2f9b3bd ceph-debugpack: fix bashism of {1..10} +5652a1d cls_rgw; fix json decoding and encoding of certain type +f9d82e6 test: Add --write-fadvise-dontned option to ceph_test_rados +075c604 librados: Fix error comment. +f710984 mon: Add "ceph osd pool set/get write_fadvise_dontnned" command +d26fe35 pg_pool_t: clean up code. +0f56b47 ReplicatedPG: handle OSDOp with pg_pool_t::FLAG_WRITE_FADVISE_DONTNEED. +ec3f79d osd: Add pg_pool_t FLAG_WRITE_FADVISE_DONTNEED +376b585 rgw: generate version ids that don't change when urldecoded +65f2871 rgw: hash bucket shard by original object name, not transformed +a9c882f ReplicatedPG: Remove the duplicated code. +67c4637 ReplicatedPG: Add some mark_delay events. +5548bbe rgw: use bucket shard for olh operations +fff3cf9 ceph.spec.in: capitalization and punctuation +e4b5bed rgw: api adjustments following a merge +c71ecae mon/OSDMonitor: validate crush features for osd (not just mon) +4621236 PGBackend: rename clear_state to clear_recovery_state +cd7ed04 osd/: s/backfill_read/recovery_read for obc locking +27dcb14 osd/: pass log_entries in write path as const ref +9650403 PG::add_log_entry: no need to 0 offset in append_log +6a025ef PGLog: trim mod_desc after appending to the log +a6eadae rbd image_read.sh: disable exclusive locking +f51ff28 vstart.sh: pull default CEPH_PORT from .ceph_port +35fcb04 (origin/wip-crush-straw2) Change crush_ln to provide 32 more digits. +6289912 crush: improve straw2 adjustment slightly +32a1ead Add crush_ln to calculate nature log efficently +0eca13d crush: fix dump for hammer tunables +7023eab crush: add allowed_bucket_algs tunable +325fc56 crush: introduce CRUSH_V4 feature bit +242293c crush: add a straw2 bucket type +6e084f6 unittest_crush: rename straw tests +d4ec757 crush: move default bucket choice into CrushWrapper helper +14eb1a7 crush/builder: fix warnings +07eadc4 (origin/wip-10474) FileJournal: Fix hang in FileJournal::close() +2865e13 doc: Change Availability text in all of the man pages +b04f698 Doc: Fix the extra blank space in doc/start/quick-rbd.rst +9930028 (origin/wip-mon-pgtemp) osd: OSDMap: remove pg temps for inexistent pools +34f5c17 use shardid as a key of the shardinfo when "dump_op_pq_state". Signed-off-by: huangjun +804deec Fix memstore free space caculation +6239151 RocksDBStore: filterpolicy is not deleted when RocksDBStore destructs +2e8bb1e (origin/wip-10614) test/librbd/fsx.c: disable RBD exclusive locking for krbd +9ad9ba8 doc: Fix a typo in radosgw-admin doc +008698b doc: Change Availability text in all of the man pages +6f44f7a Revert "Revert "Merge remote-tracking branch 'origin/wip-bi-sharding-3' into next"" +90a90bb (origin/wip-rgw-versioning-3) rgw: set default value for swift versioning extension +dc11ef1 PGBackend: fix and clarify be_select_auth_object +26656e3 rgw: fix bucket removal with data purge +b18b14b ObjectStore::_update_op: treat CLONERANGE2 like CLONE +4d3b49e rbd: ensure aio_write buffer isn't invalidated during image import +500f4b4 rgw: assign versioned_epoch on bucket listing response +8cbfac4 Wrong HTTP header name +a0af5de (origin/wip-10579) qa: move fs quota to its own dir +2ce38db osd: fix some compile warning +b9be97f Doc: Fix the typo in doc/rbd/rados-rbd-cmds.rst +fe93f73 test: fix rbd cli tests for new feature bit +946958c qa: disable automatic locking for manual locking test +c68ecc7 xio: Enable xio option to call fork init +b1b299d osd: revert d427ca35404a30e1f428859c3274e030f2f83ef6 +46347fc osd: Transction::append SHOULD NOT modify other.op_bl +988d007 ReplicatedPG::on_change: clear cache at the end +8453f71 (origin/wip-10555) mon: Do not allow empty pool names when creating +68af510 ceph-disk: do not reuse partition if encryption required +48963ba test_msgr: Rename unittest_msgr to ceph_test_msgr +b311e7c (origin/wip-10257) mon: PGMonitor: skip zeroed osd stats on get_rule_avail() +8be6a6a mon: PGMonitor: available size 0 if no osds on pool's ruleset +e84f27e doc: Replace placeholder with 'gateway' +190c185 librbd: copy-on-read Addressed Jason's review comments. +8c47800 librbd: copy-on-read Asychronously perform copyup on read path. Sychronously perform copyup on write path. +f408c8e librbd: copy-on-read for clones, write entire object into child asychronously +701a248 librbd: copy-on-read for clones, read entire object from parent +541637d librbd: copy-on-read for clones, add an option for copy-on-read +88b1032 Introduce the term MON at http://ceph.com/docs/master/rados/ +08faee0 doc: mon should be listed before osd +6b1c92c Doc : Documentation#10205 +b8dd228 doc bug 10206 +9147c62 (origin/wip-10576) ceph_test_rados_api_misc: do not assert rbd feature match +6d209c2 rgw: cors set attrs on bucket using appropriate call +2c36798 rgw: switch index ops to new apis +11befab rgw: break if done when timing out pending olh ops +0b6300d rgw: start pending entries attr name by timestamp +f51a5a9 cls_rgw: user swap() instead of assignment operator +e23a32d rgw: fix unitest compilation +03f2d0c rgw: handle 'null' instance when setting delete marker +6931132 rgw: fix setting of versioned epoch when removing object instance +0bf6991 rgw: add bucket index log flags, use these for marking versioned ops +2718ecc rgw: fix use of rgw_remove_object() versioning_status param +dd7ffdb rgw, cls_rgw: log versioned operations in bucket index log +eaf19a5 cls_rgw: cleanup, add read_bucket_header() +b999bc7 cls_rgw: fix rgw_bi_log_entry::dump() +7a090be cls_rgw: bound bi log listing appropriately +842da1f rgw: only retry on ECANCELED before doing the operation +bfb5068 rgw: fix olh guarding scheme +2a9a193 rgw_admin: don't reuse -o command line option +9169569 rgw: multi object delete sends delete marker info +f1f9a5f rgw: delete obj, handle null instance in all paths +fa7afd1 rgw: when deleting object version return -ENOENT if needed +c4cf0e2 cls/rgw: when removing delete marker, clean up instance entry +e8afa65 rgw: multi object delete supports versioning +9b31a83 rgw: break out of inifinite ECANCELED state +12ef0ac rgw, cls_rgw: conditionally remove olh object +b664903 rgw, cls_rgw: clean up olh artifacts when dropping last version +ecd5496 rgw: dump versioned epoch on system user bucket listing +cecea50 rgw: only set olh attr on actual olh object +d707db2 rgw: no need to set tag on object we're removing +4e82209 cls_rgw: only maintain object if there are preserved xattrs +85aa725 rgw: limit print length of bufferlist buffer +fc99601 rgw: multipart meta object shouldn't be versioned +3dd6994 rgw: remove clutter +7024ebd rgw: fix caching for remove_system_obj() +8cf22f7 rgw: fix get_system_obj() caching +fe158ec rgw: use correct objv_tracker for bucket instance +8f5e073 rgw: allow setting of explicit object version on non-versioned bucket +630c0ba cls_rgw: don't increase epoch when converting plain entry +6a05cc1 rgw: fix a few regressions +38b9352 rgw: move versioning handling to Object::Write::write_meta() +9b88af6 rgw: copy obj does versioning too +0903502 rgw: propagate version id when putting obj +b947c7c rgw: cleaup RGWRados::copy_obj() +8787b92 rgw, cls_rgw: provide optional version id, versioned epoch to olh ops +37d15f2 cls_rgw: link, unlink olh ops can get epoch +aa0667d cls_rgw, rgw: pending_log can hold multiple entries per epoch +d57cdd0 rgw: parse copy location version id +6c08f58 rgw: reduce use of Object::get_obj() +b4f3de0 rgw: Object::Read operations should use state->obj +37856d0 rgw: Object::Read::read() returns total bytes read +333f8d2 rgw: time out pending olh entries +445a4ac cls_rgw: don't write list entry when converting when deleting +2093aab cls_rgw: revise null object instance handling, versioned epoch +bda1561 rgw: read bucket owner when following olh if pending entries +aa888ab rgw: remove warning +3de35d8 rgw: remove unused code +90ed9a2 cls_rgw: clean up compilation warnings +56787ff cls_rgw: implement dump() and generate test instances +79bb0fd cls_rgw: guard certain operations using olh tag +01b8e61 rgw, cls_rgw: improve olh atomicity +3f29f0a rgw: encode timestamp in pending olh info +16f1b24 cls_rgw: remove instance entry when removing delete marker +a871a8d rgw: send x-amz-version-id and x-amz-delete_marker header fields +5e82500 rgw: add dump_string_header() +5ab83ef cls_rgw: add missing cls_cxx_create() +9e65570 rgw, cls_rgw: fix update of olh to reflect non existing object +33b19e7 cls_rgw: inc olh epoch when updating log +3e48a49 rgw: fix access to object through the null instance +b8b832b rgw: adjust versioning enable/suspend api +ba34ecf rgw: propagate object owner and mtime for deletion marker +7f13928 rgw, cls_rgw: multiple changes related to obj removal +0a3df98 rgw: send "null" version id if needed +5bca3b9 formatter: no need for dynamic allocation +4f622cc osd: fix filter_prefix scoping in omap_get_vals +3593b6c rgw, cls_rgw: add bi put +a8180ba cls_rgw, rgw-admin: create bi list operation +de3c5ec cls_rgw, rgw-admin: move bi_get() entry encoding to cls +cec02f9 cls_rgw: add missing flags encoding to rgw_bucket_dir_entry::dump() +75b9050 common, rgw: json escaping gets input buf size +9c347b9 rgw-admin, cls_rgw: add bi_get objclass operation +7013901 cls_rgw: keep null-versioned object as versioned object +ed1813d rgw: follow olh where needed +bb8365a rgw: unlink obj instance +55877be cls_rgw: unlink object instance +a6d65bb cls_rgw: update olh log when unlinking entry +89f9372 cls_rgw: more cleanup +fd9bffe cls_rgw: more cleanup +ca3104b cls_rgw: reorganize rgw_bucket_link_olh() +47f2bff rgw: convert RGWRados::get_attr() to new interface +9ec08b5 rgw: switch get_obj_iterate() to new interface +8d7c882 rgw: remove unused code +b0cc9e4 rgw: purge intent log +7f5c010 rgw: adjust to new interfaces +5c3985f rgw: s/RGWRados::ObjectCtx/RGWObjectCtx +7788daa rgw: clean up system obj interfaces +d32d945 rgw: change RGWRados::get_attr() +cd8c60e rgw: rework prepare_get_obj(), get_obj() +8ccf603 rgw: remove more unused code +4855c87 rgw: fix missing state initalization +71afabf rgw: switch RGWRados::delete_obj() to new interface +e3a4898 rgw: remove unused code +c5eb6f7 rgw: remove old index update calls +b771524 rgw: get rid of put_obj_meta(), replace with put_system_obj() +99cc362 rgw: don't use put_system_obj() for data objects +aec13bd rgw: pass around object context refrences, remove unused code +db143ea rgw: remove plain object processor +ce2abde rgw: start reorganizing RGWRados +ffee996 cmake: Fix CMakelist.txt to remove depleted files +d53275c ceph_test_objectstore: fix keyvaluestore name +738f868 PGBackend: do not update oi digest on inconsistent object +8ab3c41 osd: new pool safeguard flags: nodelete, nopgchange, nosizechange +6613358 Revert "Merge remote-tracking branch 'origin/wip-bi-sharding-3' into next" +66f3bd6 (origin/wip-recover-dentries) tools: output per-event errors from recover dentries +3e15fd5 tools: handle hardlinks in recover_dentries +9d91757 tools: recover_dentries efficiency +e2ae91f tweak comment wording in recover_dentries +5f34831 fixup some oversized lines +1dc023b fix handling of io.read retval +d94a7a8 tools: remove duplicated InoTable encoding +478659f JournalTool: handle corrupt fnodes +36830eb tools/cephfs: add recover_dentries to journaltool +46326ff (origin/wip-10388) mds: perfcounters for RecoveryQueue +62b4e43 mds/MDCache: stray/purge perfcounters +4bd0894 Doc: rbd-snapshot: Fix the typo +07e1d18 rbd: fix bug about rbd watch command +bbaf582 mon: handle case where mon_globalid_prealloc > max_global_id +d29aef5 doc: Fix OpenStack Glance configuration +1d1215f mon: change mon_globalid_prealloc to 10000 (from 100) +be1416a mon: silently ignore mark_down, mark_disposable on AnonConnection +b5e1bd1 (origin/wip-osd-df) mon/OSDMonitor: pull totals into the table format +169d680 mon/OSDMonitor: don't -nan for variance when no osds +9aa0006 common/TextTable: do padding during final step +ea5166e mon/OSDMonitor: drop unnecessary stringify +8a0d124 crushtool: fix cli tests for new tree output +4698882 osd/ReplicatedPG: skip all of maybe_handle_cache if caching is off +04c09ed crushtool: add --tree option +871c3ec crush/CrushWrapper: drop weights from crush dump_tree +86729e7 osd, crush: caps for headers +022950e crush/CrushTreeDumper: add missing close_section +7a04518 crush, osdmap: use weightf_t helper for all weights +9e22f61 osd: use TextTable for osd tree command output +1d984a5 osd: use weightf_t type when outputing weights by osd tree command +4bae3a8 mon: ceph osd df -- a new command to show OSD utilization +b42c7e2 Add a type (weightf_t) to output float weights. +3e2eaa4 osd: use CrushTreeDumper for printing osd tree. +3f9b4d1 crush: use CrushTreeDumper for dumping crush tree. +26921f4 crush: introduce a helper class for dumping crush tree. +4d0e0ae AsyncConnection: Fix memory leak for AsyncConnection +78b040c rgw: s/RGWRadosCtx/ObjectCtx +fa5f832 rgw: move RGWRadosCtx into RGWRados +559e705 rgw: set olh if object has been versioned +3b1ea1d cls_rgw: allow olh linking to null instance objects +1d49393 rgw, cls_rgw: don't remove olh objects +b1dd4a7 rgw: initial versioned object removal implementation +8d25ec6 rgw: bucket versioning status is tri-state +1488c03 rgw: add support for version-id-marker +4dadae3 rgw, cls_rgw: cls_bucket_list returns raw key in map +cd13c5a cls_rgw: update the appropriate prev key entry +674a754 rgw: fix rgw_obj initialization +7f26ab7 rgw: request state and various op functionality use rgw_obj_key +1dcdea3 rgw: cleanup, get rid of req_state::object +debee80 rgw: restful api now dumps versions +105ba48 rgw: propagate dirent flags to rgw (from cls), other fixes +5dfe152 cls_rgw: deletion marker needs to keep instance entry +9e3065b rgw, cls_rgw: list object versions is optional +9cf200c rgw: bucket listing gets extra param for versioning +bb649ff cls_rgw: revise the data model +bde5a8a rgw: add get_type() to rgw ops +337e523 rgw: add 'versioning', and 'versions' to handled subresources +303db77 rgw: object manifest should reflect instance +8819b38 rgw: update json encoding for rgw_obj +983c68e rgw: follow olh if needed +bc4dd1f cls_rgw: olh trim op is read/write +7a08619 rgw: tie set_olh() to object completion +cb94d55 rgw: more atomicity fixes, set_olh() +bf9d319 rgw: guard against racing writes +fb45e05 rgw: olh atomicity groundwork +67b73a9 rgw, cls_rgw: trim olh log functionality +1802136 rgw: apply olh log functionality +b5c54f0 cls_rgw: olh init op +d669a7e rgw-admin: add olh readlog command +2d86a68 rgw: implement rgw_bucket_olh_log_entry::dump() +b11551e rgw: new api to retrieve olh log +b2490b5 rgw: bucket index link olh interface +da05386 cls_rgw: object instance olh linking +bf11594 cls_rgw: bucket index link olh +038073f cls_rgw: encode / decode obj and list index keys +928b256 cls_rgw: prepare groundwork for olh +16b5c82 rgw: obj_stat() follows on olh +f32ceae rgw: some code cleanup +988310c rgw: init olh tag +d139f8d rgw: gen rand lowercase string (stl string version) +da98d13 rgw: adjust return code when generating random strings +f6bb825 rgw: gen rand lower alphanumberic string +57629b3 rgw: initial olh implementation +cb65826 rgw: remove old unused code +b2ea8e8 rgw: interface adjustment following a rebase +68af4a2 rgw: generate random instance id +6979c70 radosgw-admin: some commands use object_version param +8941d6f rgw: clean up some locator use +6c930f9 test: cls_rgw fixes +3697803 radosgw-admin: adapt to new interfaces +54f2e0a rgw: adapt to new objclass interface +840b086 cls_rgw: change data structures to keep single object key structure +fe435a6 rgw: rename cls_rgw_obj::key to cls_rgw_obj::loc +cb3694f rgw, cls_rgw: various datastructures use new rgw_obj_key +99da88c rgw: rename rgw_obj::key to rgw_obj::loc +45586aa rgw: decouple object name from index representation +201467d rgw: remove unused code +20c45eb rgw, cls_rgw: add accounted_size for object metadata entry +b383b52 rgw: enable s3 get/set versioning ops +7cd5e9d rgw: restful op to set bucket versioning +0d97b40 rgw: get bucket versioning status op +8ed79d6 rgw: add versioning_enabled field to bucket info +50547dc mon: PGMonitor: fix division by zero on stats dump +dbaa142 (origin/wip-bi-sharding-3) rgw: bilog marker related fixes +c4548f6 (origin/wip-10439) pybind: ceph_argparse: validate incorrectly formed targets +80a9d99 (origin/wip-mon-fixes) mon: Monitor: return 'required_features' on get_required_features() +ab996c1 mon: Elector: output features in handle_propose() +bb48ebe mon: Elector: put dangling message reference +0a369b9 mon: mkfs compatset may be different from runtime compatset +6b982e4 mon/OSDMonitor: require mon_allow_pool_delete = true to remove pools +b20ea5a tests: centos7 needs nc to run make check +3ee69e3 osd: fix journal header.committed_up_to +e85197c test: add test for osd scrub +f4b94e0 osd: support schedule scrub between some time defined by users +881fe33 test: Using different filename for different test case. +1511198 Striep: s/OSDExtent/ObjectExtent +bb582d9 librados: clean up code. +7cfdba2 librbd: clean up code. +7372ac7 crush: move two crush tests over +ddb91b2 crush: rename unit tests +7e1553c (origin/wip-10553) rgw: fix partial GET in swift +e7d5fdd (origin/wip-10552) client: fix getting zero-length xattr +97c1881 osd/PG: do not republish unchanged pg stats +d2e1049 osd/PG: avoid most of publish_stats_to_osd for non-primary +65d3342 osd/osd_types: add operator== for pg stat types +2f31606 (origin/wip-cephfs-tabletool) tools: create cephfs-table-tool +b8ffe5c mds: give MDSTables a `rank` attribute +ea153c3 mds: abstract SessionMapStore from SessionMap +d8d608d erasure-code: update links to jerasure upstream +dac666f erasure-code: tests use different pool/profile names +02cab93 documentation: add troubleshooting erasure coded PGs section +8b64fe9 erasure-code: set max_size to chunk_count() instead of 20 +2f87ac8 crush: set_choose_tries = 100 for erasure code rulesets +4d07a32 crush: update tries statistics for indep rules +6c34528 erasure-code: update jerasure/gf-complete submodules +fc01b01 doc: add cases where ceph-extras is not needed +2dc29de (origin/wip-9780-9781) ceph-objectstore-tool, test: Fix objectstore name changed to keyvaluestore +0c5b66d osd: Get pgid ancestor from last_map when building past intervals +7fb721c osd: Pass oldest_map when generating past intervals +b9a0484 osd: build_push_op() handle short reads so recipient doesn't crash +05d916e ceph_objectstore_tool: For import get object_info_t available for each object +afda6e4 ceph_objectstore_tool: Handle import of pg which OSD has split +68b27e2 ceph_objectstore_tool: On import following a split skip objects no longer in pg +da3be80 ceph_objectstore_tool: Verify that object pool and pgid pool match +f34b930 ceph_objectstore_tool: Fixes to not encode OSDMap due to CRC checking +19fdeea ceph_objectstore_tool: Check for splits and fail import if there were splits +b1f12f0 ceph_objectstore_tool: Add special exit code for test infrastructure +f24f646 ceph_objectstore_tool: Check that pool exists before allowing import +196c811 ceph_objectstore_tool: Check cluster_fsid before allowing an import +62dd912 ceph_objectstore_tool: Allow the metadata_section to be anywhere in the export +f727d2e ceph_objectstore_tool: import-rados shouldn't import internal namespace objects +ddc4613 ceph_objectstore_tool: Get g_ceph_context available to import-rados +fe93602 ceph_objectstore_tool: Fix import-rados skipping of snapshots +5cb6925 ceph_objectstore_tool: read_fd() doesn't handle ^D from tty stdin, don't allow +3de2d3b ceph_objectstore_tool: validate pgid before calling PG::_has_removal_flag() +22b7174 ceph-objectstore-tool: Remove --pretty-format and use new --format options +80473f6 os/FileJournal: Fix journal write fail, align for direct io +cc0dba5 mon: encode stashed monmap with all features +7bb7b1e AsyncConnection: Fix deadlock if socket failed when replacing +bd627e7 Event: Fix typo +f7f25b4 AsyncConnection: Don't increment connect_seq if connect failed +898d43d async: adjust test_msgr and normalize log output format +296e545 AsyncConnection: Fix replacing cause original state lossy +2bc1675 AsyncConnection: Don't discard out_q and unregister when replacing +c65df9b test_msgr: Add SyntheticInjectTest +a75ac0e AsyncConnection: Add ms_inject_* to AsyncConnection +50771dd AsyncConnection: Enhance replace process +a175390 AsyncConnection: set state_offset=0 in case of reuse this connection +2f92383 Event: Fix incorrect memset +4b900a6 test_msgr: Add SyntheticWorkload to do message measurement +e823af4 AsyncConnection: Don't alloc buffer when reenter "READ_FRONT" state +9fc24d4 test_msgr: Add test for a message with large payload +34cbd4c AsyncConnection: Avoid calling callback after delteing AsyncMessenger +9a84a90 test_msgr: Add random usleep to Dispatcher impl +e7db911 AsyncMessenger: wait for dispatch event done +e84d134 AsyncConnection: Add omissive STATE_WAIT state +cb3e1bf AsyncConnection: Adjust backoff wakeup granularity +44a0189 AsyncConnection: using send_keepalive instead of _send_keepalive_or_ack +a98b9e2 AsyncConnection: Fix mark_down race condition +24fd12f MessengerTest: Add markdown with caller lock tests +abb4e68 AsyncMessenger: Retry binding on addresses if binding fails +0a7c331 AsyncMessenger: allow RESETSESSION whenever we forget an endpoint +d93bdad AsyncConnection: Using buffer read to avoid small read overhead +8d2af2f AsyncMessenger: Using EventCenter instead of poll for bind +f4fcff1 AsyncMessenger: Bind async thread to special cpu core +0aeba0f ceph_objectstore_tool: Describe super_ver values +d91fe8b test_shared_cache::get_next: fix get_next call on uninitialized value +37dc423 shared_cache: reduce duplication between get_next's +9db5969 fix command 'ceph pg dump_stuck degraded' +3408156 (origin/wip-mon-drop-conversion) mon: Monitor: drop StoreConverter code +1d814b7 ceph_mon: no longer attempt store conversion on start +447d469 (origin/wip-9440) mon: Monitor: health to clog writes every X seconds on the second +ae1032e mon: Monitor: cache 'summary' string to avoid dups on clog +fcd7aa0 mon: Monitor: reset health status cache on _reset() +81a2faf mon: Monitor: write health status to clog every X seconds +e2d66ae mon: Monitor: 'get_health()' returns overall health status +7ce770d mon: Monitor: health summary to clog on get_health() +889969e (origin/wip-fail-idempotent) mon/MDSMonitor: make 'mds fail' idempotent for IDs +b957fa8 (origin/wip-10547-formatter) tests: adapt to new json-pretty format +97609a3 test: rename test_activate_osd +8d8ce96 common: restore format fallback semantic +e9aeaf8 mailmap: Loic Dachary name normalization +d80ded9 mailmap: David Zhang affiliation +4b47886 ReplicatedPG: on_chnage: clarify object_contexts.clear() comment +33ba23f common/shared_cache.hpp: empty() iff weak_refs is empty +d532f3e remove unused hold_map_lock in _open_lock_pg +9748655 man: add help for rbd merge-diff command +6986ec1 (origin/wip-10477) osd/PG: populate blocked_by with peers we are trying to activate +5b0e8ae mailmap: Yehuda Sadeh name normalization +3f03a7b doc/release-notes: v0.91 +4ca6931 doc/release-notes: typo +e7cc611 qa: ignore duplicates in rados ls +e5591f8 (origin/wip-10539) qa: fail_all_mds between fs reset and fs rm +26a2df2 mailmap: Josh Durgin name normalization +d6a9d25 doc/release-notes: v0.80.8 +45e9cd5 Fix make check blockers. +daefad7 xio: enable accelio debug on level 2 +aa5f195 xio: Get the right Accelio errno code +37719c3 Dequeue XioMsg on send-fail +d16e181 Reduce lock spam in XioPortal SubmitQueue. +f276145 xio: initial mark_* and queueing/flow control +1c2efde xio: Enable Accelio flow control with msgs and bytes throttlers +3c7e857 xio: Configure Accelio internal pool +dcfb80a Accelio Autotools glue. +aba35bc cmake: add xio +610d66f Ceph Accelio/RDMA Transport (XioMessenger). +a064237 Cosmetic ceph_mon.cc. +53bc4d1 Cosmetic ceph_osd.cc. +fd5cd93 Cosmetic ceph_mds.cc. +d53b378 Introduce Message flag values used by XioMessenger. +b4447e9 Add Message::set_src(const entity_name_t& src) +a96373f Remove pure virtuals from Message::CompletionHook. +ef7e735 Add intrusive list anchor for Message dispatch to Message. +984a3ee Add MDataPing. +71d08b4 Accelio ceph::buffer Extensions +4cbf2d5 Cosmetic: Normalize an entity_name_t initialization in ceph-syn. +2ffacbe msg: crc configuration in messenger +b677a86 Build rbd-fuse as a C++ unit (matching its existing linkage). +80b3ff0 mon: OSDMonitor sends maps over connection +9fff0c5 msg: remove create_anon_connection from Messenger +2401c3b dout: dlog_p macro for should_gather +a39cbe2 atomic: add and sub return their result +0f6b9f2 Combined CMake Build for Hammer +4368e0a Null tracepoint macro when !WITH_LTTNG. +f57383a Don't use __cplusplus to mean !__KERNEL__ +71e4987 Add missing Messenger::create ms_type in test_msgr. +3ce683a Fixup int_types.h. +3424bae (origin/wip-librbd-coverity) librbd: fix coverity false-positives for tests +f3a57ee rgw: wait for completion only if not completion available +833b277 ceph_test_objectstore: enable keyvaluestore experimental option +204fa0f ReplicatedPG::_scrub: don't record digests for snapdirs +0172069 common/shared_cache.hpp: restructure clear() +9daeaec (origin/wip-10382) mds: handle heartbeat_reset during shutdown +fc5cb3c osd/ReplicatedPG: remove unnecessary parameters +78b2cf0 osd: force promotion for watch/notify ops +c8bef13 osd/OpRequest: add osd op flag CEPH_OSD_RMW_FLAG_PROMOTE +a78a93e rgw: bi list, update marker only if result not empty +24aec12 rgw: fix memory leak +33dc07c rgw: initialize RGWBucketInfo::num_shards +d19a49d cls_rgw: call ioctx->aio_operate() under lock +9d17bd0 rgw: fix linkage following rebase +f060dd6 rgw: update calls to handle bucket sharding +0b5d803 rgw: only keep track for cleanup of rados objects that were written +ce0ed6b test: fix test_cls_rgw +c07af12 cls_rgw: remove incorrect function declaration +37a1186 rgw: max shards configuration is part of the zone config +7101665 rgw: pass num shards on bucket initialization +9536f74 rgw: write multi shard markers on replica_log appropriately +15703cf cls_rgw: extend shards marker api +0d1f97f rgw, cls_rgw: keep shard ids with oids +6b1c4a0 cls_rgw: clean up CLSRGWConcurrentIO +a063cba rgw: modify bucket instance shard marker ids +0d9c2d3 rgw: bucket replica log, handle shard ids +a2c3680 cls_rgw: list bi log should not return marker entry +d52a8b1 rgw: bucket_index_shard_hash_type fixes +44bc63b rgw: decode the req_state bucket instance id if needed +d31e84e rgw: improve bucket sharding hashing +a33ca59 rgw: data changes log, log info by bucket shard id +8793470 rgw: use new BucketShard structure for index manipulation calls +381f68a rgw: bi log list/trim can get specific bucket shard +8a04c0a Fix the multipart uploads functional test failures due to bucket index sharding. +231fa0e Fix get_bucket_instance_info, only build the oid if it is empty. +9e45a7c Adjust bi log trim implementation to work with multiple bucket shards. Signed-off-by: Guang Yang (yguang@yahoo-inc.com) +f9b280e Adjust bi log listing to work with multiple bucket shards. Signed-off-by: Guang Yang (yguang@yahoo-inc.com) +47665b2 cls_rgw, rgw: switch different ops to new concurrent infrastructure +30d0a49 rgw: generalize container type for concurrent IO base class +04441f2 cls_rgw, rgw: create base class for common bucket shard operations +9c5acd6 Adjust bucket stats/index checking/index rebuild/tag timeout implementation to work with multiple shards. +56feee7 Adjust bucket listing to work with multiple shards. +751fd07 Adjust rgw bucket prepare/complete OP to work with multiple bucket index shards. +5d004d3 Implement sharding for bucket creation. +90a3920 Add a new field to bucket info indicating the number of shards of this bucket and make it configurable. +364b868 (origin/wip-mon-propose) mon/Paxos: consolidate finish_round() +67a90dd mon: accumulate a single pending transaction and propose it all at once +d159586 PendingReleaseNotes: make a note about librados flag changes +725d660 (tag: v0.91) 0.91 +9264d25 (origin/wip-formatter) common/Formatter: new_formatter -> Formatter::create +617ad5d common/Formatter: improve json-pretty whitespace +83c3b13 common/Formatter: add newline to flushed output if m_pretty +e2a7b17 osd/PG: remove unnecessary publish_stats_to_osd() in all_activated_and_committted() +77bc23c osd/PG: add 'activating' pg state between peering and active +b578a53 (origin/wip-quota-test) qa: set -e explicitly in quota test +8d706cd osd/ReplicatedPG: init ignore_cache in second OpContext ctor +792ac7c osd/ReplicatedPG: fix cancel_proxy_read_ops +7c664fa Doc: Fix the indentation in doc/rbd/rbd-snapshot.rst +1c01c3a (origin/wip-librbd-rados-stub) tests: create unittest_librbd +c105003 tests: add mock librados API for supporting unit tests +1e9da43 include: moved RBD's generic FunctionContext wrapper +1483a43 msg/simple: remove redundant calling of setsockopt +9ef6ce5 FileJournal: check fsync/fdatasync result. +3cbe5da mon: check size must larger than zero. +3f03003 test/mon: Add test case for ceph osd pool set size/min_size. +e3678f4 mon: check min_size range. +7945f8d (origin/wip-8900) librbd: flush pending AIO requests under all existing flush scenarios +2dd0f03 librbd: AIO requests should retry lock requests +6176ec5 librbd: differentiate between R/O vs R/W RBD features +544ed96 librbd: Add internal unit test cases +17f22d9 librbd: Add ImageWatcher unit test cases +5160281 librbd: Add convenience library to support unit tests +4297e3b rbd: Allow CLI to optionally create shared images +ccadff1 librbd: Integrate librbd with new exclusive lock feature +9ee80b3 librados: bump rados version number +f5668d6 librbd: Create image exclusive lock watch/notify handler +2ecd874 (origin/wip-9956) osd: enable filestore_extsize by default +b76d0dc os/FileStore: verify kernel is new enough before using extsize ioctl +f4ff12a (origin/wip-mon-converter) drop ceph_mon_store_converter +a4152db (origin/wip-fs-reset) mon/MDSMonitor: add confirm flag to fs reset +8630696 qa: add `fs reset` to cephtool tests +1713ffd mon: implement `fs reset` +1f69476 Fix bug 10503: http://tracker.ceph.com/issues/10503 ceph-fuse: quota code is not 32-bit safe for vxattr output +4aa02f8 osd: add an option to prioritize heartbeat traffic +11bdfb4 osd: requeue blocked op before flush it was blocked on +c80c2cf test: modify test/cli/rbd/help.t for merge-diff +d300220 rbd: test case for rbd merge-diff +337f821 rbd: merge two diff files into one single file +9c82efc rbd: parse diff file body for diff merging +b4720ae rbd: parse diff file header for diff merging +f42ef1e (origin/wip-promote) ceph_test_rados: add some debug output +1554fbc osd/ReplicatedPG: improve proxy read cancelation +1c8b679 osd/ReplicatedPG: put proxy read completion on finisher +650f1d9 osd: tiering: avoid duplicate promotion on proxy read +43f13af osd: tiering: proxy instead of redirect read in writeback mode when the cache pool is full +bfb71a4 osd: tiering: cancel and requeue proxy read when needed +759db93 osd/ReplicatedPG: allow reads to proxy etc even if blocked +ce14310 test: add proxy read test +8e145e0 osd: tiering: proxy reads during promote +4dc9990 osd: tiering: add cache mode READPROXY +70d3d08 osd: tiering: add proxy read support +9ed2ac7 osd/ReplicatedPG: separate promotion from the triggering op +a03d375 osd/ReplicatedPG: pass promote error to all blocked operations +a4a4149 osd/ReplicatedPG: drop unnecessary cache_mode checks +2a67b0a osd/ReplicatdPG: adjust braces (no semantic change) +5361bc0 osd/ReplicatedPG: factor out must_promote case from all cache modes +8645ed7 osd/ReplicatedPG: factor out common exists case from all cache modes +1d89f18 osd/ReplicatedPG: make op argument to promote_object optional +2bbab05 OSD: add a get_latest_osdmap command to the admin socket +d5e8ef5 doc: Fix PHP librados documentation +a16e72c (origin/wip-mon-wishlist) doc: mon janitorial list is now a wishlist +19955fc doc: Replace cloudfiles with swiftclient in Python Swift example +5461368 mon: paxos: queue next proposal after waking up callbacks +d375532 rgw: return InvalidAccessKeyId instead of AccessDenied +dd57af2 rgw: return SignatureDoesNotMatch instead of AccessDenied +a238834 tests: install parted in centos Dockerfile +c1080b2 doc: Clean up pool usage. +38f424d doc: Cleanup RGW pool usage. +e6a4ab1 client: include ceph and git version in client metadata +f90c48f Revert "rgw: switch to new watch/notify API" +f887817 doc: Added section to install priorities/preferences. +bf8f062 (origin/wip-10311) rgw: only keep track for cleanup of rados objects that were written +55a5c5f tests: temporarily disable unittest_msgr +26e7d5f (origin/wip-asok-get-subtrees) mds: add asok command for getting subtreemap +1c1897e mds: give CDir a dump() method for JSON output +a58d104 (origin/wip-mdscacheobject-const) mds: support constness in MDSCacheObjects +e9033bb (origin/wip-librbd-snap-unprotect) librbd: shadow variable in snap_unprotect and list_children +cf432fa doc: Add Librados PHP documentation +d994e60 (origin/wip-table-formatter) common: Formatter: cosmetic re-indent +e797dcf common: Formatter: add TableFormatter class +c528d87 erasure-code: test repair when file is removed +9406b7f osd: accumulate authoritative peers during recovery +bcdbbd5 os: fix confusing indentation in FileJournal::corrupt +ecc3bca os: remove debug message leftover in FileJournal +63c8dd0 msg: initialize AsyncConnection::port +c60f88b Bump memstore_device_bytes from U32 to U64 +8811df3 FileStore: return error if get_index fails in lfn_open +20be188 (origin/wip-peeringqueue) osd: assert there is a peering event +492ccc9 osd: requeue PG when we skip handling a peering event +49d114f librados: Translate operation flags from C APIs +8d52782 (origin/wip-10445) rgw: use gc for multipart abort +6edfcc1 (origin/wip-nits) mds: allow 'ops' as shorthand for 'dump_ops_in_flight' +1617fbb osd: allow 'ops' as shorthand for 'dump_ops_in_flight' +3d2fbf7 tests: group clusters in a single directory +bd7be04 doc: don't suggest mounting xfs with nobarrier +8b3dfc9 rgw: check keystone auth also for s3 post requests +27cb78b mon, os: check the result of sync_filesystem. +3646e1e encoding: wrap ENCODE_START/FINISH arguments +fa96bb4 librbd: Stub out new exclusive image feature +478629b (origin/wip-10471) rgw: index swift keys appropriately +97cc409 (origin/wip-mdsmonitor-fixes) mon/MDSMonitor: fix `mds fail` for standby MDSs +c400ba1 mon/MDSMonitor: respect MDSMAP_DOWN when promoting standbys +487c22a (origin/wip-10384-ceph-test-helper-races) init-ceph: stop returns before daemons are dead +3d08a68 (origin/wip-da-SCA-20150102) msg/async/AsyncConnection.cc: reduce scope of variable +b99508b osd/ClassHandler.cc: move stat into error handling +fd4ac46 crush/crush.c: prevent DIVIDE_BY_ZERO +aacdaae src/common/obj_bencher: fix some UNINIT issues +c27e0fe mds/MDLog.cc: fix uninitialized pointer read +8511b55 librados/librados.cc: fix UNINIT issue +5ca4709 test/librados/snapshots.cc: fix resource leak, delete op +78542f9 ceph_objectstore_tool.cc: reduce scope of variable +a58446c tools/ceph_authtool.cc: reduce scope of some variables +7b5ccb7 msg/async/AsyncMessenger.cc: reduce scope of variable +2bd1833 msg/async/EventSelect.cc: reduce scope of variable +b7b13d2 ceph_monstore_tool.cc: unsigned can't be less than zero +678ece8 common/Cycles.cc: reduce scope of variable +b087008 src/mds/MDS.cc: remove unused variable +79d63a0 bench/tp_bench.cc: fix warning about self init +ed7ca16 test_mon_workloadgen.cc: fix warning about self init +f19c2e6 mds/Server.cc: fix compiler warning +2ab4003 mds/Capability.h: init num_revoke_warnings in constructor +36dd487 configure.ac: fix warnings about unknown commands +936b98a client/Client.cc: cleanup code to silence cppcheck +252fc03 ceph_objectstore_tool.cc: prefer ++operator for non-primitive iterators +42417e2 KeyValueStore.cc: prefer !empty() over size() for emptiness check +369af32 perf_counters.cc: prefer ++operator for non-primitive iterators +69f8223 ceph_context.cc: prefer ++operator for non-primitive iterators +3ccd792 client/Client.cc: prefer ++operator for non-primitive iterators +1a00fb7 test/librados/aio.cc: release completion before exit +2f54209 test/librados/aio.cc: delete AioCompletion* before return +485d139 (origin/wip-10041) client: fix mount timeout +397b261 common: Don't call ioctl(BTRFS_IOC_SYNC) in sync_filesystem. +3f7faa4 common: Directly return the result of syncfs(). +1c38895 disable tcmalloc by default when enable jemalloc +95d2174 osd/ECBackend: make sure localt uses tbl is ec txn does +5d66525 ceph-object-corpus: drop compat with old ObjectStore::Transaction +0354305 osd: fix Transaction::get_data_offset bug when map layout used +fda6019 osd: add feature CEPH_FEATURE_OSD_TRANSACTION_MAY_LAYOUT (1ULL<<47)>>) +5da6b41 osd: build fields for Transaction::iterator when tbl is used +1889d39 ceph_perf_objectstore: fix warning +d427ca3 osd: Transaction::append & Transaction::swap +6b2103b osd: new Transaction::iterator interface +a4575d1 osd: add encode/deocde impl for new layout +3db4f69 osd: new format for Transaction encode/decode +dbae922 osd: Add Transaction::TransactionData for fast encode/decode +3bd0042 osd: remove unused Transaction fields +de02134 tests: resolve ceph-helpers races +bea2d4a qa: drop tiobench suite +8618a53 cli: ceph: easier debugging (pdb) with 'CEPH_DBG=1' +55f8fee (origin/wip-10412) client: fix use-after-free bug in unmount() +93d39a8 cleanup: fix a compile warning +ea3ed5b TestLFNIndex.cc: For root, dont do permission operations. +488355c (origin/wip-fix-copyfrom) osd: fix object_copy_data_t compat encoding +ed50377 (origin/wip-repop) osd/PG: print last_update_applied if != last_update +78d2d31 Add MOSDRepOp and MOSDRepOpReply +6ca2eb8 configure: show pkg names when libkeyutils is missing +5cf84e6 (origin/wip-watch-leak) librados: fix leak of WatchContext on unwatch +b5c24e4 qa: add test_tell, which currently is used only for testing 'ceph tell mon version'. +244777d test/bufferlist: For root, don't do permission operation for read_file case. +3b4e021 qa: refactor 'ceph -w' magic in test_mon_misc by introducing helper functions ceph_watch_start and ceph_watch_wait so they can be reused in other tests. +1189138 mon: make ceph tell mon.* version work +c7cc6af rbd: write a diff description into the merged diff file +bca862c rbd: parse merge-diff arguments +0b6ab82 rbd: add an option merge-diff +bdd0e3c (origin/wip-10351) mount.ceph: avoid spurious error message +6e67450 (origin/wip-10387) client: close dirfrag when trying to trim an inode +274b989 doc: rm reference to old Ubuntu release +0471be6 debian: create a repository from sources +c8f56ab AsyncMessender: use IOV_MAX instead of IOV_LEN +d49b694 AsyncMessenger: s/sended/sent/ +c9da51d AsyncMessenger: should retry in case of EINTR +169e8bd msg: fix factory error message +ec1f58a unittest_msgr: enable experiemntal async msgr +1265603 (origin/wip-10441-b) osd: force read bit for watch +4642441 osd: drop unused watch_info_t w +cef7a82 KeyValueStore:: do_transactions: clean up code which is never used clean up ops and bytes which is never used in do_transactions() +dfd6a38 (origin/wip-mon-janitorial-list) src/doc: add monitor janitorial list +1dba143 Make pg dump {,sum,pgs,pgs_brief} work for format=plain +7d75f0c Makefile: include radosgw-admin in base +38350a0 client: fix quota signed/unsigned warning +b7b4534 common: log which experimental features are enabled. +55405db ms: mark async messenger experimental +44ce7cc os: rename keyvaluestore-dev -> keyvaluestore; mark experimental +8a55972 common: add 'enable experimental data corrupting features' +783956c (origin/wip-10341) tools: ceph-monstore-tool: validate start/stop vals +60e9c3f tools: ceph-monstore-tool: output number of paxos versions dumped +b27ca4c tools: ceph-monstore-tool: raw map to stdout if outfile not specified +68f3b77 tools: ceph-monstore-tool: use subcmd parser helper +a186ee1 tools: ceph_monstore_tool: add sub-command parser helper function +fe662c5 tools: ceph-monstore-tool: a cli that works +793c32d Event: Avoid illegal multiplication for memset +4193594 mailmap: Chris Holcombe affiliation +bb09b20 mailmap: Alfredo Deza affiliation : Fix Typo. +f3fd07c mailmap: Christos Stavrakakis affiliation +a8542d0 mailmap: Ning Yao affiliation +9636dfc mailmap: Shishir Gowda affiliation +eb659ce mailmap: David Anderson affiliation +977db4f mailmap: Matt Benjamin affiliation +6cea1e3 mailmap: Yunchuan Wen affiliation +fe44cd3 doc: Updates information for SSL configuration in Ceph Object Gateway installation. +7526767 ceph pg dump: num_objects_misplaced is missing for pools and summary +25cf82e AsyncMessenger: reset newly allocated file_events +852aab6 PG:: filter_snapc: Return immediately if no snapc need to trim we can return immediately if no snapc need to trim. Do not iterater snapc vector and do extra judgement and ops. +45fb9a3 FileJournal: Don't cache journal data if journal w/o directio mode +e4e1777 AsyncMessenger: fix the leak of file_events +70ef30f osd: osd tree to show primary-affinity value +aa56ee4 (origin/wip-10422) mon: provide encoded canonical full OSDMap from primary +d7fd6fc (origin/wip-10372) osdc/Objecter: improve pool deletion detection +a540ac3 librados: only call watch_flush if necessary +6b030aa mds: add default ctor for quota_info_t +ee6529b AsyncMessenger: Fix leak memory +b41a739 10132: osd: tries to set ioprio when the config option is blank +9aa65aa Makefile: Restore check +69dbfce AsyncConnection: Init peer_global_seq +917ed96 test_msgr: Avoid deadlock between send_message and dispatch +1cb78ee AsyncMessenger: Make learn_addr async to avoid destroying lock rule +1c0af36 AsyncConnection:: Avoid getting stopping connection +6b01b5e AsyncConnection: Ensure reply connect_seq larger than sent +926a1b7 librados: only call watch_flush if necessary +73257e8 os: WBThrottle: optimize map to unordered_map Using unordered_map to save the cpu cost and acceralate map::find() operation. +d3fb563 (origin/wip-10415) libcephfs/test.cc: close fd before umount +b95c73e librados: warn about rados_watch_flush() prior to ioctx shutdown +93825bf librados: watch_flush() on shutdown +7de1b4d librados: add rados_watch_flush() call +5cf4483 osdc/Objecter: do notify completion callback in fast-dispatch context +1fbe9b6 librados: warn about rados_watch_flush() prior to ioctx shutdown +4ce6d25 (origin/wip-stop.sh-me) stop.sh: killall -u takes username, not uid +dab5391 (origin/wip-10414) client: fix uninitialized member +3f3f2fa osd: be_compare_scrubmaps uses incorrect j iterator +d87918a (origin/wip-10409) osd: scrub: only assume shard digest == oi digest for replicated pools +a25429c osd: clean up use of hex for digests +9c96fbb osd/ECBackend: use correct seed for (empty) omap digest +7f9c03d (origin/wip-pg-stat) mon/PGMap: restructure 'pg stat' formatted output +e89bafb remove unmatched op code comparasion +4bb6e29 tests: use port 7111 for osd-copy-from.sh +6f8aad0 tests: recovery of a lost object in erasure coded pools +f4da356 objectstore: add fadvise_flags operations in ObjectStore::Transaction::append func. +992e7ea tests: remove spurious lines from osd-scrub-repair.sh +bb921a8 packages: add python-virtualenv and xmlstarlet +6ce1469 tests: reduce centos docker intermediate steps +b15bd60 tests: add docker-test.sh --ref giant|firefly etc. +f080595 tests: avoid bash == --shell confusion in docker-test-helper.sh +4a1c3b2 tests: add xmlstarlet in containers +2d0d388 tests: helpers to run make check in containers +46c83d9 tests: run-make-check.sh arguments are passed to configure +94abadb tests: replace --enable-docker with --enable-root-make-check +7b68f70 tests: docker-test.sh commands are relative to git root +812570e tests: deprecate docker-test.sh --compile option +6218138 tests: enable password-less sudo in containers +19b6de3 tests: ceph.spec.in or debian/control rebuild docker images +d8f84d1 tests: docker images must use install-deps.sh +80f20f8 tests: run-make-check.sh install jq +2de2c4b install-deps.sh: do not require sudo when root +e99da68 (origin/wip-mon-health) mon: make 'ceph -s' show pg state counts in reverse descending order +9c8827a (origin/wip-osd-ctor) osd/ReplicatedPG: initialize new_backfill in ctor +30678f6 (origin/wip-watch-notify-2) librados: watch_flush() on shutdown +4ebd4b4 librados: add rados_watch_flush() call +218de82 (origin/wip-9059-checksums) osd: scrub: wait for digest updates to apply before next scrub chunk +1646d17 osd: change omap data encoding in object_copy_data_t +925f572 test/osd/osd-copy-from: simple test of copy-from and error injection +6d80078 rados: use copy_from for rados cp (and cppool) command +5d2d839 osd: add copyfrom error injection +f8c1d40 osd: pass and verify data+omap digest on copyfrom +75b2bc2 osd: EIO if a full-object read produces a bad digest +55bf020 osd: scrub: set a min age before we update whole-object digest +28d4dd8 osd: scrub: record whole-object digest on scrub +6feb4a1 osd: scrub: complain about bad digest in final pass auth check +85f677a osd: scrub: be explicit about whether bad digest is known bad +14f3c26 osd: scrub: disqualify shards with digests that disagree with oi digest +cf3b047 osd: scrub: share auth oi with caller and be_compare_scrub_objects +74bd870 osd: move scrub no good auth check out of helper +9c3afcc osd: remove more (most? all?) of classic scrub +7d73f41 osd: use -1 for deep scrub digest seed on new OSDs +e68d771 osd: drop vestigal invalid_snapcolls fields from scrub +591e7e1 osd: clean up scrub method debug output +3f7b2cf osd/osd_types: add {data,omap}_digest to object_info_t +8a75800 osd/ReplicatedPG: kill some dead scrub code +056de09 osd/ReplicatedPG: set and invalidate data/omap digests on osd ops +9d5d491 doc: Adds updated ceph-deploy man page under man/ +8c38cc6 doc: Fixes a typo in ceph-deploy man page. +46a1a4c (origin/wip-10319-wusui) If trusty, use older version of qemu +7f1e510 (origin/wip-10400-quota-info-t) mds: add default ctor for quota_info_t +18d6b20 doc/release-notes: v0.90 +9b78daf osdc/Objecter: do notify completion callback in fast-dispatch context +ecbdbb1 tests: temporarily disable unittest_msgr +08bd1e1 (tag: v0.90) 0.90 +49c2322 doc: Instead of using admin socket, use 'ceph daemon' command. +a302c44 ceph-disk: Fix wrong string formatting +2f63e54 cleanup : remove sync_epoch +19dafe1 (origin/wip-10255-wusui) Remove sepia dependency (use fqdn) +1eb0cd5 (origin/wip-osdmap) osd: only verfy OSDMap crc if it is known +1b7585b stop.sh: only try killing processes that belong to me +0af2a1c (origin/wip-10326) qa/workunits/rest/test.py: fix pg stat test +2a1bd76 .gitmodules: update ceph-object-corpus auth repo to github +623ebf0 osd: clear ReplicatedPG::object_contexts when PG start a new interval +1f9c087 AsyncConnection: Fix time event is called after AsyncMessenger destruction +20ea086 PipeConnection: Avoid deadlock when calling is_connected +9783a5c test/msgr/test_msgr: Fix potential unsafe cond wakeup and wrap check +bba4d35 (origin/wip-librados-init) librados: init last_objver +2cd9dc0 (origin/wip-caps-init) messages/MClientCaps: init peer.flags +679652a (origin/wip-osdmap-leak) osd: fix leaked OSDMap +18f545b librados: Avoid copy data from librados to caller buff when using rados_read_op_read. +001ea29 Messenger: Create an Messenger implementation by name. +3a2cb71 (origin/wip-fix-asok) mds: fix asok on rank 0 +8de9a0f doc: Adds updated man page for ceph under man/ +8b79617 doc: Changes format style in ceph to improve readability as html. +7093cb3 doc: Adds updated man page for ceph-disk under man/ +62b3fcd doc: Updates man page for ceph-disk with suggested changes. +2862a49 doc: Adds updated man page for ceph-disk under man/ +3f6be22 doc: Updates man page for ceph-disk. +9252d75 osd: add ObjectContext cache perf counter +98110f6 osd: change ReplicatedPG::object_contexts to SharedLRU +d61b1d9 shared_cache: add lookup_or_create, get_next, etc. and their unittests +883e1ae doc: Show how new data pools can be added to CephFS for file layouts +2b577ce packaging: package ceph-deploy(8) +c664818 doc: Adds updated man page for ceph-deploy under man/ +e638469 doc: Updates man page for ceph-deploy. +a806778 (origin/wip-qa-empty-xattr) qa: test zero size xattr +42dc937 librados: avoid memcopy for rados_getxattr. +4f72ba5 (origin/wip-cot-rename) ceph_objectstore_tool: Rename generated binary to ceph-objectstore-tool +1b2b344 (origin/wip-10335) MDS: do not allow invocation of most commands on an inactive MDS +69fa532 ceph.spec.in: quote %files macro in comment +aea232c client, librados, osdc: do not shadow Dispatcher::cct +378ebb7 python-rados: refactor class Rados a little bit +59b70fe Cleanup: Drop hobject_incorrect_pool +0c9d55d pybind/cephfs: Fix setxattr function. Pass value as character pointer +023a8ac (origin/wip-test-helpers) tests: ignore xmlstarlet extra empty lines +e582135 (origin/wip-pgmeta) os/FileStore: better debug on omap_setkeys +f6ca2bc os/FileStore: better debug on unlink +43f0bcb os/MemStore: drop support for collection attrs +17e4e19 os/ObjectStore: deprecated collection_getattr et al +56232d9 ceph_test_objectstore_workloadgen: set pgmeta omap instead of collection xattr +82f452c osd/PG: drop PG/collection attrs from ScrubMap +a1a3e15 os/ObjectStore: deprecated collection attr operations +db3daaf osd/PG: drop PG::read_info support for ancient PGs +880135a osd: drop snap_collections +5877c06 osd: drop infos_oid arg from PG::read_info() +a599d88 osd: drop legacy arg to PG::peek_map_epoch +f93b293 ceph_objectstore_tool: use '_remove' pgmeta omap key to indicate removal too +cd462d1 osd: move pg removal flag into a static helper +f056bdf ceph_objectstore_tool: Prevent tool from transitioning struct_v on rm-past-intervals +fbf6408 ceph_objectstore_tool: Clean-up unused struct_ver in tool's metadata section +d6df6ea osd: retire meta/infos object entirely +9d1466c osd: prevent upgrade from older than v7 +d1973f3 osd/PGLog: drop support for ancient logs +8cb25cb test/osd/osd-test-helper.sh: enable filestore log +6074bdd osd: move pg log and info to a per-pg object +8fa9407 osd/PGLog: explicitly pass log_oid collection +9819221 osd/PGLog: take ghobject_t instead of hobject_t +be86cc7 osd: move PG collection creation into static PG method +5a5a4a8 osd: don't need to pass object names via ctor +35fcfce osd/PG: define pgmeta_oid member +4d22adf osd: skip pgmeta object on remove_dir +e247cd4 ceph-objectstore-tool: skip pgmeta object on export +9ebdb99 osd/PGBackend: skip pgmeta objects +a56f10a osd/osd_types: spg_t::make_pgmeta_oid() +033a533 common/hobject_t: add pgmeta named ctor and is_pgmeta() check +c765de6 common/hobject_t: fix whitespace +95eccd8 osd: add PGMETA ondisk feature +1821492 os/FileStore: move to v4, trigger DBOjectMap upgrade +69e169d os/DBObjectMap: new version v2; drop support for upgrading from v1 +462bad3 ceph_test_rados: generate mix of small and large xattrs +456255b os/DBObjectMap: include hash in header key for EC objects +9f53eeb (origin/wip-7317) doc: add cephfs ENOSPC and eviction information +a8babcb client: add 'status' asok +6fdf890 client: propagate flush errors to fclose/fsync +a8611ac client: handle ENOSPC in _flush +cdf679b mds: add 'osdmap barrier' admin command +fcc64f3 mds: set epoch barrier on transition to active +40503ff mds: implement osd epoch barrier on caps +2d993c4 messages: always encode barrier +68ba7f5 messages: add osd_epoch_barrier to cap msgs +fc7d62a mds: return ENOSPC on write ops while osds full +09287fd osdc: add public Objecter::osdmap_full_flag +56af795 (origin/wip-10329) rgw: return InvalidAccessKeyId instead of AccessDenied +ef75d72 rgw: return SignatureDoesNotMatch instead of AccessDenied +bab3d3d osdc: remove spurious _maybe_request_map return value +cf3101a osdc: implement Objecter::set_epoch_barrier +c4861a6 osdc: continuously subscribe to osd map on pause +3ad6ed3 osdc/Objecter: add have_map method +fe32d6e osdc/Objecter: add op_cancel_writes +a991212 osdc/ObjectCacher: invoke flush_set_callback on purge_set +bb80437 erasure-code: relax cauchy w restrictions +058f433 man: Deprecate preferred OSD setting for cephfs +37a9969 (origin/wip-10299) librbd: complete all pending aio ops prior to closing image +02fae9f (origin/wip-10262) osd: handle no-op write with snapshot case +db951ae cls/refcount: ENOENT when put on non-existent object +9ff9144 (origin/wip-librados-fadvise) librados: do not choke on asphyxiate doc generation +394fd4c (origin/wip-9405) librbd: fixed garbage output from test LibRBD.TestIOPP +1853461 (origin/wip-10220) mon: Paxos: reset accept timeout before submiting work to the store +b5381c2 ReplicatedPG: Make pull and push op use sparse read +31adfeb doc: fix spelling in corpus page +12808b9 osdc/Objecter: respect honor_osdmap_full setting +7e84034 os: free space tracking for MemStore +e8d3399 (origin/wip-10201-osd-scrub-repair) tests: convert osd-scrub-repair to ceph_objectstore_tool +aa54640 tests: shell functions toolbox dedicated to testing +f0961ae mailmap: Blaine Gardner affiliation +b0e88a0 mailmap: Lei Dong affiliation +6d683d1 mailmap: Sandon Van Ness name normalization +973e9f7 jemalloc-support: Added --with-jemalloc configure option +ad20551 mailmap: Chendi Xue name normalization +04ab409 mailmap: Ding Dinghua affiliation +d048ec9 mailmap: Dongmao Zhang affiliation +a3dd8b0 mailmap: Kefu Chai affiliation +c40176e mailmap: Michal Jarzabek affiliation +5d97384 mailmap: Xinze Chi affiliation +1fd074d mailmap: Karl Eichwalder affiliation +e90818f mailmap: Dan Mick name normalization +cc05518 mailmap: Adam Spiers affiliation +41707ee mailmap: Nilamdyuti Goswami affiliation +3886734 ceph_test_rados_api_io: fix new test +e3ba3d2 (origin/wip-watch-notify) ceph_test_rados_api_watch_notify: use 5 min timeout for notifies +a2572c3 ceph_test_stress_watch: do not unwatch if watch failed +35f084d (origin/wip-test-huge-tickets) qa: add script to test how libceph handles huge auth tickets +e7d434b (origin/wip-warning) tests: fix signedness compilation warnings +847e5e1 (origin/wip-9555) osd: check that source OSD is valid for MOSDRepScrub +707a111 osd: pass Message* to most require_* helpers +09c1648 osd: drop redundant check in handle_replica_op +b6401c1 ceph-disk: LOG.info instead of print +e0f052a ceph-disk: test re-using an existing journal partition +0e4cb57 ceph-disk: fix get_partition_uuid for loop/cciss +29eb135 ceph-disk: don't change the journal partition uuid +b9ddf97 documentation: simplify running make check +35e4f42 tests: install parted in centos container +85ab278 tests: install hdparm in containers +60bca67 tests: update centos docker file to epel 7.5 +e038b126 tests: docker tests only need a workdir, not a clone +53929ba (origin/wip-10270) librbd: gracefully handle deleted/renamed pools +f79b7fe librados: Added new API methods to create an ioctx by pool id +5cf193c (origin/wip-10307) rgw: use s->bucket_attrs instead of trying to read obj attrs +f773c74 (origin/wip-swift-storage-policy) rgw: cannot modify swift bucket policy +07dc42a rgw: dump X-Storage-Policy header on bucket HEAD +f16da1c rgw: compare placement target on bucket recreation +c55d7da librados: remove IoCtxImpl lock member +c598e63 librados: stop using IoCtxImpl lock for watch/notify functions +90246c1 osdc/Objecter: only ping after watch is registered +50e9e39 librados: do not overload C++ API methods with new signatures +ffd6c7e doc: Adds man page for ceph under man/. +76da87a doc: Adds man page for ceph. +7409ab3 (origin/wip-9254) rgw: http headers need to end with \r\n +0801361 mon/OSDMonitor: dump inc and full maps we get a crc mismatch +f31135c mon/OSDMonitor: do not reencode OSDMap on 'osd getmap' +b1f1381 ceph-dencoder: mark OSDMap as featureful, but with stray data +8a674da osdmaptool: allow OSDMap encode +32a837d osd: add osd_inject_bad_map_crc_probability option +d898698 osd: verify our OSDMap encoding based on crc +716f90f mon/OSDMonitor: verify full_crc when available +5fc7a0b (origin/wip-10271) rgw: change multipart upload id magic +7925b82 rgw: Conditional PUT on ETag +023927b ReplicatedPG: For MAPEXT, using bl.length() instead of op.extent.length as num_rd_kb. +c1dc361 ReplicatedPG: Don't use the return value of getattr_maybe_cache as attr length. +0c802e1 test/librados: Add test case for librados function which can handle fadvise flas. +bf156e5 test/librbd: Add test case for librbd function which can handle fadvise flags. +c9d15b0 FileStore: Implement fadvise handle for read-operation. +4f12974 ECBackend: Make parity data don't cache. +3752864 ObjectStore/Transaction: Add fadvise_flags to track write fadvise flags. +8acc932 PGTransaction: Modify append/write function can handle fadvise flags. +5f92d82 osd: Make async-read can handle fadvise flags. +a727470 include: Remove unused code: class triple. +9b1f347 types: Add operator<< for type boost::tuple. +edaacf9 encoding: Add type boost::tuple encoding/decode func. +fc639b1 PGBackend: Make objects_read_sync can handle fadvise flags +2dedf31 ObjectStore: Modify read function can handle fadvise flags. +7853f8d osd: print OSDOp flags +d3ce0d6 librbd: increment version for new functions rbd_read2/write2,rbd_aio_read2/write2. +d2b0152 librbd: add new read/write api for librbd C++ interface which handle op flags. +5896f99 librbd: add new read/write api for librbd C interface which handle op flags. +847d988 librbd: Add set_op_flags in AioWrite to set op_flags for rbd write. +7b11c47 librbd: Add m_op_flags in AioRead to track op flags for rbd read. +da862e2 librbd/internal: Modify read/write api to handle op flags. +c5ed33d librados/ObjectOperation: add new function set_op_flags2 +b35cb48 librados: Add read/write fadvise op flags CEPH_OSD_OP_FLAG_FADVISE_*. +5b54410 librados: Add read/write fadvise op flags in ObjectOperationFlags. +f5abed7 librados.h: Add read/write op fadvise flags LIBRADOS_OP_FLAG_FADVISE_*. +e8e27a8 (origin/wip-10296) unittest_blkdev: test an abbreviated /sys/block dir +5e454a8 common/blkdev: add simple sandboxing function for testing +9b26de3 ReplicatedPG: fail a non-blocking flush if the object is being scrubbed +dce6f28 ReplicatedPG::scan_range: an object can disappear between the list and the attr get +6110220 debian: enable libgoogle-perftools-dev on arm64 +2246dca common/blkdev: fix block device discard check +25e3783 common/blkdev: get_block_device_base +beaa04e mon: MonitorDBStore: allow randomly injecting random delays on writes +2ad55cd (origin/wip-10296-journal-discard) tests: do not ignore ceph-disk.sh::test_activate_dev failure +9c5fd8c os: do not attempt to detect discard by default +21e07eb rgw: url decode http query params correctly +279c199 ceph_test_rados_api_watch_notify: fix a zillion warnings +531e8bb ceph_test_rados_api_watch_notify: use GT macro +008d788 ceph_test_rados_api_watch_notify: print err to debug +c1dd92b osdc/Objecter: normalize watch error (ENOENT on delete) +5559e6a (origin/wip-10288) mon: fix `fs ls` on peons +b025f56 (origin/wip-typo) mds: fix log typo +a8f85dc (origin/wip-9323) mon: allow full flag to be manually cleared +2e5ee30 Finisher: call signal if necessary in function queue +d92e2ca lttng: add int type definitions +060cbaa cycles: add reader for i386 and aarch64 +370bb96 Add unittests for safe sharing and make_shareable() +6a45d75 Add diagnostic unshareable buffer. +28725eb Restore zero-copy buffers in OSD fast path. +5f551cc Add safe-sharing to buffer::list and buffer::ptr. +b038e8f (origin/wip-8797) Call Rados.shutdown() explicitly before exit +5ba9b8f rados.py: remove Rados.__del__(); it just causes problems +8b195ec check endpoints is not empty before use it. +320c256 osdc/Objecter: only issue one error per watch; do it through one path +1e32e3b ceph_test_rados_api_watch_notify: wait longer for osd to time us out +78eed52 ceph_test_rados_api_watch_notify: weak assert cookie is valid (it's a ptr) +6f43c6c osdc/Objecter: pass correct cookie value to error +b34e545 os/FileStore.cc: insert not empty list to op_finisher/ondisk_finisher. +7ab4a39 ceph.conf: update sample +efd9d8d (origin/wip-librbd-test-cleanup) tests: Minor cleanup to librbd test +78a15ee Fix libstriprados::remove, use strtoll insdead of strtol +2d4dca7 (origin/wip-10029) SimpleMessenger: Retry binding on addresses if binding fails +e8063a1 test: modify cephfs quota test case +31a0cdc mds: fix parse_quota_vxattr for invalid data +bab7122 OSD: FileJournal: call writeq_cond.Signal if necessary in submit_entry +17d6390 os: IndexManager:: optimaze map col_indices col_indices is just used to cache CollectionIndex, and use col_indices.find() to get its corresponding index. Without any using of up_bound() and low_bound(), we can use unordered_map to make it fast. Based on perf, when I chanage map to unordered_map, the cpu cost for get_index(coll_t c, const string& baseDir, Index *index) is much lower. +4036b91 os: FileJournal:: fix, uninitialization of FileJournal throttle Since after firefly, take() in class throttle add if(0 == max.read()) return. If throttle is not initialized with max throttle value, it actually does not work. So initialize it in FileJournal +6b51a9f (origin/wip-10164) mds: set dirfrag version when fetching dirfrag is skipped +17c72f5 (origin/wip-10010) ceph-osd: remove extra close of stderr +5836899 Revert "client: support listxattr for quota attributes" +89b2fee (origin/wip-crush-straw) mon: 'osd crush reweight-all' +dd7b58f crush: set straw_calc_version=1 for default+optimal; do not touch for presets +adf5c6d crush/builder: a note about the original crush_calc_straw() +9000068 mon: add 'osd crush {get,set}-tunable [value]' commands +606b004 (origin/wip-gfcomplete-dirty) gf-complete: update submodule to newest upstream +bf0d8d3 (origin/wip-cleanup-removal) osd: Remove dead code related to old pg removal mechanism +0827bb7 (origin/wip-10277) client: use remount to trim kernel dcache +dfcb1c9 client: cleanup client callback registration +2f52202 Revert "client: invalidate kernel dentries one by one" +9902383 (origin/wip-9998) crush/CrushWrapper: fix create_or_move_item when name exists but item does not +8c87e95 crush/builder: prevent bucket weight underflow on item removal +eeadd60 crush/CrushWrapper: fix _search_item_exists +a198dee Modifying the docs to add the Get pool commands to match the CLI. Signed-off-by: Chris Holcombe +3a84602 Include common/likely.h in buffer.h +e8b412c mailmap: Zhiqiang Wang name normalization +c0ce4a5 (origin/xiaoxichen-cleanup_getheader) Cleanup:Use get_type()instead of get_header().type +c2d9333 WBThrottle: make bytes/ios/inode_wb's perf counter effective +12d85c6 Fix stack buffer overflow reported by ASan. +f6f6ea2 Fix alloc-dealloc mismatch reported by ASan (new[] vs. delete). +5bb8666 Fix alloc-dealloc mismatch reported by ASan (malloc vs. C++ delete). +8ed536e ceph_test_rados_api_watch_notify: fix signed/unsigend +45223d9 librados: mark new API watch/notify calls +812ff7a ceph: respect the PYTHON environment variable for dev mode. +1bf39db AsyncConnection: Add loopback connection support +fca14dc AsyncMessenger: Fix accept connection replacing process +e446a8f AsyncConnection: Avoid name conflicting with AsyncMessenger +b3e3fae AsyncConnection: Avoid hungry if mark_down's caller is the eventcenter's owner +09b3e77 FileStore: Move ftruncate to do_sparse_copy +f5bf75f python-rados: Add object lock support +f6d81d3 PipeConnection: Modify "is_connected" semantic +2dfda54 Messenger: Add unit tests +dc67cd6 rgw: switch to new watch/notify API +1ac17c0 osd_types: op_queue_age_hist and fs_perf_stat should be in osd_stat_t::operator== +9029813 common/ceph_context: don't import std namespace +59b423e ceph_objectstore_tool: Accept json object with --pgid instead of array +de6384f ceph_objectstore_tool: Improve object spec parsing error messages +eae7c02 ceph_objectstore_tool: Fix errors messages in newer code +32c832f ceph_objectstore_tool: Remove extraneous endl on error throw messages +cca85a5 ceph_objectstore_tool: Add --format and --pretty-format support +00c96c2 doc: Adds ceph-deploy man page in TOC. +d93e561 doc: Adds ceph-deploy man page under /man. +9191005 doc: Adds man page for ceph-deploy. +f4735cf .gitignore: add ceph_perf_objectstore +bcee92e StoreTest: Add tests for clone_range op +cabb57a FileStore: Fix _do_sparse_copy_range don't truncate zero sections +980f094 common: bufferlist::get_contiguous return 0 when param len == 0 +be11a45 (origin/wip-fadvise) os/FileStore: stop disabling fadvise on XFS +d6a7a7c os/FileStore: merge filestore_replica_fadvise -> filestore_fadvise +5eacd3c ceph_objectstore_tool: Strip _* (always _head) from pgid in list entry output +b617ee2 ceph_objectstore_tool: BUG: --op list wasn't including snapshots +5a66db9 ceph_objectstore_tool: For terminal output of list one object per line +bc6ea9c ceph_objectstore_tool: In error case umount objectstore +ddba267 objectstore_tool: test --op list variants +df9d5c5 objectstore_tool: parse new object description format +c69aace objectstore_tool: filter --op list and explore all PGs +7c1165f objectstore_tool: lookup objects by name +d9e747b objectstore_tool: refactor list-lost and fix-lost +a90233c objectstore_tool: update usage strings +6de83d4 Cache hobject filestore_key to avoid massive _reverse_nibbles calls +58682d1 ceph-disk: dmcrypt file permissions +2b59c5a common/Initialize.h: add header file to Makefile.am +5da15ee mds: drop dentry leases in deleted directory +f55a1f8 (origin/wip-mds-readonly) mds: disallow flush dentry/journal when MDS is readonly +f4f1880 mds: properly unregister asok commands +818a807 mds: drop dirty dentries in deleted directory +ff901b5 arch: add support for HW_CAP based neon runtime detection +360d627 (origin/wip-10104) pybind/test_rados: add test for wait_for_complete_and_cb() +19212cd rados.py: fix misnamed 'wait_*' routines, add true wait/wait-with-cb +a53dbab librados:: carry IoCtx ref from WatchInfo +a989fec osd: allow deletion of objects with watchers +1c6944f osd/ReplicatedPG: do watch effects only when change commits +1c5bba6 osd/ReplicatedPG: pass obc to OpContext ctor +6fa05db osdc/Objecter: queued_async() gets called inside watch_lock from caller +61fc317 librados: remove failed notify +0a61287 librados: s/handle/cookie/ in headers +f0614a1 ceph_test_rados_watch_notify: do not unwatch on invalid handle +27ceb16 ceph_test_rados_api_watch_notify: test ENOENT case +1a36eb3 PendingReleaseNotes: a few notes about watch/notify changes +a824be9 test_async_driver: fix warning +7f8ffae osdc/Objecter: set last_error before async error event delivery +26440fd osdc/Objecter: use RWLock for watch_lock +5c0a8c4 osdc/Objecter: make watch_check time reflect async delivery +955a2f0 osdc/Objecter: use recast LingerOp* as OTW cookie, too +14e933d librados: use (gid,cookie) to identify notify participants +5e99450 librados: include missed watchers in notify reply data +32043a3 encoding: multiset encode/decode +9d9e66e osd: rejigger watch connect/disconnect callers +8823369 osdc/Objecter: ignore pings from previous registrations +45aaa34 osdc/Objecter: only reconnect watches; skip ack unless needed +e8df077 osdc/Objecter: drop ACK callback for watch +e72035f librados: move watch/notify into the Objecter +cd6a4aa rados: break out notify replies by client +de9f18d osdc/Objecter: take Finisher ref from creator +8ec0af4 librados: use Objecter's linger_id as the cookie +34c9d72 osdc/Objecter: spit out linger register step +5f90c20 osdc/Objecter: expose LingerOp instead of linger_id +889cd87 messages/MWatchNotify: print more nicer +0377850 librados: watch_check() to check on status of watch +8c867b8 ceph_test_rados: use new watch/notify API +42e4baa librados: unwatch doesn't need the oid argument +85f336d rados: use new notify API +ea53983 librados: no need for '2' suffix in c++ +219f824 librados: mark old rollback call deprecated +d3ec70e librados: mark old watch calls deprecated +5e794c1 librados: mark old object listing api deprecated +1b6bcfe librados: mark old rollback method deprecated +6c83ec5 librados: mark deprecated watch/notify methods with deprecated attribute +b575194 scratchtoolpp: suppress deprecation warnings +cdc9f5f ceph_test_rados_api_watch_notify: test watch disconnect, reconnect +300131e osd: send watch DISCONNECT to client when a watch is removed +14cd719 ceph_test_rados_api_watch_notify: reorder tests +a4eeaf5 ceph_test_rados_api_watch_notify: drop 'Test' suffix +0601b5f ceph_test_rados_watch_notify: fix signed/unsigned warnings +2c6076b ceph_test_rados_api_watch_notify: verify notify after missed notify works +b4d769c osdc/Objecter: fix whitespace +485daab osdc/Objecter: factor out _send_op_account() +872012f osdc/Objecter: skip ping if PAUSERD +f68fcc0 osdc/Objecter: objecter_inject_no_watch_ping +b583152 osdc/Objecter: stop sending pings once we get an error +26e2fc7 osd/Watch: set timeout event for new watchers +83189b0 make ping verify we are connected +b76fc39 osdc/Objecter: only ping watches (not notifies) +1a82cc3 osd, librados: distinguish between old and new watchers +10ac629 librados: tell watcher if we cause a notify timeout +7f00b72 osd/Watch: inform watchers when they cause a notify timeout +e0e90f7 librados: EINVAL on bad args to watch2 +aa7ea5b librados: behave if errcb is NULL +7c8a1cd osd/Watch: drop redundant in_progress_watchers +66747c8 osd/Watch: fix comment typo +e8f36ef ceph_test_rados_api_watch_notify: verify we get the right # of notifies +29802bf ceph_test_rados_api_watch_notify: s/handle/cookie/ +89e033c clean up CEPH_WATCH_EVENT_* namespace, and make COMPLETE distinct +bdef13c osdc/Objecter: send regular PING ops +909bdbc osdc/Objecter: queue an error if reconnect fails +e424103 osdc/Objecter: separate WATCH from RECONNECT +5e113ce rados: improve watch command output +22572a3 librados: add infrastructure to deliver an error notification +c973c93 librados: define error callback +97661e1 librados: remove crufty declaration +d44bd2b osd/ReplicatedPG: handle PING and RECONNECT watch ops +2288f31 librados: define RECONNECT and PING watch ops +2e508d0 osdc/Objecter: fix assert_src_version +7372013 librados: use new watch op codes; simplify Objecter helpers +0d6aa20 librados: define CEPH_OSD_WATCH_OP_* +6af4e1f librados: unconditionally pass WATCH_NOTIFY to legacy callback +6183dcc osd: allow multiple watchers/notify replies per client +8b409d4 librados: include notifier's gid in notify +e1a3bc8 ceph_test_rados_api_watch_notify: test notify2 api +7589bfc librados: update notify2 API to accept reply payloads +81cdff2 osd: implement notify ack payloads +7e0c4efc librados: define updated watch/notify interface +12940c9 librados: drop useless ver arg to _notify_ack +22c1d9b (origin/wip-rados-include) librados: Fix rados include problem reported by "sponce" +7b621f4 rgw: run radosgw as apache with systemd +3f2f42d doc/release-notes: v0.89 +237b29c Changed os-recommendation table sorting to remove implied bias. +a6102f0 documentation: add centos 7 to ceph-deploy installation +7631b10 os: add filestore_fadvise to control whether use posix_fadvise. +1fba28f WBThrottle: Call posix_fadvise to free page cache if nocache set in clear(). +e42df6a (origin/wip-mon-mdsdne) MDSMonitor.cc: fix assertion caused by MDSMap::STATE_DNE state +d3ee89a (origin/wip-10229) osdc/Filer: use finisher to execute C_Probe and C_PurgeRange +43d5c7c crush: fix crush_calc_straw() scalers when there are duplicate weights +85498bc crush: fix distortion of straw scalers by 0-weight items +6edaf4e (origin/wip-10231-gperftools-location) heap_profiler: support new gperftools header locations +d5e2c2c (origin/wip-unsigned) mon: fix signed/unsigned comparison warning +7c12036 crush/builder: break out new version 1 of crush_calc_straw +f35a3d8 crush: pass crush_map * to various builder methods +9565621 crush: default to straw_calc_version 1 +50e2cee crush: add straw_calc_version tunable +c133a83 crush/CrushWrapper: dump chooseleaf_vary_r with other tunables +3877f00 crush/CrushTester: add new --show-mappings option +294b06c crushtool/CrushTester: output utilization even with 1 batch +3506293 crush: recalculate straw scalers during a reweight +7a99b48 osdmaptool: --test-map-pgs-dump +68fdc0f (tag: v0.89) 0.89 +d98cec7 (origin/wip-cephtool-exec) qa: fix teardown in cephtool's test_mon_mds +8cd1fdd (origin/wip-10080) SimpleMessenger: allow RESETSESSION whenever we forget an endpoint +8e5dbe7 common/perf_counters: Remove the duplicated code. +963b764 test/perf_counters: Replace perfcounters_dump to perf dump. +eafb224 test/perf_counters: Add test case for cmd 'perf reset' +5f8186b common/perf_counters: Add 'perf reset all|perfcountername' for 'ceph --admin-daemon' +5d3bff0 doc: rm Fedora minor versions in os recommendations +0d4dd10 (origin/wip-snapmapper) os/ObjectStore: drop tolerate_collection_add_enoent +bc5a22b osd: require SNAPMAPPER feature from peers +b743a95 packaging: package ceph-disk(8) +2497f16 doc: rm old releases in os recommendations page +0bb2e1e doc: clarify "B" flag in os recommendations page +3047c9e (origin/wip-cephtool) qa: cephtool/test.sh use regular strings to list tests +e3e5741 tests: vstart_wrapper.sh must call vstart.sh with a list of daemons +946bebd crush: add dprintk's for crush_calc_straw +4e955f4 (origin/wip-10211-erasure-code-buffer-alignement) erasure-code: enforce chunk size alignment +73ad2d6 common: allow size alignment that is not a power of two +9ade88e common: add bufferlist::rebuild_aligned_size_and_memory +56dae09 doc: Reformatting on rbd replay doc. +b8f6b5f doc: Added rbd-replay-many and restructured index. +54d5ed3 doc: Fixed index syntax. +3012c4a doc: add CentOS 7 to recommended OSes +6862891 doc: Adds man page for ceph disk in TOC. +491da51 (origin/wip-9997-1) client: invalidate kernel dentries one by one +2fa4884 (origin/wip-flush-journal-fix) mds: fix race of trimming log segments +70e1a5d (origin/wip-doc-rbd-replay) doc: Document RBD Replay +131f092 mds: don't blindly create empty object when dirfrag is missing +9b9e3ed mds: allow choosing action for wirte error +dafef3c mds: add asok command to force MDS readonly +6b59ead client: handle MDS 'force readonly' message +f716903 mds: notify clients when MDS goes to readonly +e0637b4 mds: add helper to force MDS readonly +5db3bbf mds: disallow reconnectiong to readonly MDS +44d9abb mds: disable misc internal activitiles when MDS is readonly +cfef515 mds: disallow slave requests when MDS is readonly +4aed047 mds: keep locks in sync state when MDS is readonly +2d4a746 mds: don't trim log when MDS is readonly +4f6474f mds: disallow write operations when MDS is readonly +01df222 (origin/wip-10209) osd: tolerate sessionless con in fast dispatch path +0f1c9fd msg: do not const methods that return a mutable pointer +0d6c803 (origin/wip-kill-category) osd/osd_types: drop category from object_info_t +5ecdce3 osdc/Objecter: drop category from copy-get +d229548 osd/ReplicatedPG: drop cateogry support from CREATE +4e1f4cf rados: drop optional 'create [category]' arg +3008ca4 rados: change 'df' output now that categories are gone +39c46a2 PendingReleaseNotes: not about dropping category +ee4f6d7 osd/osd_types: drop useless conditionals on object_info_t decode +ee3b5b2 osd/osd_types: remove cat_sum from object_stat_collection_t +c94c33b mon/PGMonitor: do not report per-category stats +387d055 osd: stop doing per-category accounting +bebcd14 librados: drop create category args +5020bbe librados: add new get_pool_stats() variant; deprecate others +080fae6 librados: mark category args and ops as unused +dff5b73 AsyncMessenger: Make WorkerPool use CephContext's singleton +7fed5de CephContext: Add AssociatedSingletonObject to allow CephContext's singleton +0659381 documentation: replace deps.{deb,rpm}.txt with scripts +e0190bd KnieticStore: add necessary header file +49bedd4 ObjectStoreBenchmark: Used to perf ObjectStore::Transaction +929fcd6 better systemd support +3376fee Cleanup noop in message +5b5493d (origin/wip-9881) mds: implement "flush journal" asok +efeaaaa mds: in segment expiry, use end instead of start +2ec6773 mds: fix MDLog I/O callback without finisher +dba078a Cycles: A precious performance profile tool using rdstc +62a8f2d added consts, cleanup Signed-off-by: Michal Jarzabek +1a8aea7 AsyncMessenger: Fix thread destroy when no active Messenger +faa4cbb doc: minor fix in ceph-authtool man page +0fe5bc6 osd: log message content cosmetics +8658911 common: admin sock output XML elements whitespace +b9d7f79 Add "make check" dep python-virtualenv in deps.rpm.txt +f714697 AsyncConnection: Skip delete_file_event if sd < 0 +02c602f AsyncConnection: Avoid deadlock for AsyncConnection::lock +5e478a5 Event: Fix Coverity error +30194e8 AsyncConnection: Introduce "signal" event +ea3d4d7 AsyncConnection: Ensure "mark_down" complete when returned +bdedad2 AsyncMessenger: Async event threads shared by all AsyncMessenger +c10d639 Add isa-erasure yasm dep for deps.rpm.txt +6a98dac rpm: unconditionally package rbd-replay-prep(8) +dbb5a48 (origin/wip-librados-symbols) librados: Only public API symbols from the shared library +03a61d2 Minor typos and trailing spaces +782a74c KineticStore: Fix compile error and add _test_init +21798f9 doc: fix some typos in ObjectStore.h +016080d doc: Adds the updated man page for ceph-disk utility. +8a48847 doc: Updates the man page for ceph-disk utility with some changes. +3b00c6f safe_io: do not set ending \0 in safe_read_file() +e6410eb added some consts Signed-off-by: Michal Jarzabek +17b5fc9 (origin/wip-10135) mon: OSDMonitor: allow adding tiers to FS pools +9a118d5 doc: Adds man page for ceph-disk utility. +242dd1c doc: Removes ceph-deploy usage instances from ceph-disk man page. +cb820f8 erasure-code: test NEON arch selection logic +a788829 erasure-code: include new headers in distribution +59f78b0 erasure-code: always compile SSE and NEON tests +990c6d5 erasure-code: build and use a NEON jerasure variant +8351fd6 erasure-code: gf-complete use neon enabled branch +987d54b aarch64: add support for HW_CAP based neon runtime detection +cec00c9 autotools: ARM/AArch64 NEON detection similar to x86 +ba520bf erasure-code: conditionally build jerasure sse3/sse4 plugins +0b985d2 (origin/wip-10185-neon) arch: fix neon feature detection +24eb564 Remove pidfile and asok after stopping ceph +7dcc850 doc: Updates man page for ceph-disk utility. +e983230 remove unneeded include file +a1ba385 doc: rgw document s3 bucket location features +0c33930 (origin/wip-10151) mon: fix MDS health status from peons +a450cab doc: Adds man page for ceph-disk utility. +4b35ae0 rgw: check for timestamp for s3 keystone auth +61cae54 (origin/wip-10173-autogen) autogen.sh: git submodule sync +00da974 test: extend quota test case +5515cc4 client: fix problem with move files between quota tree +b2c15d6 mds: Fix a problem with rstat refresh. +12f1f21 (origin/wip-mailmap) mailmap: Update Warren Usui's attribution to Red Hat +43c75ee mailmap: Update Tyler Brekke's attribution to Red Hat +9df4624 mailmap: Update Tamil Muthamizhan's attribution to Red Hat +fb74152 mailmap: Update Sandon Van Ness' attribution to Red Hat +c5d5e06 mailmap: Update Samuel Just's attribution to Red Hat +a6a2a05 mailmap: Update Patrick McGarry's attribution to Red Hat +4d2f63e mailmap: Update Noah Watkins' attribution to Red Hat +4ee3a87 mailmap: Update Neil Levine's attribution to Red Hat +12e511b mailmap: Update Mark Nelson's attribution to Red Hat +bdf534a mailmap: Update Ken Dreyer's attribution to Red Hat +df19410 mailmap: Update Josh Durgin's attribution to Red Hat +d9ee8d6 mailmap: Update John Wilkins' attribution to Red Hat +c84aa39 mailmap: Update Joao Luis' attribution to Red Hat +806a478 mailmap: Update Ilya Dryomov's attribution to Red Hat +eaa9889 mailmap: Update Dan Mick's attribution +330b09d mailmap: Update Alfredo Deza's attribution to Red Hat +1853af3 mailmap: Update Greg Farnum's attribution to Red Hat +9d5e4ed check endpoints is not empty before use it. +5541348 client: support listxattr for quota attributes +5470914 lockdep: do not use $CEPH_LOCKDEP for g_lockdep +9ba17a3 rgw-admin: create subuser if needed when creating user +25fe088 GenericObjectMap: Fix typo +e424d07 client: Fix problem in get_quota_root with update parent and ancestor +6c7bb8c blkdev: using strncpy instead of strcpy. +1fe8b84 PGLog: include rollback_info_trimmed_to in (read|write)_log +627f138 (origin/wip-sepia-update) Updated sepia hardware list. +7a868fd ReplicatedPG: remove unused parameter in function write_update_size_and_usage +0d89db5 (origin/wip-9557) mds: store backtrace for straydir +a79ba32 mds: verify backtrace when fetching dirfrag +5177759 KeyValueStore: Fix parse_header_key +9d84d2e (origin/wip-10018-primary-erasure-code-hinfo) osd: deep scrub must not abort if hinfo is missing +92662a9 mailmap: Loic Dachary name normalization +77c1a35 rgw: support swift storage policy api +f692bfe PG: always clear_primary_state on new interval, but only clear pg temp if not primary +a4b42d6 doc: erasure-code developer documentation typo +2601a25 StoreTest: Add scrub situation to tests +b4fa384 KeyValueStore: Add KEY_ENDING sign to the end of key +b2e8254 StoreTest: Clean up warning +dcecfb8 MemStore: Return -ENODATA when collection_getattr hit nonexist attr +7a9b755 KeyValueStore: Fix collection_getattrs problem when zero-length attr +877237f KeyValueStore: Return -ENODATA if collection_getattr is nonexist +00b275b StoreTest: Add collection_getattr(s) tests +ffb6f78 KeyValueStore: Remove assert for collection_getattr method +f3dab44 (origin/wip-10077) ceph_objectstore_tool: Add feature called set-allow-sharded-objects +b3021b0 ceph_objectstore_tool: Add utility routine get_osdmap() +86baf2d ceph_objectstore_tool: Clear ...INCOMPAT_SHARDS from feature if exporting replicated pg +d3d5852 FileJournal: add journal_discard to control ssd whether support discard +9f9eb67 FileJournal: Add ssd discard for journal which using ssd disk as journal. +10f6ef1 (origin/wip-10114-fix-warning) erasure-code isa-l: remove duplicated lines (fix warning) +c912116 (origin/wip-9665-ceph-disk-partprobe) autotools: add --enable-docker +26bf8d1 ceph-disk: test prepare / activate on a device +ecccb39 tests: helper to run unit / function tests in docker +23aaf6c ceph-disk: implement init=none for block devices +fed3b06 ceph-disk: run partprobe after zap +23e71b1 ceph-disk: use update_partition in prepare_dev and main_prepare +922a15e ceph-disk: encapsulate partprobe / partx calls +0e6db90 doc: update debian compilation dependencies +8613984 (origin/sponce-master) Fixed locking issue in the trun method of libradosstriper leading to potential race conditions - Fixes: #10129 +9e53c35 (origin/wip-10128) tests: ceph_objectstore_tool.py test all variants of export/import +8c87f32 ceph_objectstore_tool: Make --file option consistent by treating "-" as stdout/stdin +0d5262a ceph_objectstore_tool: When exporting to stdout, don't cout messages +0d350b6 (origin/wip-10123) librbd: protect list_children from invalid child pool IoCtxs +de547c9 Fix bug #10096 (ceph-disk umount race condition) +06fc39c (origin/wip-9321) mon: PaxosService: can be readable even if proposing +d8a7db8 (origin/wip-9913) mon: Monitor: use session's entity name for audit log +125b58d mon: Monitor: forward session entity name to leader +ca8e1ef mon: Monitor: stash auth entity name in session +8773474 messages: MForward: stash auth entity name +948f207 mailmap: fix Rongze's affiliation +fe6679d Fix libstriprados::stat, use strtoll insdead of strtol +11aa383 doc: fix typos in diagram for incomplete write +2379c57 doc: fix incorrect equalities +625dd40 doc: fix typo (superfluous "no") +cbecab4 (origin/wip-10063-objectstore-tool-erasure-code) tests: ceph_objectstore_tool.py fix list-attr for erasure code +40717aa tests: ceph_objectstore_tool.py check for malformed JSON for erasure code objs +eaf1d1e tests: ceph_objectstore_tool.py fix off by 1 ATTR_OBJS handling +dcf09ae common: do not omit shard when ghobject NO_GEN is set +6d04b3c tests: run ceph_objectstore_tool.py from make check +4c94f17 tests: ceph_objectstore_tool.py skip if /dev/tty fails +fc435ff tests: ceph_objectstore_tool.py encapsulate init-ceph stop +0f3d7b1 tests: ceph_objectstore_tool.py main returns +e8f34bd tests: ceph_objectstore_tool.py replace stop.sh with init-ceph +e303d1a tests: ceph_objectstore_tool.py use a dedicated directory +235257c tests: ceph_objectstore_tool.py run faster by default +f04d4e7 tests: ceph_objectstore_tool.py run mon and osd on specific port +783378c tests: ceph_objectstore_tool.py can use a WARN cluster +74506d2 tests: ceph_objectstore_tool.py use env python +d1c4e5b vstart: use hostname -s instead of fqdn +cf2104d common: do not unlock rwlock on destruction +06a245a (origin/wip-execstack) Add annotation to all assembly files to turn off stack-execute bit +e25724b (origin/wip-warn-max-pg) mon: tighten pg vs osd warning bounds to 3x above/below 100 (target) +7f3dcdb mon/PGMonitor: add max pgs per osd warning +b70be56 mon/PGMonitor: make min pg warning based on pg *instances* +5eb662c mon/PGMonitor: fix summation when we adjust up/acting +d671e1c mon/PGMap: allow stat_pg_{add,sub} that only touches stats +cf24117 osd/osd_types: include up and acting count in pool_sum_t +c87bde6 PG: always clear_primary_state when leaving Primary +b10bd19 (origin/wip-dumper-coverity) tools: Close the fd before returning in Dumper +50f9edb (origin/wip-da-SCA-20141111) FileJournal.cc: fix _open() to return negative value in error case +0c8955b mailmap: Loic Dachary name normalization +b6d6180 test_async_driver: fix warning +175d6e0 doc: Removed separate build file for rpm. +a5a0d5c doc: Adds build-doc guidelines for Fedora and CentOS/RHEL. +4cdc9c7 doc: update release descriptions on packages page +3b28fd0 tests: fix cast compilation warning +088230e Improve readability of the exception +3c4b782 rgw: add location when data in another region. +35ae591 doc: update the OpenStack glance configuration +83e8b07 (origin/wip-librbd-symbols) librbd: Only public API symbols from the shared library +8dde6a6 (origin/wip-10052) ceph_test_rados_api_tier: fix cleanup of whiteouts +34e4d24 osd/ReplicatedPG: allow whiteout deletion with IGNORE_CACHE flag +a04bb13 Mailmap: add Rongze organization +ef2565e vstart.sh: complain less about fullish mon disks +cba4ed4 librados: Fix operator= null ptr references +156d17c os/FileJournal.cc: fix potential use after close cases +9314fe2 c_read_operations.cc: prevent potential null pointer deref +10fc8a2 tools/psim.cc: catch ceph::buffer::end_of_buffer exception +5f6b091 librados-config.cc: catch ceph::FailedAssertion exception +6fd2123 ceph_authtool.cc: catch ceph::FailedAssertion exception +fa98605 ceph_authtool.cc: catch ceph::buffer::end_of_buffer exception +3674c8c MDSMonitor.cc: remove cmd_getval for poolid +ed0d3ed st_rados_list_objects.cc: free resources in error case +4814cf7 net_handler.cc: close another socket leak +72c0156 net_handler.cc: close socket leak +0e03551 ceph_erasure_code_benchmark.cc: don't check unsigned for < 0 +13504a3 ceph_erasure_code_non_regression.cc: prefer ++op for non-primitive iterators +c73c47e ceph_erasure_code_benchmark.cc: prefer ++operator for non-primitive iterators +3b31e74 crush/CrushWrapper.cc: prefer ++operator for non-primitive iterators +35ab4d7 rgw/rgw_gc.cc: silence cppcheck +699fc05 (origin/wip-10057) msg/simple: ms_die_on_skipped_message +20f99ca mds: don't overwrite reply's snapbl +6f8b96a (origin/wip-10095) crush/CrushWrapper: fix detach_bucket +a46fb02 Makefile: include 'ceph' in base target +585b906 msg/Makefile: add new header to tarball +2fe5c4c (origin/wip-9921) msg/Pipe: inject delay in stop_and_wait +2d69805 SimpleMessenger: Pipe: do not block on takeover while holding global lock +6e5bae4 mailmap: Dan Mick name normalization +5fdec03 mailmap: Xan Peng affiliation +e8a60ce mailmap: BJ Lougee affiliation +e8daba6 mailmap: Derrick Schneider affiliation +e386588 mailmap: Federico Gimenez name normalization +1cd7422 mon: ceph-monstore-tool must close() +d6be062 tests: fix compilation warning +0ee6437 doc: remove superfluous white spaces (for testing) +ee45f48 doc: Fix 2 syntax errors. +571c857 AsyncMessenger: Fix select driver for add_event +17ce4ec AsyncMessenger: Add tests for async drivers +ebc8875 AsyncMessenger: Support select for other OS such as Windows +59d8c94 qa/workunits/fs/misc/quota.sh: simple quota test +86f87bb fix +78d1e6c (origin/wip-9439) osd: Check filter ops for pgls and pgnls +9e05ba0 (origin/wip-9835) osd/OSD: use OSDMap helper to determine if we are correct op target +89c0263 osd/OSDMap: add osd_is_valid_op_target() +079a8d7 Add myself to +5ce0919 ceph_objectstore_tool: Fixes to make import work again +a69b845 vstart.sh: warn less +6c80525 qa: handle CEPH_CLI_TEST_DUP_COMMAND on ceph osd create +3776f07 common/Formatter: fix JSON dump of floating point values +1b6cf7c mon/PGMap: fix {recovery,degraded,unfound}_ratio units, type +e27b0d9 mon: fix formatted 'pg stat' +0cff914 doc: correct grammar in RGW SSL cert installation +731ea68 doc: correct spelling of "fqdn" +40994c9 doc: enable RBD cache and socket on OpenStack deployments +e94d3c1 qa: allow small allocation diffs for exported rbds +09eefac Fix Yuan's mailmap +05a1c3f doc/release-notes: v0.88 +90c5869 (origin/wip-7467) rgw: support multiple host names +1342548 (origin/wip-crush-tree) crush: fix tree bucket functions +e444b22 crush/builder: replace printf with an empty dprintk macro +109bcd4 (origin/wip-da-revert-10b68b) Revert "osd: detect (some) misordered ondisk tmaps" +4be687b (tag: v0.88) 0.88 +d12fa35 AsyncMessenger: Fix large bufferlist send segment fault +d145cca AsyncMessenger: Try send in queue bufferlist +123d364 AsyncMessenger: Normalise log informations +fc4e4f2 AsyncMessenger: Release connection if stopped +4d4b7d0 doc/rados/configuration fix 'ods mkfs options' default +41b5dd2 (origin/wip-da-SCA-20141028) AuthSessionHandler.h: init protocol in constructor +dbfb63e src/librbd/librbd.cc: fix potential null pointer deref +4fc9428 osd/ReplicatedPG.cc: remove redundant check +a4cecda test/librados/c_read_operations.cc: fix invalid checks +97ed2ae rgw_rados.cc: remove dead code +e590d42 rados_sync.cc: fix xattr_diff() for the only_in_b checks +04517f0 bench_log.cc: catch ceph::FailedAssertion exception +60e7da9 osd/PGLog.cc: prefer empty() over size() for emptiness check +fea7097 (origin/wip-rbd-python-tests) librbd: Python unit tests now use unique pools and images +c11cf2a bufferlist: Don't call rebuild(), c_strt() call it if bufferlist not contiguous. +cd784ea (origin/wip-9854) osdc: Constrain max number of in-flight read requests +12913c0 AsyncMessenger: Eating up pipe buffer for waking up +2704914 (origin/wip-10045) common/Readahead: use correct lock when waiting on the pending ops +42b0a35 (origin/wip-scrub-coverity) mds: remove dead code from inode_t::compare() +f78cfa7 mds: CInode: catch exception by reference, not value +dafd335 osd/OSDMap: verify CRC on decode +33490b7 mon/OSDMonitor: populate Incremental::full_crc +3dcf5b9 osd/OSDMap: encode crc +93ec350 buffer: add iterator::get_bl() +3978c1d mon/OSDMonitor: handle MMonGetOSDMap +6f3d5cd add MMonGetOSDMap message +7009440 prevent random people from encoding the OSDMap +c0836ca osd: use encoded osdmap bl instead of reencoding +110c093 osd: warn if reencoding and OSDMap with fewer features than the mon +2f92d8d mon: use pre-encoded OSDMap for build_latest_full() MOSDMap message +50df613 reserve a few feature bits +c914df2 qa/workunits/cephtool/test.sh: ceph, not ./ceph +66b920a qa/workunits/fs/misc: combine sudo and echo effectively +197a2ab OSD: batch trim for pg_log +9850227 crush: fix incorrect use of adjust_item_weight method +2d7adb2 erasure-code: erasure_code_benchmark exhaustive erasure exploration +3ff2816 erasure-code: add erasure_code_benchmark --verbose +efe121d erasure_code: implement ceph_erasure_code to assert the existence of a plugin +49613cb erasure-code: ceph_erasure_code does not need to avoid dlclose +6fdbdff erasure-code: add corpus verification to make check +10c88c8 erasure-code: Makefile.am cosmetics +2c84d0b erasure-code: s/alignement/alignment/ typos in jerasure +7638b15 erasure-code: workunit to check for encoding regression +f590130 erasure-code: store and compare encoded contents +c44bdb1 erasure-code: document pool operations +54ee8ee KeyValueStore: move buffers from strip_header to BufferTransaction +a0c1f22 tests: use kill -0 to check process existence +17f5c36 tests: looping to wait for an osd to be up is expected +79f8b81 tests: increase timeout to accommodate slow machines +0b4ccbd tests: kill_daemon use $name.pid instead of pidfile +6741b71 tests: group workunits/cephtool/test.sh tests per daemon +0cb12c7 tests: run workunits/cephtool/test.sh +c3b51ef tests: remove vstart_wrapped_tests.sh +7a6ca17 tests: use different ports for each mon +bdca0ac tests: tolerate a disk 99% full +f80499e (origin/wip-flush-snaps) osd/ReplicatedPG: flush snaps immediately +560e22e (origin/wip-gtest-warnings) test: use unsigned ints to compare against size() +a21bca1 mailmap: Loic Dachary affiliation +740a1bd (origin/wip-10025) tools: error handling on journal import/export +3e0295f (origin/wip-doc-dumpling-to-firefly) doc: Added Dumpling to Firefly upgrade section. +15d487f MDS: clean up internal MDRequests the standard way +07e0831 MDS: CInode: break out of validation early on symlinks +f1677e7 common/ceph_strings: add some MDS internal op names to ceph_mds_op_name() +26736b2 MDS: add a flush_dentry() function, and wire it up to the admin socket +86384fe MDS: CInode: create a flush() function +063cd2f MDCache: handle internal ops in respond_to_request() +f82f6ef MDCache: make scrub_dentry schedulable and reentrant +3917402 MDCache: "handle" request_forward on internal ops +a4da522 Server: rename reply_request() -> respond_to_request() +cfac5c3 Server: rename reply_request -> reply_client_request; make it private +e980d1b Server: add snapbl to MDRequest and eliminate last explicit MClientReply +592be4d Server: use mdr->reply_extra_bl instead of explicit MClientReply +c9f8d11 Server: do not use explicit MClientReply if we don't need to +a65d986 Server: remove tracei and tracedn parameters from reply_request +515ab2d MDCache: add a scrub_dentry() function, and wire it up to the admin socket +fa75434 MDS: CInode: implement validated_data::dump() +0d6f8b6 MDS: CInode::validate_disk_state() +153aa20 Rebase: MDS: Add an MDSContinuation for ease of use +a7020dd Continuation: Add a new Continuation class. +c575d16 MDCache: create_unlinked_system_inode() as the guts of create_system_inode() +9441283 MDS: MDRequestImpl: provide filepath/filepath2 substitute for MClientRequest +adee21b MDRequest: dump internal op names as well as IDs +05d2444 MDCache: remove #if 0'd code +f8db040 mdstypes: add a same_sums() function to nest_info_t +af4bddd test/mds: unit tests for the inode_backtrace_t and inode_t compare() functions +4743f28 mdstypes: write inode_t::compare() function +7795a4e MDS: add operator==() and compare() for inode_backtrace_t +aed1498 MDS: CInode: add a fetch_backtrace() utility function +80fac9e mds: add an MDSInternalContextWrapper and MDSIOContextWrapper +dc307ac tools: persist trimmed_pos in journal dump +fb29e71 tools: fix MDS journal import +abc995b qa/workunits/fs/misc: combine sudo and echo effectively +3aa7797 qa: use sudo even more when rsyncing /usr +2a61735 Fedora 19 uses systemd but there is no systemd-run available in the release (rhbz#1157938), this patch makes sure that the init scripts check for availability of systemd-run before they use it (otherwise, they fall back to the default method) +5ac05d4 Fix tests on btrfs: leftover subvolumes removed +762eda8 (origin/wip-blacklist-respawn) osdc: fix Journaler write error handling +61ebfeb (origin/wip-10030) librbd: don't close an already closed parent image upon failure +d13b478 EC: Allow bench.sh to test ISA backend also +52cb44c (origin/wip-9887) osd, mon: Send initial pg create time from mon to osd +2e63944 (origin/wip-rbd-test-fixtures) librbd: Refactor librbd unit tests to use test fixtures +5d9f36f (origin/wip-9918) rgw: update swift subuser perm masks when authenticating +ef6d3ad (origin/wip-9973) rgw: remove swift user manifest (DLO) hash calculation +b1bfc3a (origin/wip-9479) rgw: send back ETag on S3 object copy +3196345 (origin/wip-9478) rgw: S3 object copy content type fix +3103c8a ObjectStore: Fix a error comment. +a1aa70f ObjectStore: Don't use largest_data_off to calc data_align. +8ba504d buffer: Add _memcopy_count to track total count of memcopy by rebuild/rebuild_page_aligned/c_str. +3d45a68 (origin/wip-log-client) mds: fix log_client config +7dc2ca8 osd: configure log_client properly +da6a8a3 mon: move log config parsing into LogClient.h helper +0fd54a7 move Monitor::update_log_client to LogChannel::update_config +4561aff move get_conf_str_map_helper to str_map.h (from Monitor.h) +84fec86 osd: add 'cluster_log [type] [message ...]' tell command +4f40975 commong/LogEntry: string_to_clog_type +705a1e3 osd: cache pool: delete dead code in ReplicatedPG::agent_choose_mode +fe7bf06 (origin/wip-9877) rgw: RGWRados::get_obj() returns wrong len if len == 0 +f4ee949 osd: cache pool: flush object ignoring cache min flush age when cache pool is full Signed-off-by: Xinze Chi +6da9405 doc: Edited Key/Value store config reference. +03be944 doc: Added Key/Value store config reference to index. +72fc262 (origin/wip-doc-openstack-juno) doc: Update for OpenStack Juno. +65c3350 (origin/wip-9977) tools: skip up to expire_pos in journal-tool +e0166a2 (origin/wip-9986) osdc/Objecter: Fix a bug of dead looping in Objecter::handle_osd_map +31c584c osdc/Objecter: e shouldn't be zero in Objecter::handle_osd_map +093c5f0 (origin/wip-9987) mon/PGMap and PGMonitor: update last_epoch_clean cache from new osd keys +3fb731b mon/PGMap: invalidate cached min_last_epoch_clean from new-style pg keys +8924158 (origin/wip-6756) JounralingObjectStore: journal->committed_thru after replay +122c503 client: Inform mds file size when approaching quota limit +a50b8eb client: Enforce quota check when changing file size +bbfeaae client: Forbid moving files across quota trees +ce77ce5 client: Enforce quota check when creating new file +5a1e334 client: Add helper for quota check +65ddf0c client: Handle MClientQuota to update quota information +2ea274b client: Update qtree when fs tree changed +fcf51b6 client: Handle getxattr to show quota information +11979bd client: Add QuotaTree functions +1cb86c6 client: Add quota config to config_opts.h +a07c88f client: Get root's parents inode when mount -r used +0e4c9c9 client: Add quota field to Inode +f435aaf client: Add class QuotaTree type +4dca37d mds: Push new rstat and quota info to client +cb8f25a mds: Add broadcast_quota_to_client routine +43938c9 mds: Export cap to auth mds when mds handle MGatherCaps +d7dfc79 mds: Push quota info to client by MClientReply +ea2ef4c ceph: Add MGatherCaps message type +fb57e84 ceph: Add MClientQuota message type +1d1a340 mds: Handle quota update +1914031 mds: Add quota field to inode_t +da488ce test: add test case for quota_info_t +a071201 ceph: Add quota_info_t to store quota info +3619ea8 ceph: Add quota feature flags +a554766 (origin/wip-buffer) buffer: implement list::get_contiguous +4a9ad7d osd/ReplicatedPG: fix compile error +29d7786 ceph.in: remove '--' from injectargs, if there, as well +7533245 Fix rados_shutdown hang forever when using radosstriper +c5f8d6e (origin/wip-9752-past-intervals) osd: past_interval display bug on acting +50c2c75 (origin/wip-9944) osdc/Objecter: fix null dref when pool dne +1eb9bcb (origin/wip-9945) messages: fix COMPAT_VERSION on MClientSession +c96fe59 doc: update RBD for Juno +56ee3b4 doc/release-notes: it's 8MB, not 32MB +f7431cc msg/Pipe: discard delay queue before incoming queue +c51c8f9 (tag: v0.87) 0.87 +ce6f22d AsyncMessenger: Add kqueue support +5a4c3aa (origin/wip-9800-giant) client: allow xattr caps in inject_release_failure +214ac9f (origin/wip-doc-fs-quickstart) doc: include 'fs new' stuff in cephfs quickstart +1fef4c3 Get the currently atime of the object in cache pool for eviction +66b4cd9 tests: fix signed/unsigned warning +4b87a81 rbd: Fix the rbd export when image size more than 2G +ef1980f osd: tiering: calculate object age during eviction when there is no hit set +6fca23f (origin/wip-9919-injectargs-side-effects) qa: avoid qa/workunits/cephtool/test.sh unstability +5691c68 client: allow xattr caps in inject_release_failure +5950710 Fix the match error when starting OSD daemons. If we have osd.7 and osd.77 on the same host, osd.7 will not be mounted if osd.77 is mounted. Signed-off-by: huangjun +abd3fd3 fix can not disable max_size quota +622c5ac osd: cache tiering: fix the atime logic of the eviction +b90b483 (origin/wip-objectstore) remove collection_rename +a80f2f6 ceph_filestore_dump: use "remove" marker instead of collection rename +5dc990c osd: remove pgs with "remove" flag on startup +856504c ceph_test_filestore_idempotent_sequence: drop collection_rename +6f2b274 os/FileStore: assume COLL_ADD is always followed by COLL_REMOVE +cfa2290 os/ObjectStore: remove collection_{add,remove} +eb1c330 ceph_test_objectstore: s/collection_remove/remove/ +11e98fd ceph_test_filestore_idempotent_sequence: use collection_move +ffda7c4 osd: s/collection_remove/remove/ +7093ce6 os/FileStore: remove old collection conversion code +11fcad5 os/ObjectStore: remove version calls from interface +de52873 osd, filestore: move automatic upgrade into mount() +86919f5 osd, filestore: mount in upgrade() caller +5f8a1df osd, filestore: move convertfs into FileStore +b889b6b remove ceph_dupstore +a5184cf (origin/wip-9869) client: cast m->get_client_tid() to compare to 16-bit Inode::flushing_cap_tid +a4caed8 (origin/wip-9894) client: fix I_COMPLETE_ORDERED checking +387d5d8 (origin/wip-vstart) init-ceph: make ./init-ceph behave from src dir on systemd +a6357f2 unittest_shared_cache: fix build line +1abb620 doc/release-notes: giant notes +6a43809 rgw_rest_client.cc: remove self assignment of new_info.effective_uri +09edada test/librbd/fsx.c: fix indentation (NESTING_INDENT_MISMATCH) +c92d47e libradosstriper/striping.cc: fix strdup memory leaks +be674c5 test/libradosstriper/striping.cc: fix wrong indentation +4f5d1f4 msg/async/Event.cc: use static_cast instead of c-style cast +c952cb9 rgw/rgw_formats.cc: fix realloc memory leak +1cef833 arch/neon.c: check result of fread() +1bd2abe cls_rgw_client.cc: fix potential null pointer deref +56de4ca SyntheticClient.cc: check return value of getdir() +6c4a08c SyntheticClient.cc: remove empty lines in if/else blocks +6f614fc test_rbd_replay.cc: fix va_list parameter handling +4522a68 AsyncConnection.cc: prefer ++operator for non-primitive iterators +0214653 mon_store_converter.cc: move convert() call out of assert() +2ecd43b test_str_map.cc: remove unused variable +7f446ea rgw/rgw_rest_user.cc: reduce scope of key_type +5c7b8c6 rgw/rgw_rest_swift.cc: use empty() instead of size() +17c327f rgw/rgw_rest_s3.cc: use !empty() instead of size() > 0 +84a5c84 vstart.sh: Fix usage +a9a2185 (origin/wip-crush-link-id) mon: fix `osd crush link` id resolution +1877670 Remove dead code in EC LRC plugin +a05dedc check to_remove before setting transaction +f99c5f9 rgw/rgw_rados.cc: remove unused variable 'objs' +7954562 osd/ReplicatedPG.cc: use !empty() instead of size() > 0 +912743c PGLog.cc: reduce scope of variable +ddfdcc3 common/escape.c: add cppcheck-suppress +52ca2b1 fuse_ll.cc: use reinterpret_cast instead of c-style cast +61872e4 JournalScanner.cc: reduce scope of local variable +94a0ec1 test_disk_bw.cc: reduce scope of variable +abb2b80 objectstore/store_test.cc: reduce scope of variable +5e9492c TestErasureCodeIsa.cc: reduce scope of 'err' variable +170db69 TestCrushWrapper.cc: reduce scope of variabele +8ebe9e9 test_sharedptr_registry.cc: reduce scope of local variable +f2340aa test_shared_cache.cc: reduce scope of local variable +c01e7d2 TestSignalHandlers.cc: add cppcheck-suppress nullPointer +10ddfbf rgw_rest_user.cc: reduce scope of key_type in several places +53f2dad rbd-replay-prep.cc: reduce scope of variable +be66b82 osd/ReplicatedPG.cc: reduce scope of variable +f4de437 osd/PGLog.cc: reduce scope of variable, remove not needed code +3d61d8a osd/PG.h: add cppcheck-suppress +f4f652d os/chain_xattr.cc: reduce scope of some variables +ca347b0 os/KeyValueStore.cc: reduce scope of variables +9d87448 os/HashIndex.cc: reduce scope of variable +935edd7 mon/OSDMonitor.cc: reduce scope of variable +48a1dc3 mds/Server.cc: reduce scope of variable +d62b96f mds/MDS.cc: remove unused local variable +2f9bf47 ErasureCodeLrc.cc: reduce scope of variable +d9abd53 ErasureCodeIsa.cc: reduce scope of variable +e145bff ErasureCodePlugin.cc: reduce scope of variable +c3ee13a cls_rbd_client.cc: reduce scope of variable +53e2ba0 mailmap: Federico Gimenez affiliation +eea9803 (origin/wip-enoent-race) os/LevelDBStore, RocksDBStore: fix race handling for get store size +06a73c3 doc/release-notes: v0.87 giant (draft) +ecbbf87 (origin/wip-da-SCA-20141010) Paxos.cc: use reinterpret_cast instead of c-style cast +784f6d5 fuse_ll.cc: use reinterpret_cast instead of c-style cast +3994cca librados.cc: use static_cast instead of c-style cast +719dc17 Revert "Enforce cache size on read requests" +71d3202 Revert "osdc: Fix ObjectCounter::_readx perf counters" +c2cebe5 Revert "osdc: Fix compiler warning" +a1f23b7 Revert "rbd: ObjectCacher reads can hang when reading sparse files" +b808cdf Revert "Fix read performance regression in ObjectCacher" +c4b2abd .gitmodules: ignoring changes in rocksdb submodule +082416f (origin/wip-rbd-revert) Revert "Enforce cache size on read requests" +544b9a8 Revert "rbd: ObjectCacher reads can hang when reading sparse files" +3b1eafc Revert "Fix read performance regression in ObjectCacher" +d8442eb (origin/wip-rwtimer) common/Timer: kill RWTimer +f76f83c (origin/wip-9873) osdc/Objecter: fix tick_event handling in shutdown vs tick race +4848435 common/Timer: recheck stopping before sleep if we dropped the lock +8d51142 erasure-code: remove LRC dead code +9d09e37 ECTransaction: Remove unused typedef. +60eaeca .gitmodules: ignoring changes in rocksdb submodule +a9dd4af rgw: send http status reason explicitly in fastcgi +44a8d59 (origin/fix-fstat-mode) java: fill in stat structure correctly +cb9262a (origin/wip-9806-giant) Objecter: resend linger ops on any interval change +1a3ad30 ReplicatedPG: writeout hit_set object with correct prior_version +8ae942a Remove unnecessary expressions about conf_journal_sz +024efeb EC: document the LRC per layer plugin configuration +a460c3b check rocksdb library when '--with-librocksdb' option is enabled +95a0ee1 qa: use sudo when rsyncing /usr so we can read everything +fa07c04 qa: use sudo when rsyncing /usr so we can read everything +4128814 FDCache: purge hoid on clear +3abbd4c shared_cache: add purge and tests +c116b4b shared_cache::add: do not delete value if existed +227ecd8 (origin/wip-9859) mon: Monitor: MMonGetMap doesn't require caps +9803ced (origin/wip-init-radosgw) init-radosgw.sysv: set ulimit -n before starting daemon +e81d887 Make better error reporting for client's call to rados.Rados +d9ff3a6 PG:: reset_interval_flush and in set_last_peering_reset +a49d745 objecter: Unlock in shutdown before waiting for timer thread +bc8fd49 erasure-code: use ErasureCode::SIMD_ALIGN in ceph_erasure_code_benchmark +c894812 erasure-code: add ErasureCode::encode unit test +0749a29 erasure-code: expose ErasureCode::SIMD_ALIGN as a const +abc1cfb ceph_erasure_code_benchmark: use 32-byte aligned input +fdeeeb1 erasure code: use 32-byte aligned buffers +3ce0615 erasure code: use a function for the chunk mapping index +6154339 common: add an aligned buffer with less alignment than a page +681dad8 common: remove dead code in buffer.cc +12f1151 (origin/wip-9852) mon: MDSMonitor: have 'filesystem_command' return int instead of bool +c589f3f mon: MDSMonitor: proper error output if pool DNE on 'add_data_pool' +52180a5 mon: MDSMonitor: update function doxygen description +64cf8ea (origin/wip-msgr) msg/async/AsyncConnection: drop unused port +86d3b18 msg/Messenger: allow ms_type 'random' +57d8195 msg/Makefile: keep headers +c025632 msg/async: rename ms_event_ -> ms_async_, drop unused config options +ddc9bc0 libcephfs.cc: use reinterpret_cast instead of c-style cast +fbf89f5 (origin/wip-9857) rbd: Correct readahead divide by zero exception +d9e340c Makefile.am: remove also old *.o/lo files +89eb2fe crush/CrushWrapper.cc: use reinterpret_cast instead of c-style cast +32665fa client/Client.cc: prefer empty() over size() for emptiness check +4cf3b5c FileJournal.cc: use reinterpret_cast instead of c-style cast +e72dfb4 Default configure with nss instead of cryptopp +2ec3609 (origin/wip-9372-injectargs) cli: CEPH_ARGS must be before injectargs +a566610 doc: update injectargs syntax +a458bd8 cli: do not parse injectargs arguments twice +f1afb18 cli: add verbose information related to argument parsing +a4fcc21 mailmap: Jiantao He name normalization +b42627b mailmap: Ma Jianpeng name normalization +13643d6 mailmap: Wyllys Ingersoll affiliation +82ce82c mailmap: Jiantao He affiliation +d80ea6a mailmap: Mehdi Abaakouk affiliation +4eee5f0 mailmap: VRan Liu affiliation +d8b260a mailmap: Yann Dupont affiliation +65be257 Fix read performance regression in ObjectCacher +349eb51 (origin/wip-9836-test-mon-id) tests: mon id is incorrectly skipped +9fbc083 (origin/wip-9031-9262) rados command: Add format support for ls operation +81f1a54 doc: Changes to librados to fix doc errors +09a6186 doc: The dot package is included in graphviz package +aae0976 doc: Remove unused PendingReleaseNotes file +58d3b7f rados command: Disable rados export/import (see feature #9403 to enable again) +feeda6b rados command: Minor namespace fixes +f5ebc92 pybind, test: Use new rados_nobjects_list_open() variants +d133315 test: Improvements to allow more thorough clean up between tests +a5a9a5f test: New and updated testing for pgls of all namespaces +9f772c8 rados command: Enhance ls output to show namespaces +a03f85a osd, osdc, librados, tools, rgw: Implement pgls of all namespaces +b5ca735 rados: Fix ObjectIterator instantiation to specify correct value_type +aa837b0 pybind: Add previously missed basic namespace to python bindings +760dddb doc: Add namespace to description of rados_ioctx_t +3de15e8 test: Handle destructor of KvStoreBench by adding io_ctx_ready bool +21a0eb3 test, key_value_store: Use pool rbd since no default data pool present +d7a8148 ceph_test_rados_api_*: expose RadosTest::nspace Expose RadosTestEC::nspace Rename others to nspace for consistency +e42fb5e Revert "ceph_test_rados_api_*: expose nspace" +ac3c1cb (origin/wip-9820) qa/workunits: cephtool: don't remove self's key on auth tests +98d7760 (origin/sponce-wip-9356) Added missing semaphore in libradosstriper AIO tests leading to potential memory corruption and thus test failures +f26cd1b Fixed remaining part of the seg fault described in bug 9356 by adding reference counting to CompletionData +783fc66 Fixed part of the seg fault described in bug 9356 by adding reference counting on RadosReadCompletionData +52c97b0 Fixed part of the seg fault described in bug 9356 by cleaning reference counting on MultiAioCompletionImpl +5299db3 Cleanup up useless method release in MultiAioCompletionImpl. It was exactly equivalent to put +777fe21 Updated names of default pools created at startup +ea100ac KeyValueStore: Add clone op detect to promote error +21dc6af mailmap: Ilya Dryomov transition from Inktank to Red Hat +1037193 mailmap: Greg Farnum name normalization +f207416 mailmap: Cheng Cheng name normalization +f76a676 osd: log when scrub,deep scrub, repair starts +64d977b client: fix signed/unsigned compilation warnings +cb290a1 (origin/wip-adamcrume) osdc: Fix compiler warning +2ae1cba mon: MDSMonitor: wait for osdmon to be writable when requesting proposal +0dd473c mon: MDSMonitor: have management_command() returning int instead of bool +91b2a2b mon: MDSMonitor: don't return -EINVAL if function is bool +1d1ae41 mon: MDSMonitor: check all conditions are met *before* osdmon proposal +07b7f10 mon: MDSMonitor: return if fs exists on 'fs new' +2c06413 (origin/wip-mds-coverity) mds: fix null dereference +9e6ae73 (origin/giant-unknown-locktype) mds: reply -EOPNOTSUPP for unknown lock type +bb9add6 test: fix compile warning in bufferlist.cc +a49255f librbd: fix compile warning in librbd/internal.cc. +69b5c72 doc: updates on Backfill Reservation +4606af7 (origin/wip-9526-crush-rename-bucket) mon: unit tests for osd crush rename-bucket +aa67560 mon: add the osd crush rename-bucket command +29d13d4 crush: unit tests for CrushWrapper rename item/bucket methods +30f3ac3 crush: add CrushWrapper::rename_bucket and can_rename_bucket +5e2a826 crush: add CrushWrapper::rename_item and can_rename_item +f810710 add unittest for Striper::get_num_objects +236895e crush: improve constness of CrushWrapper methods +7b66ee4 when non-default striping is used, internal methods can operate on extra objects +3741aab (origin/wip-9790-display-auid) auth: unit tests for auid display +5558afa qa/workunits/rbd/import_export.sh: be case insensitive +fcc3692 auth: add display auid to KeyServer::encode_secrets +fa2ff33 auth: add display auid to KeyRing::encode_formatted +2cbebc3 doc: correct command of `config push` +107cb0d rgw: correct "If-Modified-Since" handle. +ac92c45 (origin/wip-client-flock) qa/workunits/fs/misc: Add a workunit for file lock interruption +b0e6e85 mds: fix neighbor lock check +b61468d doc/dev/sepia: notes about sepia email list and irc channels +6705180 doc/release-notes: v0.80.7 +c9f9e72 (origin/wip-9598) Revert "Objecter: disable fast dispatch of CEPH_MSG_OSD_OPREPLY messages" +00907e0 msg/simple: do not stop_and_wait on mark_down +22637f4 doc: update lab notes +7022679 (origin/wip-5977) librbdpy: Added missing method docstrings +6753923 mds: reply -EOPNOTSUPP for unknown lock type +c4bac3e (origin/wip-inotable-init) mds: fix inotable initialization/reset +c95bb59 mds: fix inotable initialization/reset +f1fccb1 rpm: 95-ceph-osd-alt.rules is not needed for centos7 / rhel7 +b73fe1a (origin/wip-9730) doc: remove node requirement from 'mon create-initial' +264f0fc doc: remove whitespace +20b2766 Update vstart to setup users for s3-tests +0969945 client: use finisher to abort MDS request +e464a77 client: use atomic variable to track reference of MetaRequeset +4134c14 client: allow interrupting blocked file lock operation +289e8b4 client: register callback for fuse interrupt +229a6df FileStore:Round offset of fiemap down aligned with CEPH_PAGE_SIZE. +35bbb2d The fix for issue 9614 was not completed, as a result, for those erasure coded PGs with one OSD down, the state was wrongly marked as active+clean+degraded. This patch makes sure the clean flag is not set for such PG. Signed-off-by: Guang Yang +fbf4d47 KeyValueStore: Make clone error message more friendly +b426460 GenericObjectMap: sync transaction avoid lookup_parent failed +674c911 StoreTest: Add clone xattr test +d947050 (origin/wip-9718) osd/osd_types: consider CRUSH_ITEM_NONE in check_new_interval() min_size check +5ff4a85 (origin/wip-9747-ceph-spec) rpm: 95-ceph-osd-alt.rules is not needed for centos7 / rhel7 +50987ec libcephfs.h libcephfs.cc : Defined error codes for the mount function Used new error codes from libcephfs.h to replace the magic numbers in the mount functon found in libcephfs.cc. +7bab093 return value of handle_message for MSG_OSD_SUBOP/MSG_OSD_SUBOPREPLY should be true +d955676 (origin/wip-8983) rados: Use strict_strtoll instead of strtoll +809ddd2 (origin/wip-9706) osdc/Objecter: fix use-after-frees in close_session, shutdown +72a2ab1 osdc/Objecter: fix tick() session locking +d98b755 (origin/wip-9716) librados: Fix function prototypes in librados.h +d458b4f PGLog::IndexedLog::trim(): rollback_info_trimmed_to_riter may be log.rend() +022bace rados: Add tests for CLI strict parsing +26fe180 test: Fix rmpool in test_rados_tool.sh +459b2d2 mds: Locker: remove unused variable +6a2303a client: add helper function that updates lock state +b17b43a fuse: enable fuse_multithreaded by default +a1b2c8f client: posix file lock support +e075c27 common: link mds/flock.o to libcommon +89ebcaa Fixed JSON output for stray OSDs +a8d597f Fix error message when stripping with format 1 +66afcd9 Check pointer before deleting +2c7c03c (origin/wip-coverity-20141003) ceph_erasure_code_benchmark: fix parameter handling +8021581 client: add missing dendl and s/dout/ldout/ +fa539b9 (origin/wip-9692) qa/workunits/fs/misc: fix syntax error +9b18d99 (origin/wip-9696) PG::choose_acting: in mixed cluster case, acting may include backfill +3dd4cca (origin/wip-7796) rgw: set length for keystone token validation request +3cd8a7f (origin/giant-locker-null) mds: Locker: fix a NULL deref in _update_cap_fields +3b9dcff rados: Parse command-line arguments strictly +aa138eb mds: MDirUpdate: initialize discover count to 0 if we're not discovering +2a9ed93 mds: MDSAuthCaps: init "read" param in default constructor +ce4436c (origin/wip-print-mode) client: print out mode, uid, gid if they are changed +7cb2840 test_rgw_admin_log.cc: refactor to use calloc() +c43c85f test_rgw_admin_log.cc: fix use-after-free +c60a170 test/librados/c_write_operations.cc: free ressources +86ebaf6 os/FileStore: Because do_fiemap will do fsync, so don't do fsync() before calling do_fiemap. +042c536 rados_list_parallel.cc: cleanup before return from run() +3bba7ce test/librbd/fsx.c: fix potential unterminated string handling +b414b1d ErasureCodeIsa.cc: reduce scope of variables +557ca80 SyntheticClient.cc: reduce scope of variables +43c0d37 mds/flock.cc: reduce scope of some variables +d75856b osd/ReplicatedBackend.cc: prefer ++operator for non-primitive iterators +72e708c osd/OSDMap.cc: prefer ++operator for non-primitive iterators +4669233 mount.ceph.c: ensure '\0' terminated string +865a0dc build: add ceph-erasure-code-corpus to gitmodule_mirrors +f06ffba (origin/wip-da-fix-make_check) Makefile.am: make sure everything was build before make check +9b3d345 qa: move mon_mds tests last +e27cf41 (origin/wip-9437) qa: cephtool tests for `tell mds.X` +620a722 qa: fixup cephtool test when MDS exists +82ecf60 test: unit tests for MDSAuthCaps +d15ecaf vstart: create fewer pgs for fs pools +5f6589c vstart: mds * auth caps +316660d mds: fix MDSAuthCap when cephx is disabled +92178bc pybind/ceph_argparse: implement 'tell mds' +44e8390 pybind/cephfs: implement mds_command +0909fe4 pybind/cephfs: implement conf_parse_argv +1eb93f5 pybind/rados: add conf/conf_defaults attributes +fba3ede libcephfs: add ceph_mds_command +688396a client: add mds_command operation +b9c0ce4 osdc/Objecter: don't consume non-osd cmd replies +e8f3f6b mds: introduce MDS auth caps +fad2865 mds: handle MCommand (mds tell) +5e7cb60 mds: deprecation-warn on numeric mds names +9552e8f common: fix cmd_getval constness +9610029 messages: fix constness in MCommand constructor +f93bf38 mds: typedefs for rank and gid in MDSMap +90ca5e3 mailmap: João Eduardo Luís name normalization +c967ced mailmap: Yongyue sun affiliation +8149ac6 mailmap: Andreas Peters name normalization +9a32e8c Avoid unused pg_to_acting_osds call in OSDMap::get_primary_shard for not ec pool +8c4040b AsyncMessenger: Remove unused option +7f2d660 AsyncMessenger: add comments for structures +afe2b1a AsyncMessenger: add copyright for async files +23924a3 AsyncMessenger: Fix header file path +ed862ec AsyncMessenger: move Async* related file to msg/async +79a12de AsyncConnection: Fix mark_down problem when calling send_message +268db10 AsyncConnection: Rescheduler write event when connect successfully +b8ae562 AsyncConnection: Avoid seq ack not send and skip sd<0 shutdown +e25f2fe AsyncMessenger: Avoid join when worker thread not started +64ca744 (origin/wip-heap-profiler) doc: update memory-profiling with examples +6f6e7e2 mon,mds: call ceph_heap_profiler_init() at boot time +472a4b3 perfglue: profiler stats need more than 1024 bytes +cb36ccb mailmap: add yuandong to organizationmap +bc0209e (origin/wip-catch-options-errors) test,tools: indentation, whitespace only +3677fe0 tools: allow_unregistered() options +29b3771 tools: move po::collect_unrecognized in the try block +8e5b7ac tools: display boost::program_options errors +0100c9c test: catch boost::program_options errors +b085fd8 test,tools: capture boost::program_options in a try +b5ded99 AsyncConnection: mark down connection as soon as possible +c8dd0f2 AsyncConnection: make send_message directly send message possibly +5df3212 AsyncConnection: Reduce _try_send call +e1eec9a AsyncConnection: Optimize _try_send avoid new/delete +f27e51b Asyncconnection: Fix in_seq_acked problem +300cd7d EventEpoll: don't need to expand epoll struct +0caad0d Event: Use array instead of unordered_map for file_events +da83dac Event: time event can used as priority queue +19a9d95 Event: Change time precision from millisecond to microsecond +b9c86a3 Event: Fix do_request bug +cce1ae5 Event: Simply process_event impl +27f7cc0 Event: external_event lock may stuck in dead lock +cc0554a AsyncConnection: Avoid external thread access center +d62fe90 AsyncMessenger: Use round-robin to dispatch new connection +d746a1f AsyncConnection: Fix incorrect usage for bufferlist::splice +42d1368 AsyncConnection: Rescheduler avoid dead lock +05a238a AsyncMessenger: Check send queue when message in queue before connect ready +f7fd64d AsyncMessenger: Use unordered_map instead of map and remove unused codes +d9266a9 AsyncMsgr: Fix remote_reset segv +b5d741b Reconnect when socket is shutdown +e79f809 Use shared_ptr for EventCallback +13ed6c0 Add wake up to EventCenter +ec913d0 Add support for mon library +3554bed Replace AsyncConnection* with AsyncconnectionRef +5783ea0 Add EventCenter stop function +d43b0ae Fix Time Event problem +d41bb28 Add STANDBY state process +6bb277f Add TimeEvent to Event API +071ba4a Add event option +a653af1 Remove DispatchQueue in AsyncMessenger +d09d28c Add AsyncMessenger support +82175ec (origin/wip-9513) Fix read performance regression in ObjectCacher +0dd3afd (origin/wip-9496) mon: PGMonitor: populate scrub timestamps with 'now' on pg creation +ccdbfb4 mon: PGMonitor: prettify access to pg_stats_t in register_pg +9b39033 (origin/wip-9419) osd: Return EOPNOTSUPP if a set-alloc-hint occurs with OSDs that don't support +70ef4c1 osd: Remove unused PG functions queue_notify(), queue_info(), queue_log() +d14ca34 0.86 +7c4e278 (origin/wip-9677-ioprio-class-giant) common: ceph_ioprio_string_to_class always returns -EINVAL +822b088 osd: log error if set_ioprio fails to parse class +efb23b8 common: set_ioprio debug message including pid +62f0ef4 common: do not set ioprio if pid is not set +19c92d8 doc: missing osd prefix to ioprio config options +97dcc05 (tag: v0.86) 0.86 +32e8bcd Run configure without liblttng on squeeze as well. +be6de4a Run configure without liblttng on squeeze as well. +3535b7a (origin/wip-9677-ioprio-class) common: ceph_ioprio_string_to_class always returns -EINVAL +5088e0d osd: log error if set_ioprio fails to parse class +33339c7 common: set_ioprio debug message including pid +c7e4c0b common: do not set ioprio if pid is not set +6223568 doc: missing osd prefix to ioprio config options +b2e4bd5 msg: move SimpleMessenger to msg/simple/ +5a860be librados: use Messenger factory method +5eff0ee msg: use localized cct for derr +06aef6f doc/release-notes: v0.86 +10fe7cf (origin/wip-ostool) ceph_objectstore_tool: Accept CEPH_ARGS environment arguments +6aba0ab (origin/wip-9128) Add reset_tp_timeout in long loop in add_source_info for suicide timeout +52ac520 (origin/wip-rm-legacy-cli) tools: remove old ceph.cc +63c7e16 test/osd/Object: don't generate length of 0 +abe4c35 (origin/wip-os-recommend-doc-fix) doc: update kernel recommendations, add tunables link +6b9e20a (origin/wip-9658) ceph.spec: make ceph -> python-ceph dependency specify version +69acc8a msg: make messenger type configurable +62b0bfd msg/Message: drop unneeded #include +e55cb1f mon/MonClient: use generic Messenger factory +fe57fab (origin/wip-9663) client: clean-up objecter on failed client init +ca10ce4 Add one more case ( "=" ) and test get_str_vec as well. Signed-off-by: Yann Dupont +257dcc9 (origin/wip-osd-op-macro) rados.h: use macros to generate osd ops definitons and strings +1858f06 (origin/johnugeorge-wip-9492-crush-giant) Crush: Ensuring at most num-rep osds are selected +01e389a Crush: Ensuring at most num-rep osds are selected +f1becf9 (origin/wip-9655-osd-tell) qa: ceph tell must retry on ENXIO +234b066 (origin/wip-9492-crush-indep) Crush: Ensuring at most num-rep osds are selected +5c6c366 debian/control: fix python-ceph -> ceph file move to allow upgrades +35fd272 (origin/wip-9657) messages: provide an explicit COMPAT_VERSION in MMDSBeacon +177a33b (origin/wip-9661) MemStore: Need set/get_allow_sharded_objects() to work for ceph_objectstore_tool +0b155d0 ceph_objectstore_tool: MemStore needs a CephContext +7f6c31b debian/control: BuildDepend on lsb-release +73d5bdb (origin/wip-9245-test-mon-pending-giant) tests: remove tests requiring osdmonitor_prepare_command +e865781 mon: obsolete osdmonitor_prepare_command +d0c2d7d test: minor case fix +d0ceb3a (origin/wip-9545) os/FileStore: do not loop in sync_entry on shutdown +7e2bd22 (origin/wip-9418) mon: Monitor: let 'handle_command()' deal with caps validation +f0653c0 qa/workunits: mon: auth_caps: account for mon blank caps +87d06f1 mon: MonCommands: adjust indentation for 'auth add' +c7d5c25 qa/workunits: mon: auth_caps: variables must be local +7e85beb qa/workunits: mon: auth_caps: cleanup on successful exit +5488f46 test/vstart_wrapper.sh: use cephx +7469561 mon: Monitor: remove redudant call to osdmon's dispatch +c0e3bc9 mon: Monitor: check caps and source before dispatching messages +3d78285 mon: Monitor: create logical divisions on dispatch() based on msg nature +d0113e0 test: mon: test-mon-msg: Check which msgs the mons handle and reply to +ea96863 qa/workunits: cephtool: test auth profiles +d6b702c mon: MonCap: add new profiles +940c4e2 mon: Monitor: match command module caps against what's on MonCommands.h +8612461 mon: AuthMonitor: validate caps when creating or changing mon caps +038de00 (origin/wip-9245-test-mon-pending) tests: remove tests requiring osdmonitor_prepare_command +2abc8f4 mon: obsolete osdmonitor_prepare_command +6f69837 test: minor case fix +eb2f0f4 (origin/wip-9653-ceph-disk-bootstrap-osd-giant) ceph-disk: bootstrap-osd keyring ignores --statedir +fa0bd06 (origin/wip-9653-ceph-disk-bootstrap-osd) ceph-disk: bootstrap-osd keyring ignores --statedir +19be358 PG::actingset should be used when checking the number of acting OSDs for a given PG. Signed-off-by: Guang Yang +8253ead osdc/Objecter: use SafeTimer; make callbacks race-tolerant +6c37984 mailmap: Yehuda Sadeh name normalization +beff616 ceph-disk: set guid if reusing a journal partition +50e8040 (origin/wip-rados-empty-file) tools: rados put /dev/null should write() and not create() +0b0a373 (origin/wip-ysw-mailmap) mailmap: update email address +188370a doc/release-notes: fix attributions for 8702 fix +c0dc3a5 doc/release-notes: v0.80.6 +5b41d80 (origin/wip-8911) rgw: swift GET / HEAD object returns X-Timestamp field +29356d8 qa: fix osd pool ls invalid test +a1aa06b ReplicatedPG: dump snap_trimq on pg query +34f38b6 ReplicatedPG: do not queue the snap trimmer constantly +b29bf00 ReplicatedPG: clean out completed trimmed objects as we go +3374a0b (origin/wip-coverity-20141002) BtrfsFileStoreBackend.cc: fix string overflow +8b7fc61 test_librbd.cc: fix compiler warning, cast to size_t +e506f89 (origin/wip-objecter-shutdown) Objecter: check the 'initialized' atomic_t safely +0f731ae (origin/revert-2604-wip-9113) Revert "ReplicatedPG: clean out completed trimmed objects as we go" +fea0154 (origin/wip-mon-status) mon: break recovery status onto separate lines +46a76d5 mon: put 'ceph status' quorum status on new line +e127c89 mon: put 'ceph status' health items on separate lines +da9ae5c ceph.spec: fix typo +63b30d4 (origin/wip-8187) librbd: Skip tier pools in list_children and snap_unprotect +63d0ec7 (origin/wip-9013) rgw: add civetweb as a default frontend +d8ae14f (origin/wip-8188) librados: Add rados_pool_get_base_tier call +5b58f16 (origin/wip-coverity-20141001) test_librbd.cc: fix compiler warning +58c732f client/SyntheticClient.cc: remove dead code +3184a20 doc: A couple of fixes to the CloudStack documentation +88022e8 SyntheticClient.cc: remove dead code +17fa397 LogEntry.h: init LogEntry::prio in constructor +7d6e21d osd: fix need_journal call +8388836 (origin/wip-rpm-epoch) ceph.spec.: add epoch +a470c96 (origin/wip-fsls-json) mon: fix JSON `fs ls` output +2955b3d ObjectStore: Add "need_journal" interface to make aware of journal device +05fd507 Pipe: avoid redundancy new/delete for struct iovec +cefb1a3 (origin/wip-9635) mon: wait for paxos writes before touching state +46c1d93 mon: flush paxos write before setting shutdown state +4072ef7 mon: move paxos write wait into a helper +624aaf2 PG: release backfill reservations if a backfill peer rejects +62e2bca (origin/wip-8822) osd: swap state spinlock for atomic_t +a8ac4b6 osdc/Filer: drop probe/purge locks before calling objecter +0ea20a6 Locker: accept ctime updates from clients without dirty write caps +2e9c7c9 test-shared-cache: Add test for "lower_bound" method. Add multithread tests for "lookup" and "lower_bound" methods. +d34c21c test-shared-cache: Initial draft for the unit test of "common/shared_cache.hpp". +de87d54 common: document C_GatherBuilder and C_Gather +a67c2f9 (origin/wip-9628) mds: Add session to sessionmap when its state becomes opening +1feba20 Objecter: init with a constant of the correct type +46d5518 (origin/wip-osd-objecter) osd: do not bind ms_objecter messenger +fe3434f (origin/wip-python-flask) debian: move ceph_rest_api.py into ceph +8cda623 ceph.spec.in: move ceph_rest_api.py into ceph +b241624 ceph.spec: fix python-flask dependency +e42424e debian: python-flask is needed by ceph, not python-ceph +984a147 mailmap: Riccardo Ferretti affiliation +8d9fcbc mailmap: Casey Marshall affiliation +26941ea mailmap: Feng Wang affiliation +23c8fe5 mailmap: Scott A. Brandt affiliation +eedcd9c mailmap: Gerben Meijer affiliation +91af25f mailmap: John Wilkins name normalization +242f334 mailmap: John Spray name normalization +7571665 mailmap: Samuel Just name normalization +5d3c025 mailmap: Pavan Rallabhandi name normalization +214e6cd mailmap: Swami Reddy name normalization +d0a2202 mailmap: Volker Voigt affiliation +dc601c7 mailmap: Laurent Guerby affiliation +1a96348 mailmap: Johnu George affiliation +f0bbbad mailmap: Janne Grunau affiliation +f817935 mailmap: Daniel Schepler affiliation +29efada mailmap: Cheng Cheng affiliation +b167f70 mailmap: Sahid Ferdjaoui affiliation +4b33b58 mailmap: Jiang Heng affiliation +b386b59 mailmap: JuanJose Galvez affiliation +e6bba0d mailmap: Roman Haritonov affiliation +e133a92 mailmap: Yongyue Sun affiliation +beade63 (origin/wip-9620-test-mon-thrash) qa/workunits/cephtool/test.sh: fix thrash (ultimate) +5d1d9db librados: cap the IoCtxImpl::{aio_}*{write,append} buffer length +5f029ff os/FileStore: using FIEMAP_FLAGS_SYNC instead of fsync() before call fiemap. +69fc171 Clock: Using clock_gettime instead of gettimeofday in linux os. +becc114 librados: test s/E2BIG/TooBig/ +32195f9 librados: cap the rados_aio_*{write,append} buffer length +f777fc6 osd: Make RPGTransaction::get_bytes_written return the correct size. +7849d79 (origin/wip-crush-location) crushtool: add --show-location command +33501d2 librados: cap the rados*{write,append} buffer length +f8ac224 ceph-disk: add Scientific Linux as a Redhat clone +6b4d1aa (origin/johnugeorge-wip-9492-crush) Crush: Ensuring at most num-rep osds are selected +5ca7ea5 ceph-disk: add Scientific Linux as a Redhat clone +7827e00 os: io_event.res is the size written +d851c3f osd: improve debug output for do_{notifies,queries,infos} +126d0b3 (origin/wip-9582) osdc/Objecter: only post_rx_buffer if no op timeout +ba02a5e (origin/wip-9536-isa-alignment) erasure-code: test isa encode/decode with various object sizes +eb8fdfa erasure-code: add test for isa chunk_size method +7a468f3 (origin/wip-msgr-shutdown) msg: allow calling dtor immediately after ctor +af07d29 erasure-code: isa encode tests adapted to per chunk alignment +aa9d70b erasure-code: isa test compare chunks with memcmp instead of strncmp +ed77178 erasure-code: run isa tests via libtool and valgrind +668c352 erasure-code: do not use typed tests for isa +28c2b6e erasure-code: isa uses per chunk alignment constraints +6f4909a erasure-code: [ISA] modify get_alignment function to imply a platform/compiler independent alignment constraint of 32-byte aligned buffer addresses & length +7552571 doc/release-notes: v0.67.11 +8dc94a2 (origin/wip-9562) osdc/Filer: drop probe/purge locks before calling objecter +9593d87 documentation: erasure-code plugin isa does not require k/m +6886224 mailmap: Yan Zheng affiliation +fc1380b mailmap: Thorsten Glaser affiliation +7973280 (origin/wip-zafman-cleanup) osd: Remove unused PG functions queue_notify(), queue_info(), queue_log() +0f884fd (origin/wip-9008) For pgls OP, get/put budget on per list session basis, instead of per OP basis, which could lead to deadlock. +7f87cf1 ReplicatedPG: clean out completed trimmed objects as we go +2cd9b5f tests: use memcmp to compare binary buffers +c17ac03 (origin/wip-9487) ReplicatedPG: don't move on to the next snap immediately +255b430 osd: initialize purged_snap on backfill start; restart backfill if change +f833f12 (origin/wip-5595) rgw: rados->set_attrs() updates bucket index +44cfd88 rgw: PutObjMetadata, clear bufferlist before appending into it +4be53d5 PG: check full ratio again post-reservation +9c825ec documentation: revise placement group number guide +7f71c11 (origin/wip-mon-fix-checks) ceph-mon: check fs stats just before preforking +9687150 erasure-code: isa/lrc plugin feature +f51d21b (origin/wip-9572-erasure-code-blaumroth) erasure-code: restore jerasure BlaumRoth default w +e270216 mailmap: William A. Kennington III affiliation +9f0202b mailmap: Jason Dillaman affiliation +89fceb3 (origin/wip-mon-data-space-die) mon: Monitor: log RO commands on 'debug' level, RWX on 'info' +2c5b12d mon: Monitor: use MonCommand::requires_perm() when checking perms +bb55862 mon: Monitor.h: add 'requires_perm()' function to MonCommand struct +f1b814e mon: Monitor: log RO admin socket commands on 'debug' level +282bac7 mon: LogMonitor: adjust debug messages output levels +9686044 mon: LogMonitor: add debug message upon logging to a channel's file +3760bc1 mon: LogMonitor: appropriately expand channel meta variables +6c378ae common: LogEntry: if channel is missing, default to "cluster" +2da1a29 ceph_mon: check available storage space for mon data dir on start +9996d44 mon: DataHealthService: use get_fs_stats() instead +3d74230 common: util: add get_fs_stats() function +f421d5c documentation: comment the CompatSet data members +ce8eefc (origin/wip-8629) osd/ReplicatedPG: do not clone or preserve snapdir on cache_evict +398c74e ceph_test_rados_api_tier: add EvictSnap2 test case +682b9da os/FileJournal: do not request sync while shutting down +544b8c7 ReplicatedPG::on_removal: clear rollback info +781f05c Revert "PG::init: clear rollback info for backfill as well" +a53ead1 osd: Cleanup boost optionals +28b7b93 (origin/wip-log-msgs) mds: remove spurious logging +226c0c7 (origin/wip-9547-python-rados-truncate) test: check python rados aio_read with buffers containing null +8bda44f pybind: Fix aio_read handling of string buffer +9d9c8c7 (origin/wip-9539) Filer: add lock to protect strcut PurgeRange +b47fdd4 rbd: Use a rolling average to compute RBD write throughput +f3acae4 rgw_main.cc: add missing virtual destructor for RGWRequest +eeb74a1 os/GenericObjectMap.cc: pass big parameter by reference +1f134bb mds/Beacon.*: fix UNINIT_CTOR cases +f2a7d62 ErasureCodeLrc.h: fix UNINIT_CTOR +1a74822 ErasureCodeLrc.h: fix data_chunk_count UNINIT_CTOR +0e15df4 LogEntry.h: init LogEntry::seq with 0 +5bb94ed (origin/wip-9529) rgw: calculate hash after writing data +7b13724 crypto: don't hash zero sized buffer +76eff95 include/util.h: prevent multiple inclusion of header +b82ceda (origin/wip-coverity-20140919) rgw_main.cc: add missing virtual destructor for RGWRequest +13b8c92 os/GenericObjectMap.cc: pass big parameter by reference +45e0b33 common/buffer.cc: catch exception by reference +7e82950 test/kv_store_bench.cc: fix coverity REVERSE_INULL +48389d0 test/libradosstriper/striping.cc: remove dead initialization +ff61483 mds/Beacon.*: fix UNINIT_CTOR cases +ea02dc3 ErasureCodeLrc.h: fix UNINIT_CTOR +2bb35bb ErasureCodeLrc.h: fix data_chunk_count UNINIT_CTOR +2c2b413 LogEntry.h: init LogEntry::seq with 0 +af039ce test/librados/aio.cc: close resource leak +639c981 documentation: explain ceph osd reweight vs crush weight +f51e368 erasure-code: fix assert overflow +13780d7 (origin/wip-9538-format-plain) mon: osd find / metadata --format plain fallback +0fb0967 documentation: tiering typo +7ac60d8 (origin/wip-cephtool-test) tests: check osd health in cephtool/test.sh +4d75c4c tests: qa/workunits/cephtool/test.sh ! and -e +be97b7d documentation: fix bugous osd stop/start example +3f23709 (origin/wip-giant-messenger-fixes) Objecter: disable fast dispatch of CEPH_MSG_OSD_OPREPLY messages +681a754 Pipe: stop delayed delivery fast_dispatch in stop_and_wait() +fb5a244 osd/Watch: handle con without sessions +93dccdb osd/ReplicatedPG: handle sessionless op con in do_osd_op_effects +5d37850 osd: drop dead shutdown message handler +bb45621 common: Add cctid meta variable +c421b55 (origin/wip-9301) mon: re-bootstrap if we get probed by a mon that is way ahead +d81cd7f mon/Paxos: fix off-by-one in last_ vs first_committed check +9132ca4 (origin/wip-5768) rbd-fuse: Fix memory leak in enumerate_images +9a1ab95 (origin/wip-6926) rbd: Fix rbd diff for non-existent objects +d6913ae mds: fix not journaling client metadata +1395275 (origin/wip-9518) mds: fix not journaling client metadata +346c06c (origin/wip-6613) client: preserve ordering of readdir result in cache +600af25 client: introduce a new flag indicating if dentries in directory are sorted +59c8976 (origin/wip-acl-test) qa/workunits/fs/misc: Add a workunit for ACL +2bd7cee (origin/wip-9341) client: trim unused inodes before reconnecting to recovering MDS +95ee699 (origin/wip-rbd-readahead) client: Replace client readahead logic with Readahead +ad45d8c librbd: Add read-ahead +830373e osdc: Fix ObjectCounter::_readx perf counters +4809418 doc: Change listed RBD cache defaults to actual defaults +4089684 (origin/wip-decode-dump) msg: hexdump bad messages at debug level 1 (not 30) +5495570 msg: hexdump messages we can't decode at configurable debug level +7e13ac8 rgw: Export user stats in get-user-info Adminops API +480c372 Revert "crushtool: safeguard for missing --num-rep when --test" +288f05a (origin/wip-9189) mds: use new Session::human_name in health msgs +6320e53 mds: implement const SessionMap::get_session +32b51bb mds: generate friendly name for client sessions +920cac9 ceph_fuse: include mount point in client metadata +bd8c441 client: send metadata in session open +bdda237 ceph_fuse: refactor init to make mount_point accessible +758a7ce mds: include client metadata in `session ls` +1a9e3cc mds: store client metadata on Session +cd215c7 messages: add cephfs client metadata to MClientSession +3025b5f mds: collapse numerous client warnings into one +0769310 PGLog::claim_log_and_clear_rollback_info: fix rollback_info_trimmed_to +07f54f2 PG::find_best_info: let history.last_epoch_started provide a lower bound +92cfd37 PG::choose_acting: let the pg go down if acting is smaller than min_size +1f450fa (origin/wip-xattr-fix) client: request xattrs if xattr_version is 0 +c837fb9 mds: return xattrs when client explictly requests xattrs +681a49c (origin/wip-9435) mon: forbid tier changes when in use by FS +80441cd mon: prevent cache pools being used CephFS +86a4bed FileStore: Race condition during object delete is fixed +10b8966 crushtool: safeguard for missing --num-rep when --test +9a65b39 doc: Fixed broken hyperlink. +399fa80 script/run-coverity: update submodules +123c3fb test/mon/mkfs.sh: add check for default keyring +8ea86df test/ceph-disk.sh: resolve symlinks before check +8b27997 mon: pool create must not always create a ruleset +d5084f3 mon: add the get_crush_ruleset helper +daf6379 mailmap: correcting Zhiqiang Wang's mailmap and org affiliation +4b8c50f tests: flush logs before grepping them +45731db os: FileStore::lfn_unlink always clears FDCache +0ffc5ee tests: set the failure domain to OSD by default +191d67c tests: add get_osds() and get_pg() helpers +6d4e2ca test: libtool --mode=execute valgrind +457790d KeyValueStore: Reduce redundant "make_pair" +1a8b91b doc: Add keyvaluestore config description +bb49547 KeyValueStore: Reduce redundancy set_header call +306fb2f mds: set new inode's xattr version to 1 +1b9226c (origin/wip-9219-giant) osd: subscribe to the newest osdmap when reconnecting to a monitor +56ba341 (origin/wip-objecter-cancel) osdc/Objecter: fix command op cancellation race +baf7be9 osdc/Objecter: cancel timeout before clearing op->session +1149639 (origin/wip-xfs-inode64) ceph-disk: mount xfs with inode64 by default +ded1b30 erasure-code: preload fails if < 0 +27208db (origin/wip-doc-preflight) doc: Added feedback. +a140439 (origin/wip-9284) mds: limit number of caps inspected in caps_tick +bf590f8 mds: keep per-client revoking caps list +a6a0fd8 xlist: implement copy constructor +fd04d5e mds: health metric for late releasing caps +05d6958 mon: trigger transaction on MDS health changes +e6062b8 mds: add a health metric for failure to recall caps +8c0f255 mds: add state for tracking RECALL progress +8199f80 xlist: implement const_iterator +00a0021 client: fix trim_caps for inodes in root +2b5bbab client: failure injection for cap release +21f5e18 client: fix potentially invalid read in trim_caps +9007217 client: more precise cap trimming +c328486 client: fix crash in trim_caps +83fd1cf bugfix: wrong socket address in log msg of Pipe.cc +868b6b9 doc: osd_backfill_scan_(min|max) are object counts +cdb7675 (origin/wip-rbd-objectcacher-hang) rbd: ObjectCacher reads can hang when reading sparse files +ddd52e8 init-radosgw.sysv: Support systemd for starting the gateway +d32b428 doc: Added bucket management commands to ops/crush-map +d446a65 documentation: jerasure plugin is sub section of erasure code profile +4fb3e29 documentation: isa plugin is sub section of erasure code profile +75f0fb2 documentation: erasure code profile update +b8a1ec0 doc: fixes a formatting error on ops/crush-map +c3c6468 mds: update segment references during journal rewrite +a8c943a (origin/wip-9445) log: add simple test to verify an internal SEGV doesn't hang +2313ce1 (origin/wip-client-msg-leak) client: fix a message leak +e3fe18a global/signal_handler: do not log if SEGV originated inside log code +558463e log: add Log::is_inside_log_lock() +386f2d7 (origin/wip-9427-rewrite) mds: update segment references during journal rewrite +d41c3e8 (origin/wip-9307) rgw: push hash calculater deeper +28d4460 DBObjectMap: restructure map_header_in_use locking +0a1abac osd_types: fix pg_log_t tail dump +4d3579d doc: Added clarifications and added additional preflight steps for CentOS/RHEL. +1c8485e doc: Deleted redundant text string. +ce7b2ec erasure-code: fix erasure_code_benchmark goop (decode) +9ba4e78 (origin/wip-9446) mon: fix MDS health detail output +2b45bfa (origin/majianpeng-fix3) buffer: Add a test for bufferlist::rebuild_page_aligned +c268400 buffer: In rebuild_page_aligned for the last ptr is page aligned, no need call rebuild(). +bccb0eb (origin/wip-always-create-pidfile) daemons: write pid file even when told not to daemonize +aa5234e doc: Add file system osd config settings Add documentation for osd mkfs and osd mount options. +f54d5c7 rbd-replay: Add code documentation +8d23e8d rbd-replay: Add --dump-perf-counters option +675a6a6 rbd-replay: Add rbd-replay-many +398ebc0 librbd: Add missing tracepoints +3911354 rbd-replay: Add --anonymize flag to rbd-replay-prep +0e0a8d4 (origin/wip-7767-b) msg: prefetch data when doing recv() +16bd457 ReplicatedPG: cancel cb on blacklisted watcher +b7bdb93 erasure-code: fix erasure_code_benchmark goop +11082f7 OpTracker: Race condition removed while dumping ops through admin socket +3945ead OpTracker: The TrackedOp::events list was not protected while dumping ops +1de43e0 OpTracker: Removed _dump_op_descriptor_unlocked call for log level < 5 +3fac790 OpTracker: Sharding logic is implemented to improve performance +2fbe82d doc: Fixed syntax error. +7dbf750 doc: Updated authentication notes. Fixed syntax error. +7281638 (origin/wip-mds-beacon) mds: sleep in progress thread if laggy and waiting_for_nolaggy waiters +6fb5769 mds/Beacon: do not reconnect to mon in quick succession +4ad5db0 (origin/wip-client-ll-ref) client: include ll_ref when printing inode +cf70b90 (origin/wip-7934) test: Fix ceph_test_rados_watch_notify to delete the pools it creates +2e4e98b ReplicatedPG: Make perfcounter record the read-size for async-read. +cf34e00 ReplicatedPG: record correctly subop for perfcounter. +117de00 (origin/wip-9413-erasure-code-version-check) erasure-code: mon, osd etc. depend on the plugins +5a05e6b [rgw][s3] Allow colon ':' in access key +f05c977 (origin/wip-pool-ls) mon: add 'osd pool ls [detail]' command +46bbe30 (origin/wip-osdc-leak) osdc/Objecter: fix leak of MStatfsReply +1ff94cc EC-ISA: avoid usage of table cache lock outside the class implementation by introducing the setEncodingTable/setEncodingCoefficient methods +5b41dac EC-ISA: add intelligent table cache +83bd343 (origin/wip-replay-locking) mds: fix replay locking +3448d85 Cache tiering: do not allow flush/evict when there are requests pending +b40cce7 osd: set min_read_recency_for_promote to default 1 when doing upgrade +d734600 Change CrushWrapper::crush to private +5a784cd (origin/wip-9241) osdc/Objecter: drop bad session nref assert +3c6e888 osd/ClassHandler: fix build +d165238 FileStore: report l_os_j_lat as commit latency +70ce400 (origin/wip-9365) osd/ClassHandler: improve error logging +2305b28 (origin/wip-9362) osdc/Objecter: revoke rx_buffer on op_cancel +f295c1f ceph_test_rados_api_io: add read timeout test +977d289 ceph_test_rados_api_*: expose nspace +1349383 Objecter::_recalc_linger_op: resend for any acting set change +9e2d04f erasure-code: fix BlaumRoth sanity check on w +f917166 erasure-code: refactor jerasure Liberation parameters checks +4843fd5 ReplicatedPG:start_flush send a second delete +937d2b0 Revert "ReplicatedPG:start_flush send a second delete" +78d7499 Revert "osd/ReplicatedPG: avoid dereferencing iterator at end()" +3578b11 ReplicatedPG: create max hitset size +e9b09e8 (origin/wip-9381-erasure-code-rpm) packaging: add all erasure code plugins to RPM packages +c5bafae erasure-code: Avoid k/m that we set are not equal in erasure-plugin. +9606232 KeyValueStore: Fix scrub causing inconsistence state +ae05edd ObjectStore Test: Add test for simulating scrub behavior +c664179 KeyValueStore: Fix upgrade from non-exist superblock OSD version error +6681008 mailmap: M Ranga Swami Reddy affiliation +448342e mailmap: John Spray name normalization +2f2c37f mailmap: Marco Garcês affiliation +0204998 mailmap: Erik Logtenberg affiliation +284fb49 mailmap: François Lafont affiliation +6307536 (origin/wip-yasm) configure: do not try yasm on x32 +d5777c4 doc: Fixed broken links and clarified terms for new authentication docs. +e2de11a doc: Minor cleanup. +9ab46dc debian: only B-R yasm on amd64 +836a670 doc/release-notes: v0.85 +591a179 (origin/wip-doc-qemu) doc: Added more robust usage example for uid and conf for QEMU. +b178e97 doc: Clean up syntax to suppress warnings. +4ad1106 doc: Clean up syntax. +7531b28 (origin/wip-9366) lttng: Fix 'make tag' when configured --without-lttng +1c34601 (origin/wip-paxos-dout) mon/Paxos: make is_readable debug output show result +62ca27d mon/Paxos: don't spam log with is_readable at dout level 1 +a0c2284 (tag: v0.85) 0.85 +f0e0c31 Include types.h after stdint.h to accomodate for older distributions. This fixes compilation on CentOS 5. +9254792 (origin/wip-rbd-force-write-back) rbd should use write-back when caching is enabled +0fb3e52 correct error of repeatedly adding io_size to off in do_bench_write +4fc9fff (origin/wip-6494) Enforce cache size on read requests +f0a4a2f tests: flush logs before grepping them +03aa113 erasure-code: init function is extern "C" +484fb85 doc: Update logging path to reflect log rotate script default path. +f0a1d28 doc: Add a contributing file at the root of repo +4673242 rgw: add .log to default log path +6fac815 (origin/wip-formatter-va) formatter: clean up dump_format() +df3c70a qa: scripts to help test ceph-qa-suite +2280736 (origin/wip-9358) osdc/Journaler: fix try_read_entry()/wait_for_readable() locking +94173a3 (origin/wip-9282) mds: warn clients which aren't revoking caps +d8e672f rgw: Implementation for S3 Get Bucket Location +9e503b5 test/formatter: Add tests for dump_format_ns +eaa2bb0 rgw_formats: dump_format_ns implementation +2fb51b2 Formatter: add a dump_format_ns to base Formatter +14d87bd (origin/xiaoxichen-refactor_lrc_crush) Refactor ErasureCodeLrc::create_ruleset +eae88da (origin/wip-8648) mds: clear objects' dirty flags after log segment is expired +69638df doc: fix missing bracket +35663fa doc: attempt to get the ayni JS into all head tags +409c955 (origin/wip-SCA-20140902) OSDMonitor.cc: fix potential division by zero +7b77210 objectstore/store_test.cc: fix unintentional integer overflow +6b70483 os/HashIndex.cc: fix unintentional integer overflow +f29e5b3 mount.ceph.c: free memory before return +903af9c st_rados_create_pool.cc: cleanup before return from run() +ece990d rados_list_parallel.cc: cleanup before return from run() +135ccad erasure-code: warning fix +7de8d17 FileStore: Remove unused code. +41df414 (origin/wip-mds-lock) mds: don't take mds_lock when doing journal operations +7ccabbf librbd.cc: add check to prevent null deref in rbd_list() +4f35714 (origin/wip-9311) Parallelize RBD import/export +f53bf53 PendingIO.cc: use static_cast instead of c-style cast +cbd324d FileStore.cc: use static_cast instead of c-style cast +ca6eb61 (origin/wip-9026) client: vxattr support for rstat +c2443b9 (origin/wip-doc-authentication) doc: Provided additional detail on daemon-specific caps syntax. +8569b93 doc: Updated Keyring settings from comments and ceph-deploy defaults. +b6a97d8 documentation: disk thread ioprio options +1b9e670 systemd support in ceph-disk activate +6ec08e0 client/Client.cc: fix null pointer checks for 'in' +c8d2388 (origin/wip-9151) mon: add MDS metric metadata to health detail +9ee8015 mds: add thread to progress queues outside dispatch +1058a9e mon: handle beacon health metrics in MDSMonitor +0fc8a0d mds: populate health metrics in beacon +12ab937 messages: add health fields to MMDSBeacon +f5e7a4b mds: use HeartbeatMap to control beacons +681f4f8 mds: const getters in MDLog +124856a include/CompatSet: more const-ness +232757f mds: promote Beacon to be a Dispatcher +17d547e mds: extract beacon state from MDS lock +e69f321 include/CompatSet: make merge const() +46c94e9 mds/CInode.h: prefer ++operator for non-primitive iterators +a5468ab ceph_objectstore_tool.cc: prefer ++operator for non-primitive iterators +4d9927e (origin/wip-session-stats) mds: cap and lease count in `session ls` asok +ea2a8d0 (origin/wip-request-count) mds: Fix Session::get_request_count +15df8ac rbd_replay/Replayer.cc: pass const string parameter by reference +9d926f1 ReplicatedPG.cc: prefer ++operator for non-primitive iterators +dae0593 IndexManager.cc: prefer ++operator for non-primitive iterators +40189a2 PGMonitor.cc: prefer empty() over size() for emptiness check +99fc33f ErasureCodeLrc.cc: prefer ++operator for non-primitive iterators +2dcfe0f ErasureCodePlugin.cc: prefer ++operator for non-primitive iterators +a754ce5 ErasureCodeLrc.cc: fix -Wmaybe-uninitialized compiler warning +0d27bcc osd/ReplicatedPG.cc: fix resource leak +38e6c64 test_rgw_admin_log.cc: remove unused variables +473b33b osdc/ObjectCacher.cc: refer ++operator for non-primitive iterators +16cbaba osd/PGLog.h: prefer ++operator for non-primitive iterators +8f368c5 mailmap: Ashish Chandra affiliation +5fd50c9 mailmap: Boris Ranto affiliation +a5b4c58 (origin/wip-9309) lockdep: increase max locks (1000 -> 2000) +9fac072 documentation: add the mark_unfound_lost delete option +bec3032 osd: MissingLoc::get_all_missing is const +e13ddc7 tests: qa/workunits/cephtool/test.sh early fail +fc499aa mailmap: add .peoplemap +177202e erasure-code: lowercase LRC plugin name +4c9fdbf common/LogEntry: fix warning on x86_64 +a24c8ba common/LogEntry: fix warning on i386 +acfe62e (origin/wip-aio-journal) Revert "os/FileJournal: For journal-aio-mode, don't use aio when closing journal." +c776a89 os/FileJournal: stop aio completion thread *after* writer thread +fa45ed8 (origin/wip-9285) osd/ReplicatedPG: do not evict blocked objects +ded1cf4 (origin/wip-9294) osd/ReplicatedPG: avoid dereferencing iterator at end() +d20432e erasure-code: preload LRC plugin +982c9dd (origin/wip-hitset-bytes) osd/ReplicatedPG: adjust avg_size calculation in agent_choose_mode +3fc6a73 osd/ReplicatedPG: calculate num_user_bytes +6ce36b0 osd/ReplicatedPG: scrub and repair hit_set_archive bytes +3409c38 osd/ReplicatedPG: account for hit_set_archive bytes +9edd655 osd/osd_types: add num_bytes_hit_set_archive to stats +93beff1 erasure-code: use s/get_str_map/get_json_str_map/ +6388934 erasure-code: mkfs.sh needs to know the plugin directory +8110204 osd: OSDMap: ordered blacklist on non-classic encode function +1e69ff2 PG::init: clear rollback info for backfill as well +45a61ad erasure-code: ECRecPred must be true if all chunks can be recovered +734ae88 erasure-code: LRC plugin documentation +01b943b erasure-code: test LRC pool, profile and crush ruleset +c222601 erasure-code: high level LRC configuration +b0fd481 erasure-code: locally repairable code plugin +c2ca011 erasure-code: delegate chunk remapping to the plugin +b517ca4 erasure-code: override the default only if the plugin match +4670d9e erasure-code: relax profile parameter syntax +e2e07d9 erasure-code: add ErasureCodeInterface::get_coding_chunk_count +9fc2684 (origin/wip-9281) tools: use cout instead of cerr in journal tool +a994145 (origin/wip-mds-recover) mds/RecoveryQueue: do not start prioritized items synchronously +e0b19e3 (origin/wip-hadoop) qa: fix+cleanup hadoop wordcount test +76b8e57 erasure-code: preload the default plugins in the mon +c3e1466 Test: fixing a compile warning in ceph_objectstore_tool.cc +1b42726 Cache tiering: use local_mtime to calculate the age of objects during evicting +335c1f7 doc: Added rbd-replay-prep and rbd-replay manpages to block device TOC. +b965398 doc: Fixed broken hyperlink. +7948e13 doc: Added sysctl max thread count discussion. +a257291 (origin/wip-9266) client: fix dispatcher ordering (broken fuse) +ce29b76 (origin/wip-8231-forreview) Fix ceph_scratchtoolpp to create and delete its own pool +a03f719 ceph_objectstore_tool: Bug fixes and test improvements +23ec93a ceph_objectstore_tool, test: Implement import-rados feature and unit test code +b193812 tools/rados: Improve trigger for op_size rounding info message +54dcbf2 test: ceph_objectstore_tool unit test improvements +3694068 ceph_objectstore_tool: Add operation "rm-past-intervals" for testing purposes +9325ec1 ceph_objectstore_tool: Add past_intervals to export/import code +a2bd2aa ceph_objectstore_tool: Minor improvements +f01e334 ceph_objectstore_tool, test: Add list-pgs operations and unit test case +83fbc91 Complete replacement of ceph_filestore_tool and ceph_filestore_dump with unified ceph_objectstore_tool +7786419 Renames and removal towards a unified ceph_objectstore_tool +f464f57 ceph_filestore_dump.py: Replace ceph_filestore_dump.sh with better python version +970d983 PG: wait until we've build the missing set to discover_all_missing +3e9e108 test: ceph_filestore_dump.sh test improvements +b4d95cc ceph_filestore_dump: Add set-omaphdr object command +30c0f31 ceph_filestore_dump: Add get-omaphdr object command +0fc6bd2 ceph_filestore_dump: Add rm-omap object command +50cd57e ceph_filestore_dump: Add set-omap object command +b50c43c ceph_filestore_dump: Add get-omap object command +465d777 ceph_filestore_dump: Add rm-attr object command +95554e0 ceph_filestore_dump: Add set-attr object command +55d43c0 ceph_filestore_dump: Add get-attr object command +3c24d1f ceph_filestore_dump: Add set-bytes object command +869dd92 ceph_filestore_dump: Add get-bytes object command +48890c7 ceph_filestore_dump: Add list-omap object command +00c6b06 ceph_filestore_dump: Add list-attrs object command +844dabb ceph_filestore_dump: Add --type list to output objects in a pg in json +605caec ceph_filestore_dump: Add remove object command and usage for new commands +d4a9daf ceph_filestore_dump: Add utility function get_fd_data() +7520e50 ceph_filestore_dump: Fail import/export with a tty for stdin/stdout +3a574cc ceph_filstore_dump: Save if stdout is a tty and add routine to clean binary strings +c05f895 common: Add missing ghobject_t::decode() for json +2e9dcb2 ceph_filestore_dump: Add --skip-journal-replay and --skip-mount-omap +3d9fde9 os: Add optional flags to generic ObjectStore creation (SKIP_JOURNAL_REPLAY and SKIP_MOUNT_OMAP) +44b261d ceph_filestore_dump: Improve debug output by showing actual offset +087c0f9 ceph_filestore_dump: Use cerr now that we aren't closing stderr +f7f9b25 common,ceph_filestore_dump: Add ability for utilities to suppress library dout output +3bc4291 doc/install/manual-deployment: move 'done' comment up +dc6bd3b mds/Locker: if a client asks for file caps, prioritize file recovery +0fcdc6b mds/Locker: prioritize file recovery on rd/wr/x lock +bd3c8bc mds/RecoveryQueue: add method to prioritize a file recovery; fix logging +8f4ea81 mds: change mds_max_file_recover from 5 -> 32 +0747ca7 mds: make max file recovers configurable +848fcf7 (origin/wip-8718) rgw: don't try to authenticate a CORS preflight request +e440fb4 test/mon/*: prime mon with initial command before injection +7a93258 (origin/wip-mds-namespace) mds: remove `using namespace std` in headers +fc89c27 messages: remove `using namespace std` in headers +e5930a3 tests: reduce osd-crush.sh execution time +b059bcd (origin/wip-jerasure-upgrade) erasure-code: assert the PluginRegistry lock is held when it must +3c4220e erasure-code: add Ceph version check to plugins +d4ea682 erasure-code: implement ErasureCodePluginRegistry::remove +c02c41c erasure-code: wrap lines for emacs compile command +efc8bfd erasure-code: jerasure preloads the plugin variant +56db6de erasure-code: add Red Hat to copyright notices +203d62f erasure-code: remove unused errno.h include +487105d erasure-code: add directory to plugin init functions +39bcb43 erasure-code: preload the isa plugin by default +e9a05b8 doc: Update docs about OSD benchmark syntax +a087f03 Revert "doc: Update docs about OSD benchmark syntax" +36f15c3 doc: Update docs about OSD benchmark syntax +ae3d873 PG::can_discard_op: do discard old subopreplies +97e4e11 (origin/wip-9148) civetweb: update submodule +1434e5c (origin/wip-blacklist-mds) mds: restart on -EBLACKLISTED +bb11936 mon: flush paxos write on shutdown +b1cf210 mon/Paxos: WRITING != WRITING_PREVIOUS +96030d6 mon: _reset() before updating state +d3bb477 mon: flush before scrub +805e5d7 mon/Paxos: flush io on reset() +a0e0b9b mon/Paxos: make backend write async +3dcea3b mon/Paxos[Service]: allow reads during WRITING state +6a71159 mon/Paxos: add writing and refresh states +663146a mon/Paxos: move post-commit finish work into commit_finish() +08f331b mon/Paxos: break commit() into two pieces +e74c044 mon/MonitorDBStore: assert closed in destructor +bb50371 mon/MonitorDBStore: drop useless ctor +02a7209 mon/MonitorDBStore: add async queue_transaction() +01072b0 mon/MonitorDBStore: add close() method +a6a1e99 mon: interact with MonitorDBStore::Transactions by shared_ptr Ref +cfc6830 common/Finisher: fix perfcounter +97f9b6d mon/OSDMonitor: fix double-free on old MOSDBoot +06b92ce (origin/wip-rewrite-PR2189) Move fedora patch file (used by ceph.spec.in) to rpm/ subdir +7474f72 ceph.spec.in: tests for rhel or centos need to not include _version +e37b262 ceph.spec.in: Add a small comment on the empty %files section +875a99e ceph.spec.in: Obsolete all older versions. +8f95daf ceph.spec.in: No version on ceph-libs Obsoletes. +7598502 ceph.spec.in: Obselete ceph-libcephfs (not libcephfs) +00877ae ceph.spec.in: We need those nice recent changes for rhel7 in Fedora too. +461523b ceph.spec.in, init-ceph.in: Don't autostart ceph service on Fedora. +e9da2d8 ceph.spec.in: Add obsoletes for libcephfs +6c264f2 ceph.spec.in: add ceph-libs-compat +62d74b3 civetweb: update submodule +11acb70 rgw: convert header field underscores into dashes +06ec5ef (origin/wip-7988) test: common: test_config: whitelist '$channel' meta-variable +8a9831f osd/mds/monc: Adjust for LogClient/LogChannel usage +bb9d4ca mon: LogMonitor: debug update_from_paxos +8f9e105 mon: LogMonitor: expand meta variables at time-of-call +86b2153 mon: LogMonitor: observe config changes +b97b06e mon: LogMonitor: write log messages on a per-channel basis +8b5e0cf mon: Monitor's clog/audit_clog need to accessed as pointers +68ef681 mon: Monitor: observe log client config changes +3ee9061 mon: Monitor: propagate return for functions called for admin socket +301fc0c mon: Monitor: log administrative actions via admin socket +43075bf mon: Monitor: log every administrative action in an 'audit log' +b7ce633 common: LogEntry: if 'channel' is empty on decode assign default +7ef1273 common: LogClient: allow specifying facility for LogClient +6885824 common: str_map: have 'get_str_map' only handling plain-text +9181114 rgw: clear bufferlist if write_data() successful +b1af4bd common: str_map: add helper methods to get values from maps +15e9fc4 common: LogClient: delegate message reference release to caller +59dac42 common: LogEntry: refactor how we output to syslog +8a2bfcd common: LogEntry: add 'channel' field +3178ca9 common: LogEntry: add clog_type_to_string() +0d2a6c7 common: LogEntry: change field name from 'type' to 'prio' (aka priority) +f25bca3 systemd: ceph-mds and ceph-mon need networking too +c6f4b42 sample.ceph.conf: some updates +2b13de1 (origin/wip-8863) osd/PG: fix crash from second backfill reservation rejection +5a63215 (origin/wip-reweight) mon/OSDMonitor: make reweight_by_* output less misleading +146e60d osd: Remove extra call to release_op_ctx_locks in eval_repop. It is called in remove_repop. +3bfbc14 test/mon/mkfs.sh: fix test +c2f21c0 (origin/wip-9218) osd: fix osd_tp shutdown +8346e10 PG: mark_log_for_rewrite on resurrection +cb4c5e8 OSD::session_notify_pg_create: requeue at the start of the queue +3c847c5 (origin/wip-config-diff) common: ceph_context: add admin socket command 'config diff' +ef51160 common: config: let us obtain a diff between current and default config +4b8b25e tests: histogram prevent re-use of local variables +a525bf3 (origin/wip-9054) ReplicatedPG:start_flush send a second delete +ee02293 tests: histogram prevent re-use of local variables +66c7439 ReplicatedPG::start_flush: remove superfluous loop +0416b88 update license for libcephfs +e6da732 PG: recover from each osd at most once +8a1723f PG: make the reservation sets more descriptively named +bf3e483 (origin/wip-9238) mds: fix FP error in ROUND_UP_TO +4672e50 osd/OSDMap: encode blacklist in deterministic order +a15ad38 vstart: start rgw on port specified by env var +dbe6c79 don't update op_rw_rlatency/op_w_rlatency when rlatency is zero +f3bf246 fix wrong value of op_w_latency perf counter +501dd3c ceph_filestore_dump: Export omap in batches for large omap case +398b418 ceph_filestore_dump: Remove unused bufferlist databl +9449520 (origin/wip-9209-round-up-to) common: ROUND_UP_TO accepts any rounding factor +df3b6fc Fix syntax error in rst documentation +cef1299 doc: Added links. Clarified namespace comments. Added limitations. +d817a6a doc: Minor changes. +16d946b qa/workunits/hadoop/wordcount: remove bogus rm -r +5db51d6 doc: Added a few comments and links to other relevant docs. +751b3e2 (origin/wip-9226) rgw: fix test to identify whether object has tail +c7e1b9e (origin/wip-9221) ceph_test_rados_api_tier: make PromoteOn2ndRead test tolerate retries +73733dd documentation: update recovery config options defaults +97b1916 CollectionIndex: Collection name is added to the access_lock name +3e85041 rgw: admin ops create user API can not determine existing user +f7ca1bf Update python.rst +f651f93 (origin/wip-9079) msg/Accepter: do not unlearn_addr on bind() +a67421a (origin/wip-objecter) osd: update handle_osd_map call +ef44292 common/Timer: fix deadlock in RWTimer::shutdown +10efe17 osdc/Objecter: fix op_cancel on homeless session +28110ff osdc/Objecter: hold session ref longer in resend +5d1b295 test: fix prematurely released lock in RadosModel +e7e7fdb osdc/Objecter: fix ref counts in *Map_Latest +ad193e1 osdc/Objecter: avoid locking two sessions at once +2463be5 osdc/Objecter: disable lockdep for double lock +8a0382b common/RWLock: allow disable lockdep on calls +9a5651b osdc/Objecter: fix resource management +213f652 librados: handle (and ignore) MOSDMap; do not leak +1e1ee48 client: handle (and ignore) MOSDMap +6baf36f librados: shut down monclient after objecter +2b94408 mon/MonClient: ensure !cur_con == cur_mon.empty() +73e5bb0 librados: verbose logging in ::notify +f356d0b librados: fix uninitialized values in notify +e784586 librados: separate ::notify return values +6f3bb55 librbd: handle blacklisting during shutdown +69612e7 librados: refactor watch/notify; return notify error code +e4e7a18 librados: prefix msg handler with handle_ +59a9785 librados: rename watch/notify callback register functions +7a2ec05 osd: include ETIMEDOUT in notify reply on timeout +a786d2d messages/MWatchNotify: include an error code in the message +611d0f7 librados: avoid unnecessary locks +52b0ddc librados: fix race on osdmap initialization +545baf8 librados: update Objecter shutdown +28e5c03 tools: update for Journaler/Objecter interfaces +6373112 common: fix Finisher perf counter +13fbefa osdc: remove unused Blinker.h +ed1f807 test: add some missing modelines +13e6c5f osdc: Add lock to Filer::Probe +a0fd5e0 mds/Server: fix wait_for_osd_map calls +3487f21 osdc/Journaler: fix C_RetryRead locking +c272855 mds: convert IO contexts +e1e2866 osdc/Journaler: use finisher for public callbacks +10a08b8 osdc/Journaler: remove unused waitfor_trim +4f3b803 mds: Switch to new context types +0860f1a mds: add MDSContext subclasses +dcdcfd3 include: generalize C_Contexts and C_Gather* +04d01eb common: assert non-null ptrs in OnFinisher +6b55c42 client: add missing lock in sync_write_commit +1e0387a client: remove unused C_SnapFlush +85fbddc mds: rename IO completions with _IO_ +27aed2d osdc/Objecter: make homeless_session a pointer +45b355e mds/MDLog: del stale ref to C_MDS_WroteImportMap +29533f3 mds: fix C_MDC_TruncateFinish locking +68d1497 mds: fix Server::C_MarkEvent locking +d893938 mds: update mds_lock handling in Locker contexts +0cfaeb9 mds/MDLog: enable Journaler finisher +61a69c8 osdc: Use a finisher from Journaler +db7369b osdc: locking for Journaler +2be623b mds: fix calls to Objecter::wait_for_map +619ea1f mds: update MDLog._replay_thread for locking +f6cd5fa mds: use finisher for BootStart contexts +0a54f00 librados: wait for map on create_ioctx failure +6236521 librados/RadosClient: remove unused get_pool_name() +83d983f mds: allow Objecter to dispatch its own messages +5668941 osdc/Objecter: ignore messenger events before or after initalized +a30f7c6 mon/MonClient: fix shutdown typo +65f9080 librados dispatch fix +7262da3 client: let Objecter dispatch directly +d3b87fb client: add a Finisher for the Objecter +9cb2c81 include/Context: add generic C_Lock +2e30812 mds: push objecter completions to a Finisher +641364e mds: mark objecter completions with _IO_, take mds_lock +c7b7bdd osdc/Objecter: take over ownership of OSDMap +8c860f9 osdc/Objecter: make OSDMap private +659909e osdc/Filer: use lock-safe OSDMap accessors +0dfe6d6 mds/SnapServer: use lock safe OSDMap accessors +fad3641 mds: use lock-safe OSDMap accessors; adjust Objecter wait_for_map call +85bffa3 mds: use lock safe OSDMap accessors for TMAP2OMAP check +5328f0a client/SyntheticClient: use lock safe OSDMap accessors +fd179ea test_mon_workloadgen: use Objecter::wait_for_osd_map +9f37f3d osdc/Objecter: make wait_for_osd_map() locking safe +5ec56c3 client: use Objecter::{get,put}_osdmap_read() interface +f698112 librados: use {get,put}_osdmap_read() accessors +af15f9e osd/OSDMap: return const string from get_pool_name +1145b2c librados: drop osdmap pool name cache +1848e99 osd/OSDMap: make lookup_pg_pool_name const +a37fcd8 osdc/Objecter: add name-base pool_delete +d0d1605 osdc/Objecter: protect pool ops with rwlock +d83d0f4 osdc/Objecter: add OSDMap accessors that are lock-safe +c86d2b9 librados: let Objecter dispatch its own messages +0c7dd66 osd: let Objecter dispatch directly +31b0ead osdc/Objecter: wire up native Dispatcher fast dispatch +09a8543 osdc/Objecter: make Objecter a Dispatcher +2c2e38e mds: add finisher +a6a8840 objecter: take write lock in ms_handle_reset() +8147f9f rwlock: assert on unlock if not locked +795cba9 objecter: fix locking +9b811a3 objecter: split objecter initialization +b440597 objecter: Objecter::Op is refcounted +e76cfcc objecter: don't serialize responses if there's no object name +cdb8899 objecter: shard completion_lock +9e6aedf objecter: a major refactoring +452dc9e timer: fix RWTimer shutdown +8f5cb22 librados: cancel operation +94119c4 test_mon_workloadgen: fix for new objecter interface +1d07ef2 rgw: abort early from logging function +09af405 osd: adapt to new Objecter interface +a2f94d2 librados: remove warning +c9d4cde librados: push snap related functions down to objecter +dc8494d librados: call objecter->handle_osd_map() under lock +517f10d librados: adapt to new objecter interface +e2fa0cf librados: don't hold client lock in certain operations +aac2242 librados: don't hold lock in dispatch() +bcc69ed mds: adapt to new objecter interface +4c6eb6e client: adapt to new objecter interface +94e1809 time: create RWTimer +33ecf3d common/RWLock: add lock context +91c938f common/RWLock: add explicit unlock() to *Lockers +3a399ea common/RWLock: add get() +8f9a9db common/RWLock: check return values +92615ea common/RWLock: track read/write locks via atomics for assertion checks +74ce4f2 rbd: fix signess warning +f7c0001 common: remove spurious uint32_t in buffer.c +6ad8e61 Fix FTBFS on alpha due to incorrect check on BLKGETSIZE +2554243 (origin/wip-mds-pc) mds/Server: rename perfcounters +b0cc869 mds: rename a bunch of metrics +31ef1a9 mds: set l_mds_req on client request +06682c4 vstart.sh: debug rgw = 20 on -d +00c677b (origin/wip-civetweb-log) rgw: use a separate callback for civetweb access log +850242c rgw: separate civetweb log from rgw log +f246b56 (origin/wip-weak-refs) common/shared_cache: dump weak refs on shutdown +6cf583c common/shared_cache: take a cct +2c27485 Doc: Add config option to turn off crush update +78e84f3 CrushWrapper: pick a ruleset same as rule_id +1835778 needs network or it will not start if enabled +8c69054 osd: make coll_t::META static to each file +493577b (origin/wip-9173) mds: fix crash killing sessions without conn +dcf8c03 mds: logging in SessionMap +01ce249 Revert "Merge pull request #2253 from adamcrume/wip-lttng" +3ced97b (origin/wip-9176) mon: make dispatch(), _ms_dispatch() void +610f4be mon: always process the message in dispatch +19df386 mon: fix occasional message leak after session reset +b245d60 (origin/wip-fingerprint) mon: generate cluster_fingerprint if null +675b004 mon: add a cluster fingerprint +552c4b4 rbd_replay: Add unit test for batch_unreachable_from +7616092 rbd-replay: Add unit test for Ser +9673e2f lttng: Split --with-lttng and --with-babeltrace options +07ab36f lttng: Remove tracing-specfic local variables when lttng disabled +3f1917c lttng: Add informational messages to configure.ac +230c5b8 lttng: Only install rbd-replay-prep when enabled +141f37a lttng: Check for babeltrace when autoconfiguring lttng +9c388f0 lttng: Check that the main babeltrace header is present +84bfe91 lttng: Test for sane lttng-gen-tp +e419ba6 lttng: Don't build trace libraries when lttng is disabled +d1064bf lttng: Fix build error on 32-bit systems +42d633f lttng: Remove -lboost_regex from unit test +a35b5d2 lttng: Don't build trace headers when lttng is disabled +861e6a3 lttng: Update packaging +7ff6ed1 lttng: Only require lttng for Fedora >= 20 and RHEL == 6 for RPM distros +fed22f4 lttng: Add distro packaging +edddb3f lttng: Fix "make distcheck" +d4186fe lttng: Support --with-lttng=check +8d71b6c lttng: Remove tracing from libcommon +660f1d6 rbd-replay: Fix bug in rbd-replay-prep, Thread::issued_io with wrong IO +18c081e rbd-replay: Remove extent tracepoints and inline extents +e555867 rbd-replay: Move tracepoints from internal.cc to librbd.cc +0cd2651 rbd-replay: Add man page and package binaries for rbd-replay-prep +0f052f8 rbd-replay: Convert prep-for-replay.py to rbd-replay-prep.cc +e18748e rbd-replay: Add man page, and add binaries to Debian packaging +f5272d5 rbd-replay: Remove outdated message that says regexes are used +63273a2 lttng: Replace Boost dependencies with custom string code +8b9f887 rbd-replay: Remove boost_regex from LIBADD and LDADD +f64776a rbd-replay: Fix compiler warning in unit tests +c78f994 rbd-replay: Switch ImageNameMap from regex to plain string matching +6f79f13 rbd-replay: Switch ImageNameMap to using rbd_loc +612e85b rbd-replay: Add rbd_replay::rbd_loc +c40ac91 rbd-replay: Use standard image@snap instead of image/snap +684643a lttng: Fix ceph_ctf_stringp +e22f59f rbd-replay: Support replaying partial traces +0d82222 rbd-replay: Use non-zero fake data +8a67647 rbd-replay: Add unit tests +c4939f9 lttng: Preload liblttng-ust-fork.so in TESTS_ENVIRONMENT +2a11a5c lttng: Disable LTTng by default, add --with-lttng configure option +c888a89 lttng: Fix 'make check' by setting up fake HOME +2eb6ea3 rbd-replay: Add --map-image option for image name mapping +2a66e09 rbd-replay: Add --pool option +5365a3e rbd-replay: Add assertions +4109879 lttng: Default to not storing buffer content +0421b69 rbd-replay: Add command-line arguments to prep-for-replay.py +1540f2f rbd-replay: Fix async writes in prep-for-replay.py +3dc8443 rbd-replay: Add --read-only flag +4c360ce rbd-replay: Fix examples/rbd-replay/replay +e7bf657 rbd-replay: Clean up prep-for-replay.py +25d3d42 rbd-replay: Hash completions across multiple mutexes to reduce contention +ffc9d05 rbd-replay: Add --latency-multiplier option to usage statement +d4697bc doc: Add usage comment to librbd::RBD::AioCompletion +2db768f rbd-replay: Fix memory leak in PendingIO +dd8ad8e rbd-replay: Check that return values are non-negative +c651bf2 rbd-replay: Support writing Actions to ostreams +eec9382 rbd-replay: Print "Still waiting for" more judiciously +f2228c0 rbd-replay: Change Worker::m_pending_ios from vector to map +8011016 rbd-replay: Printing pending IOs when worker threads waiting to die +b99f819 rbd-replay: Bugfix: ensure PendingIOs are added before they're removed +9452423f rbd-replay: Add rbd_replay subsystem +4eac518 Add assertf macro +16b7562 rbd-replay: Switch logging from cout to dout +4c4289c lttng: Add rbd-replay +f625775 lttng: Add more tracing to librbd +e9b39d9 tracing: instrument filestore +d0834bb lttng: Basic tracing of librbd +772148e lttng: Remove 'ver' from trace in code for CEPH_OSD_OP_NOTIFY +e1e157f lttng: Split up libtracepoints +00b2ec6 lttng: Prevent deletion of tracing-common.h when cleaning +012ff29 lttng: Prevent creation of incorrect .o files when generating from .tp +16cd074 lttng: Trace librados C API +10a476a examples: Add example for the librados C API +fcf4925 lttng: Add tracing-common.h +e312be6 lttng: Trace ReplicatedPG::do_osd_ops +1802bc2 lttng: Add rmw_flags to tracepoint in PG::queue_op +ae59946 lttng: Trace OpRequest +33b87f9 tracing: automake-ify tracepoint generation +915a6a6 lttng: Check for lttng/tracepoint.h when configuring +3ac99e3 lttng: add pg and osd tracepoints +7fa513e lttng: trace mutex::unlock +115cfb3 tracing: bootstrap lttng-ust with mutex events +e870fd0 (origin/wip-filejournal) os/FileJournal: For journal-aio-mode, don't use aio when closing journal. +a66a493 os/FileJournal: Only using aio then alloc the related resources. +c8e2b89 os/FileJournal: Tune the judge logic for read_header. +3ed8c68 (origin/wip-9153-jerasure-upgrade) erasure-code: do not preload the isa plugin +4c2ae69 add pom.xml so to deploy the libcephfs to maven repository. to build a jar, version=0.80-rc1-2008-gf71c889 mvn package -Dversioin=; and mvn deploy command will deploy the jar to maven central +e45f5c2 TrackedOp:_dump_op_descriptor is renamed to _dump_op_descriptor_unlocked +f680a24 TrackedOp: Removed redundant lock in OpTracker::_mark_event() +5026a89 Rebased civetweb version to master's +e665e62 Rebased and changed debug option +98b24f3 vstart.sh to enable support for simple RadosGW +57778e2 os/FileJournal: signal aio_cond even if seq is 0 +5bf472a os/FileJournal: Update the journal header when closing journal +790de97 doc/start/quick-ceph-deploy: missing {ceph-node} from mon create-initial +615d2d9 CollectionIndex: Collection name is added to the access_lock name +9b80270 erasure-code: preload the jerasure plugin +fc41273 mon: fix signed/unsigned warnings +1441ffe (origin/wip-8587) rgw: subuser creation fixes +82409ee (origin/wip-reweight-tunables) mon: make reweight-by-* sanity limits configurable +3304841 mon/OSDMonitor: respect CRUSH weights for reweight-by-pg +1ecf44e mon/OSDMonitor: reweight-by-pg for pool(s) +8b971e9 mon/OSDMonitor: adjust weights up, when possible +977f852 qa/workunits/cephtool/test.sh: test reweight-by-pg +01cb405 mon/OSDMonitor: reweight-by-pg +e6658e2 mailmap: Anand Bhat affiliation +4535cc9 mailmap: Federico Simoncelli affiliation +dbf624e Add tests for the collection hint OP: 1) Store Test 2) Idempotent Test. Signed-off-by: Guang Yang (yguang@yahoo-inc.com) +ad6a2be Implement the collection hint transaction, add a new transation type as expected number of objects. Signed-off-by: Guang Yang (yguang@yahoo-inc.com) +7d266d1 Add a new transaction OP (collection hint) to ObjectStore. Signed-off-by: Guang Yang (yguang@yahoo-inc.com) +35f323d Add a new monitor command to let user specify the expected number of objects during pool creation. +da37273 Add a new field 'expected_num_objects' to pg_pool_t which denotes the expected number of objects on this pool. +ab886c4 doc: Removed quick guide and wireshark from top-level IA. +acee2e5 doc: Move wireshark documentation to dev. +ce6e9a9 doc/release-notes: v0.84 +b016f84 (origin/wip-fs-docs) doc: add notes on using "ceph fs new" +948178a (origin/wip-mon-empty-store) ceph_mon: check for existing mon store before opening db +8336f81 (tag: v0.84) 0.84 +bda2301 qa/workunits/rbd/qemu-iotests: touch common.env +1dc1fb8 qa/workunits/hadoop: move all hadoop tests into a hadoop/ dir +3d3fcc9 qa/workunits/hadoop-wordcount: fix/use -rmr command +adaf5a6 qa/workunits/hadoop-wordcount: use -x +055be68 qa/workunits/rbd/qemu-iotests: touch common.env +4cdec2f mailmap: Owen Synge affiliation +ff893d5 mailmap: Andreas Peters name normalization +4d5d0d9 mailmap: Pavan Rallabhandi affiliation +78de7e1 mailmap: Zhiqiang Wang affiliation +725aa4e mailmap: Huamin Chen affiliation +309c98b mailmap: Xiaoxi Chen affiliation +bac88db mailmap: Luis Pabón affiliation +a06affb mailmap: Thorsten Behrens affiliation +55227aa mailmap: Shu, Xinxin affiliation +cc3b5ad mailmap: Abhishek Lekshmanan affiliation +5045c5c qa/workunits/rest/test.py: use rbd instead of data pool for size tests +3279f3e qa/workunits/rest/test.py: do snap test on our data2/3 pool +6d7a229 qa/workunits/rest/test.py: fix rd_kb -> rd_bytes +0e07f7f osd: fix theoretical use-after-free of OSDMap +904a5f1 (origin/wip-misplaced) vstart.sh: make filestore fd cache size smaller +932e478 mon: track stuck undersized +190dc2f mon: track pgs that get stuck degraded +5168907 osd: track last_fullsized in pg_stat_t +dbc3f65 osd: track last_undegraded pg stat +1907066 osd/osd_types: add last_undegraded, last_undersized to pg_stat_t +6d6767d osd/PG: track PG_STATE_UNDERSIZED separately from DEGRADED +b037e47 osd: add PG_STATE_UNDERSIZED +6c0a213 osd/PG: account for misplaces separately than degraded +988d741 librados: approximate legacy 'degraded' value +d734d7f mon: warn about misplaced objects, just like degraded +a314999 osd: num_objects_misplaced +14614e0 qa/workunits/rest/test.py: fix 'df' test to use total_used_bytes +93c5b25 Revert "os/FileJournal: Update the journal header when closing journal" +29e93f7 (origin/wip-9144) os/FileStore: rename start_sync() -> do_force_sync() +dd11042 os/FileStore: fix mount/remount force_sync race +0395914 mailmap: Loic Dachary affiliation +c83c90c (origin/wip-8621) rgw: update civetweb submodule +0d6d1aa (origin/wip-init-ceph) init-ceph: don't use bashism +7df67a5 Fix -Wno-format and -Werror=format-security options clash +ae0b9f1 (origin/wip-osd-mon-feature) osd: fix feature requirement for mons +0db3e51 (origin/wip-9119) ReplicatedPG::maybe_handle_cache: do not forward RWORDERED reads +5040413 ReplicatedPG::cancel_copy: clear cop->obc +2f0e295 unittest_osdmap: test EC rule and pool features +0b27610 Remove Old Wireshark Dissectors +16dadb8 osd: only require crush features for rules that are actually used +1d95486 crush: add is_v[23]_rule(ruleid) methods +b22d693 lttng: Add distro packaging +6891f4e lttng: Fix "make distcheck" +c54f1e4 (origin/wip-9053) mon/Paxos: share state and verify contiguity early in collect phase +3e5ce5f mon/Paxos: verify all new peons are still contiguous at end of round +5c2d232 (origin/wip-9025-chunk-remapping) erasure-code: remap chunks if not sequential +164cfe8 erasure-code: parse function for the mapping parameter +298da45 erasure-code: ErasureCodeInterface::get_chunk_mapping() +240764f rgw: update civetweb submodule +0e74b7a rgw: don't allow negative / invalid content length +1293e6b rgw: log civetweb messages +ffac52b rgw: disable civetweb url decoding +b24db81 FileStore: Introduced a RLock instead of WLock +3e7848d FileStore: No need to hold Index lock during omap calls +cfff9f6 FileStore: FDCache lookup is rearranged +78d70da FileStore: Index caching is introduced for performance improvement +b04d84d shared_cache: pass key (K) by const ref in interface methods +95ac43f FileStore: remove the fdcache_lock +a9f76d4 FDCache: implement a basic sharding of the FDCache +4c2828e shared_cache: expose prior existence when inserting an element +a1e79db (origin/wip-9039) rgw_admin: add --min-rewrite-stripe-size for object rewrite +46d8c97 doc: Add documentation about Wireshark dissector. +6a55543 rgw: fix compilation +f6771f2 shared_cache: use a single lookup for lookup() too +cec40da (origin/historic/old-wireshark-dissectors) qa/workunits/cephtool: verify setmaxosd doesn't let you clobber osds +a1c3afb OSDMonitor: Do not allow OSD removal using setmaxosd +16a4360 rgw: pass set_mtime to copy_obj_data() +800eff2 rgw: copy_obj_data() uses atomic processor +5d3a7e5 rgw: copy object data if target bucket is in a different pool +aec684b (origin/wip-9005) add calamari to the api/index section +ac70490 doc: update kernel recommendations (avoid 3.15!) +5374386 doc: Added user management link to quick start. +5e8eae7 doc: Removed cephx intro. Moved details to user management, config, and architecture. +3aa3e96 doc: Removed cephx guide. Replaced by user management. +aac6aa2 doc: Removed auth intro and auth docs and added user management to index. +4c651b7 doc: Restructured auth configuration reference. +3faf37a doc: Put architectural details of authentication in to architecture doc. +118ae72 doc: Created a new User Management doc to replace authentication. +0a49db8 (origin/wip-9062) msg/PipeConnection: make methods behave on 'anon' connection +8512904 lttng: Support --with-lttng=check +bb046ed mon/Paxos: put source mon id in a temp variable +d74d3f1 (origin/wip-8725) mds/MDSMap: fix incompat version for encoding +369c639 mds/MDSMap: drop trailing else in favor of early return +b2c1fa8 (origin/wip-9087) test/system/systest_runnable.cc: debugging on start and end +d74ed9d (origin/wip-9102) ceph-disk: linter cleanup +3efa30d lttng: Remove tracing from libcommon +520b75b rbd-replay: Fix bug in rbd-replay-prep, Thread::issued_io with wrong IO +89c3860 rbd-replay: Remove extent tracepoints and inline extents +b5bc14a rbd-replay: Move tracepoints from internal.cc to librbd.cc +febcce9 rbd-replay: Add man page and package binaries for rbd-replay-prep +c629241 rbd-replay: Convert prep-for-replay.py to rbd-replay-prep.cc +dca21ee rbd-replay: Add man page, and add binaries to Debian packaging +95e3b0b rbd-replay: Remove outdated message that says regexes are used +de9327c lttng: Replace Boost dependencies with custom string code +86d0b57 rbd-replay: Remove boost_regex from LIBADD and LDADD +a602bd4 rbd-replay: Fix compiler warning in unit tests +6be0c2b rbd-replay: Switch ImageNameMap from regex to plain string matching +77cf034 rbd-replay: Switch ImageNameMap to using rbd_loc +429a089 rbd-replay: Add rbd_replay::rbd_loc +0b68f01 rbd-replay: Use standard image@snap instead of image/snap +11f55de lttng: Fix ceph_ctf_stringp +ee4d217 rbd-replay: Support replaying partial traces +d66ee7a rbd-replay: Use non-zero fake data +b915161 rbd-replay: Add unit tests +ecd20a3 lttng: Preload liblttng-ust-fork.so in TESTS_ENVIRONMENT +c938829 lttng: Disable LTTng by default, add --with-lttng configure option +ae4e02a lttng: Fix 'make check' by setting up fake HOME +ff2b9f5 rbd-replay: Add --map-image option for image name mapping +c83856c rbd-replay: Add --pool option +0274376 rbd-replay: Add assertions +3a20acb lttng: Default to not storing buffer content +bbdd0da rbd-replay: Add command-line arguments to prep-for-replay.py +b11ab2e rbd-replay: Fix async writes in prep-for-replay.py +11186af rbd-replay: Add --read-only flag +9a31808 rbd-replay: Fix examples/rbd-replay/replay +4f6e775 rbd-replay: Clean up prep-for-replay.py +b58797e rbd-replay: Hash completions across multiple mutexes to reduce contention +d4e07f0 rbd-replay: Add --latency-multiplier option to usage statement +0a629a9 doc: Add usage comment to librbd::RBD::AioCompletion +a7da7e0 rbd-replay: Fix memory leak in PendingIO +a06e347 rbd-replay: Check that return values are non-negative +e06e979 rbd-replay: Support writing Actions to ostreams +0129841 rbd-replay: Print "Still waiting for" more judiciously +c4ba997 rbd-replay: Change Worker::m_pending_ios from vector to map +84edf37 rbd-replay: Printing pending IOs when worker threads waiting to die +d8a86bf rbd-replay: Bugfix: ensure PendingIOs are added before they're removed +9ec70b9 rbd-replay: Add rbd_replay subsystem +6d987ce Add assertf macro +fc71284 rbd-replay: Switch logging from cout to dout +b73af7c lttng: Add rbd-replay +cffb8f3 lttng: Add more tracing to librbd +ef5c30a tracing: instrument filestore +4001b28 lttng: Basic tracing of librbd +289c98d lttng: Remove 'ver' from trace in code for CEPH_OSD_OP_NOTIFY +8e238b5 lttng: Split up libtracepoints +50020b0 lttng: Prevent deletion of tracing-common.h when cleaning +be3c913 lttng: Prevent creation of incorrect .o files when generating from .tp +c4f29af lttng: Trace librados C API +1dcf847 examples: Add example for the librados C API +3e21f8e lttng: Add tracing-common.h +fb45d60 lttng: Trace ReplicatedPG::do_osd_ops +469c937 lttng: Add rmw_flags to tracepoint in PG::queue_op +d5b16e4 lttng: Trace OpRequest +2f2d6e1 tracing: automake-ify tracepoint generation +64fbc28 lttng: Check for lttng/tracepoint.h when configuring +8a28388 lttng: add pg and osd tracepoints +090f63e lttng: trace mutex::unlock +7a9eb3f tracing: bootstrap lttng-ust with mutex events +239401d mon: fix divide by zero when pg_num adjusted and no osds +c5687b1 mon: fix potential divide by zero on can_mark_{down,out} +f81d2b0 mon: fix divide by zero when pg_num adjusted and no osds +8a647f7 mon: fix potential divide by zero on can_mark_{down,out} +5ed9f4e (origin/wip-9029) mds: Revert from mds_mksnap_ setting to mds_snap_ settings +6f7798e (origin/wip-ceph-disk) ceph-disk: warn about falling back to sgdisk (once) +b1651af ceph-disk: only fall back to sgdisk for 'list' if blkid seems old +b75e8a3 ceph-disk: add get_partition_base() helper +c7a1ceb ceph-disk: display information about dmcrypted data and journal volumes +5be56ff osd/ReplicatedPG: only do agent mode calculations for positive values +7b3714c (origin/wip-9096) osd: fix some line wrapping +df945a9 osd: fix require_same_peer_instance from fast_dispatch +3d7e2b3 osd: inline require_osd_up_peer +e86fdef rgw: move generic server usage after all options +b09b856 mon/Paxos: add perfcounters for most paxos operations +f80ed26 ceph-disk: move fs mount probe into a helper +6c77f5f ceph-disk: use partition type UUIDs, and blkid +ea90d9f Revert "ReplicatedPG: do not pass cop into C_Copyfrom" +300b5e8 ReplicatedPG: do not pass cop into C_Copyfrom +24aeca9 (origin/wip-9064) ReplicatedPG::maybe_handle_cache: do not skip promote for write_ordered +984f614 erasure-code: isa plugin must link with ErasureCode.cc +1088d6c ceph-disk: fix log syntax error +41e4461 doc/changelog: v0.67.10 notes +44ed188 init-ceph: conditionally update after argparsing +350b512 doc/release-notes: v0.67.10 +7998c32 rgw: call throttle_data() even if renew_state() failed +057c680 common/LogClient: fix sending dup log items +71e827f utime: Because class Clock didn't exist,so remove the declaration in class utime_t. +78dc4df doc: Replace [default] with [global]. +e5324ed doc: Added yum-priorities procedure to manual install. +a01252a doc: Added priority = 2 to packages. +3dfa72d (origin/wip-8912) librbd: fix error path cleanup for opening an image +2edf01f Revert "Fix for bug #6700" +d6e6ba1 ceph-disk: fix verify_no_in_use check +0a2b4c2 rgw: Don't send error body when it's a HEAD request +b0f5ba9 (origin/wip-rados-df-json) rados: remove {read,write}_kb fields from rados df json output +5663f91 rados: fix {read,write}_bytes value +8180713 (origin/wip-9057) msg/Pipe: do not wait for self in Pipe::stop_and_wait() +fd421b2 mon/MonitorDBStore: add get_{keys,bytes}() accounting to Transaction +d7fb7bf (origin/wip-9055) ceph_test_rados_api_tier: fix cache cleanup (ec too) +ebbe8aa ceph_test_rados_api: fix cleanup of cache pool +1d199fb librados/TestCase: inheret cleanup_default_namespace +5808d6a (origin/wip-9044-use-ruleset) osd: improve ruleno/ruleset consistency +3f5d86a erasure-code: ErasureCodeIsa::create_ruleset must return a ruleset +0029a35 erasure-code: ErasureCodeJerasure::create_ruleset must return a ruleset +04a484a erasure-code: OSDMonitor::crush_ruleset_create_erasure needs ruleset +4e8de17 os/FileStore: dump open fds before asserting +281159b doc: Initial network docs. +4f6d513 os/chain_xattr: Remove all old xattr entry when overwrite the xattr. +84c9654 OSD: add require_same_peer_inst(OpRequestRef&,OSDMap&) helper +4a0c941 OSD: introduce require_self_aliveness(OpRequestRef&,epoch_t) function +48c9b38 OSD: use OpRequestRef& for a few require_* functions +f86bf1d OSD: introduce require_up_osd_peer() function for gating replica ops +ee790e3 (origin/wip-problem-osds) osd/osd_types: s/int/int32_t/ in pg_stat_t +d862731 osd/PG: bound number of blocked_by OSDs we report per PG +bee79ec qa/workunits/cephtool: add trivial 'ceph osd blocked-by' test +6380f47 qa/workunits/cephtool: add simple 'ceph osd perf' test +c511046 mon: add 'osd blocked-by' command +d55e973 mon/PGMap: track histogram of pg blocked_by +47a9af3 osd/PG: set blocked_by in GetMissing +6fcdbd2 osd/PG: set blocked_by in Incomplete state +ceaca9f osd/PG: set blocked_by during peering GetLog +6e96c2d osd/PG: set blocked_by during peering GetInfo +e4b0071 RadosClient: Enable pool existence check +c34f935 (origin/wip-fsx-flatten) test_librbd_fsx: also flatten as part of randomize_parent_overlap +214630b mds: Also check min/max uid on snap removal +a52a855 (origin/wip-pg-epoch) osd: fix pg epoch floor tracking +2120f4b OSD: move waiting_for_pg into the session structures +71cb4d3 doc: Removed Debian reference from Upstart. +8357cae doc: Incorporated user feedback to clarify upgrade doc. +b6bf33c doc: Added configuration discussion at end of gateway install with links to config. +11cefca OSD::shutdown: actually drop sessions waiting on map +6aba942 OSD: clear_session_waiting_on_map in ms_handle_reset +11d6e5a OSD: rename session_waiting_for_map_lock to session_waiting_lock +20fd714 OSD: wake_pg_waiters outside of the pgmap write_lock, pg_lock +6e7b86a OSD: fix wake_pg_waiters revert error in _open_lock_pg +4260767 (origin/wip-8625) osd_types: s/stashed/rollback_info_completed and set on create +d0ccb1c make ceph-disk use the new init flag for cluster +23b4915 allow passing a --cluster flag to the init script +6bd2b0f mds: Make min/max UID configurable for who is allowed to create a snapshot +a5ecf15 powerdns: Update README with better markdown +bf9726a (origin/xiaoxichen-fix_crush_ruleset) mon/OSDMonitor : Use user provided ruleset for replicated pool +f1aad8b RadosClient: Fixing potential lock leaks. +26750fc (origin/wip-filestore-bigxattr) os/FileStore: force any new xattr into omap on E2BIG +cc3112e (origin/wip-rados-xattr) rados: use STD{IN,OUT}_FILENO for magic values +e3819b6 qa/workunits/rados/test_rados_tool: add a few xattr tests +645c28a rados: optionally read setxattr value from stdin +59a715a rados: don't add \n to getxattr +e5b67f7 Update doc +789284c mon/PGMap: s/osdid/osd/ in 'osd perf' plaintext heading +1b8a9ec mon/OSDMonitor: clean up 'osd perf' command placement +940e42d osd/PG: populate pg_stats_t blocked_by +ea731ae qa/workunits/cephtool/test.sh: fix 'ceph df ...' tests +bdf5f30 use cluster name when checking the host +3fb25c2 use name in /var/lib/ceph paths +9e08e3a when starting an OSD, pass in the cluster name +0bd7c34 PendingReleaseNotes: make note about rbd cache default change +c0ef8b8 rocksdb: fix i386 build +7a9b986 rados: add {read,write}_ops to df json +ee2dbdb mon/PGMonitor: remove {rd,wr}_kb from pool stat dumps +4c8e322 mon: remove *_kb perf counters +3179bb1 mon/PGMonitor: add _bytes perf counters +adb2791 mon/PGMonitor: add _bytes fields for all usage dumps +895318c README.md: word wrap +500b95e README: symlink from README.md +0114b33 (origin/wip-8496-erasure-code-base-class) erasure-code: rework ErasureCode*::parse methods +77690f6 erasure-code: move to ErasureCode::decode_concat +54394fa erasure-code: move to ErasureCode::to_{int,bool} +b4b7c51 erasure-code: move to ErasureCode::minimum_to_decode* +4ff981f erasure-code: move to ErasureCode::{encode,decode}{,chunk} +1ebce98 erasure-code: ErasureCode base class +859944d (origin/wip-test-ceph-disk) test/osd/osd-test-helpers: mkdir -p for ceph-disk +4b45e25 Add handles for the ceph-mon starting with upstart +c2f58e6 test/ceph-disk.sh: mkdir -p +a923e2c Renamed README to README.md to render in markdown +52cf693 Developer quick start guide +c09036a enable info_log_level config option for rocksdb +66de51d (origin/wip-8875) be a bit more explicit about 'ceph-deploy new' in quickstart +b4c80e3 Do not make directories by mistake. +f773b24 powerdns: Define a application variable when not invoked from Shell +1682e62 doc: typo s/loose/lose +466aba4 osd/osd_types: add blocked_by to pg_stat_t +b9b022e add annotation for rocksdb config option +8dcfbd8 (origin/wip-8998) osd: simplify dout_prefix macros +80829d7 osd: reorder OSDService methods under proper dout_prefix macro +047c18d doc/release-notes: make note about init-radosgw change +354c411 doc: Added 'x' to monitor cap. +7b2c8b3 cls_rgw: fix object name of objects removed on object creation +8519e9a rgw: need to pass need_to_wait for throttle_data() +0620624 rgw: call processor->handle_data() again if needed +516101a EC-ISA: provide a 10% faster simple parity operation for (k, m=1). Add simple parity unit test for k=4,m=1 +985b7c2 osd/ECBackend: clean up assert(r==0) in continue_recovery_op. +8363a94 erasure-code: HTML display of benchmark results +3cc7234 COPYING: Cloudwatt copyright is inline +e11c3fc erasure-code: rework benchmark suite +90592e9 erasure-code: properly indent ErasureCodePluginSelectJerasure.cc +be3e1e4 erasure-code: control jerasure plugin variant selection +5fb4354 erasure-code: reduce jerasure verbosity +c7daaaf (origin/wip-8475) erasure-code: implement alignment on chunk sizes +3987ac2 erasure-code: cauchy techniques allow w 8,16,32 +cb54605 mailmap: sort entries +accf8c2 mailmap: Tommi Virtanen is not with Red Hat +f870b34 mailmap: João Eduardo Luís name normalization +ef620cc mailmap: Sebastien Ponce name normalization +2f21a11 mailmap: Brian Rak affiliation +b1ba72f mailmap: George Ryall affiliation +6f24a04 mailmap: Stephen Jahl affiliation +6f238fa mailmap: Adam Crume affiliation +6652494 mailmap: Accela Zhao affiliation +794f70a mailmap: Kevin Cox affiliation +d8e6415 mailmap: Ma Jianpeng affiliation +3230060 (origin/wip-ceph-conf) ceph-conf: flush log on exit +076f33a ECBackend: Don't directly use get_recovery_chunk_size() in RecoveryOp::WRITING state. +98997f3 (origin/wip-8891) msg/SimpleMessenger: drop msgr lock when joining a Pipe +e36babc os/MemStore: fix lock leak +e93818d (origin/wip-rgw-need-to-wait) rgw: need to pass need_to_wait for throttle_data() +3de7b7c doc/release-notes: fix syntax error +c95e91e os/KeyValueStore: clean up operator<< for KVSuperBlock +1417ede ceph_test_rados_api_tier: test promote-on-second-read behavior +0ed3adc osd: promotion on 2nd read for cache tiering +13b9dc7 osd: add local_mtime to struct object_info_t +57fd60c rocksdb: -Wno-portability +c574e65 autogen.sh: debug with -x +213e0ac debian, rpm: build rocksdb statically if we can +a497a3b debian, rpm: build require bzip2 dev +da5edb8 add rocksdb bz2 dep +8fcbb65 configure: enable static rocksdb if check and c++11 +7500b89 Makefile: include rocksdb in dist tarball always +5502dd3 configure: verify c++11 is present for rocksdb +3329352 rocksdb: require less shiny autoconf +bcebf9c do_autogen.sh: build with static librocksdb +eb1cd78 rocksdb: update submodule makefile +2e549b4 (origin/wip-ec-isa) unittest_erasure_code_[plugin_]isa: conditionally compile +04037ef (origin/wip-osd-leaks) osd: do not leak Session* ref in _send_boot() +d00f23b erasure-code/isa: fix signed/unsigned comparison +8a193ab erasure-code/isa: don't use typename outside of template +92d0bbe ECBackend: Using ROUND_UP_TO to refactor function get_recovery_chunk_size() +e4ed2cb ReplicatedPG: For async-read, set the real result after completing read. +6e52efa doc/release-notes: tweak quoting +8091173 (origin/wip-round) use llrintl when converting double to micro +d8b291f configure: check for 'better' yasm that can build ISA-L +1520b47 erasure-code/isa/Makefile: add missing \, and missing headers +e1f32d9 yasm-wrapper: fix -f ... +1670fd6 yasm-wrapper: turn -I foo into -i foo +6d95797 yasm-wrapper: echo original args +b7d0017 EC: add plugin for Intel ISA-L library +383536a (origin/wip-8982) mon/OSDMonitor: warn when cache pools do not have hit_sets configured +caf554b osd/ReplicatedPG: improve agent_choose_mode args +ce4e559 vstart.sh: limit open files +ea4996d osd/ReplicatedPG: evict blindly if there is no hit_set +5d1c76f osd/ReplicatedPG: check agent_mode if agent is enabled but hit_sets aren't +51c1f2a FileStore: Add omap_backend to "<<" operator +7faed14 Add superblock to KeyValueStore +b879e74 KeyValueStore: use generic KeyValueDB::create() +9df9d28 (origin/wip-8969) mon/OSDMonitor: fix i386 floating point rounding error +aa9ae1f (origin/wip-8944) qa/workunits/cephtool/test_daemon.sh: verify ceph -c works with daemon +22d20f3 qa/workunits/cephtool/test_daemon.sh: typo +97a8d5a qa/workunits/cephtool/test_daemon.sh: allow local ceph command +9686312 atomic: fix read() on i386, clean up types +6d89a99 ceph.in: Pass global args to ceph-conf for proper lookup +0190df5 (origin/wip-8714) osd: prevent old clients from using tiered pools +605064d (origin/wip-cli-integration) test/cli-integration/rbd: fix trailing space +d700076 (origin/wip-double-pc) mon: s/%%/%/ +0f8929a (origin/wip-8972) cls_rgw: fix object name of objects removed on object creation +061c8e9 (origin/wip-rbd-flush) librbd: enable rbd cache by default; writethrough until flush +4e1405e (origin/wip-erasure-code-profile-default) erasure-code: create default profile if necessary +5f65b4d os/FileJournal: When dump journal, using correctly seq avoid misjudging joural corrupt. +7b169a0 rocksdb backend optimization +708b5b8 add --with-librocksdb-static configure options +101954c get a stable rocksdb (3.0) +6eea02c add rocksdb submodule +cbd0043 add rocksdb support +5d5902a (origin/wip-filestore-omap) os/KeyValueStore: rename osd_keyvaluedb -> keyvaluestore_backend +1a5dea7 os/FileStore: use generic KeyValueDB::create(); store omap_backend in superblock +a2a3619 mon/MonitorDBStore: use generic KeyValueDB::create() +86a0b9d os/KeyValueDB: make compaction interface generic +4bf929e os/KeyValueDB: generic create(), test_init() +e141872 config: allow unsafe setting of config values +2f9fe02 mailmap: Red Hat names normalization +3cfda57 doc/release-notes: v0.83 +18ea2a8 (origin/wip-8586) rgw: fix crash in swift CORS preflight request +6bb3aea mds: remove some rogue "using namespace std;" +c283ad4 mds: handle replaying old format journals +07665ec mds: introduce explicit DaemonState instead of int +6b004f1 mds: refactor MDS boot +6832ec0 mds: make MDS::replay_done clearer +e587088 mds: remove unused purge_prealloc_ino +6be8087 mds: separate inode recovery queue from MDCache +0d70989 python-ceph: require libcephfs. +78ff1f0 (tag: v0.83) 0.83 +06c4736 Remove reference from mkcephfs. +4045b2e doc/release-notes: typo +df1bad8 doc/release-notes: v0.80.5 release notes +e99acf9 (origin/wip-8880) OSD: add require_same_peer_inst(OpRequestRef&,OSDMap&) helper +e179e92 OSD: introduce require_self_aliveness(OpRequestRef&,epoch_t) function +f36cffc unittest_crush_wrapper: fix build +eb2f1ea OSD: use OpRequestRef& for a few require_* functions +1526546 Remove reference from mkcephfs. +9b03752 Fix some style and checking issue +5773a37 (origin/wip-upstart-nfile) upstart/ceph-osd.conf: bump nofile limit up by 10x +d3e5961 (origin/wip-undump) tools/cephfs: fuller header in dump/undump +e183a4d (origin/wip-fsx-overlap) test_librbd_fsx: clone/flatten probabilities +bb095ff test_librbd_fsx: randomize_parent_overlap +f6d1a92 test_librbd_fsx: introduce rbd_image_has_parent() +eb697dd librbd: make rbd_get_parent_info() accept NULL out params +04d0526 PGMonitor: fix bug in caculating pool avail space +b08470f (origin/wip-libs) configure.ac: link libboost_thread only with json-spirit +9d23cc6 configure: don't link blkid, udev to everything +de9cfca (origin/wip-flush-set) Only write bufferhead when it's dirty +1c26266 ObjectCacher: fix bh_{add,remove} dirty_or_tx_bh accounting +727ac1d ObjectCacher: fix dirty_or_tx_bh logic in bh_set_state() +5283cfe Wait tx state buffer in flush_set +d858fdc Add rbdcache max dirty object option +b8a5668 Reduce ObjectCacher flush overhead +288908b Revert "Merge pull request #2129 from ceph/wip-librbd-oc" +0553890 (origin/wip-8937) rgw: call processor->handle_data() again if needed +d3de69f mds: fix journal reformat failure in standbyreplay +8fb761b (origin/wip-8931) osd/ReplicatedPG: requeue cache full waiters if no longer writeback +36aaab9 osd/ReplicatedPG: fix cache full -> not full requeueing when !active +ba9d52e (origin/wip-librbd-snap-meta) librbd: store and retrieve snapshot metadata based on id +c5f766b (origin/wip-8932) ceph_test_rados_api_tier: do fewer writes in HitSetWrite +f360920 common/RefCountedObject: fix use-after-free in debug print +14cad5e (origin/wip-rgw-align) rgw: object write should not exceed part size +fc83e19 rgw: align object chunk size with pool alignment +1f9c732 doc: Add additional hyperlink to Cache Tiering defaults. +4047660 doc: Update doc from user feedback. +d1dfb9b osd: fix bad Message* defer in C_SendMap and send_map_on_destruct +5740266 test: catch a straggler still using 'data' pool +4eb18dd (origin/wip-journal-header) os/FileJournal: Update the journal header when closing journal +63c1711 msg/SimpleMessenger: drop local_conneciton priv link on shutdwon +2545e80 librbd: fix crash using clone of flattened image +4fe0792 doc: Updated mon doc per feedback. Fixed hyperlinks. +c511822 doc: update radosgw man page with available opts +e259aca rgw: list all available options during help() +99e80a5 rgw: format help options to align with the rest +95aaeb6 osd: use Connection::send_message() +be91daf common/LogClient: use con-based send_message +694ced9 client: use con-based send_message +2c28548 msgr: remove Messenger::mark_disposable() +8b49b3a mds: use Connection::mark_disposable() +2970396 msgr: add Connection::mark_disposable() +3ca533e msgr: kill mark_down_on_empty() +637ada2 msgr: kill addr-based send_keepalive() +322908b msg: drop Messenger::mark_down() and send_keepalive() con-based calls +f048102 osdc/Objecter: use Connection::mark_down() +841d5ac osd: use Connection::mark_down() +774481b mon/MonClient: use Connection::send_keepalive() +c42922a mon/MonClient: use Connection::mark_down() +92c46a7 mon: use Connection::mark_down() +54eca56 mds: use Connection::mark_down() +d60e8a2 client: use Connection::mark_down() +f0fef07 mon: use send_message instead of lazy_send_message +e184ef8 msgr: remove Messsenger::send_message(..., Connection*) +2bb9ab2 osdc/Objecter: use Connection::send_message() +05bf6cf mds: use Connection::send_message() +aeee097 client: use Connection::send_message() +f413bc8 mon: use Connection::send_message() +3d57e39 osd: use Connection::send_message +531073f msgr: add convenience Connection methods +afb4c37 msg: factor policy handling out of SimpleMessenger +6597c20 mon: clean up ref counting for forwarded messages' sessions +29e04c8 msgr: move PipeConnection out of Connection.h; make anon +ea14d7b Refactor Messenger class family. +63abf11 (origin/wip-8882) osd/ReplicatedPG: observe INCOMPLETE_CLONES in is_present_clone() +4136471 osd/ReplicatedPG: observed INCOMPLETE_CLONES when doing clone subsets +956f287 osd/ReplicatedPG: do not complain about missing clones when INCOMPLETE_CLONES is set +54bf055 osd/osd_types: add pg_pool_t FLAG_COMPLETE_CLONES +67d13d7 mon/OSDMonitor: improve no-op cache_mode set check +d4faf74 (origin/wip-8701) ceph_test_objectstore: clean up on finish of MoveRename +3ec9a42 os/LFNIndex: use FDCloser for fsync_dir +6fb3260 os/LFNIndex: only consider alt xattr if nlink > 1 +ec36f0a os/LFNIndex: remove alt xattr after unlink +a320c26 os/LFNIndex: FDCloser helper +b2cdfce os/LFNIndex: handle long object names with multiple links (i.e., rename) +cf98805 ceph_test_objectstore: fix warning +6aa48a4 store_test: add long name collection_move_rename tests +c0cb56f ceph.spec.in: add bash completion file for radosgw-admin +1ad4cd3 ceph.spec.in: rhel7-related changes: +c57811f Fix/add missing dependencies: +793e05a ceph.spec.in: whitespace fixes +dae6ecb ceph.spec.in: split out ceph-common as in Debian +a05a0da common/random_cache: fix typo +5efdc62 common/RandomCache: Fix inconsistence between contents and count +356af4b (origin/wip-8889) osd/ReplicatedPG: debug obc locks +6fe2782 osd/ReplicatedPG: greedily take write_lock for copyfrom finish, snapdir +0962650 osd: allow greedy get_write() for ObjectContext locks +ccd0eec OSD: introduce require_up_osd_peer() function for gating replica ops +253ca2b (origin/wip-8897) os: make name/attr max methods unsigned +daac750 os/KeyValueStore: make get_max_object_name_length() sane +e311a08 uncomment cleanup command +c264774 init: add systemd service files +d87e5b9 powerdns: RADOS Gateway backend for bucket directioning +b551ae2 (origin/wip-8851) mon: AuthMonitor: always encode full regardless of keyserver having keys +1518fa2 osd: init local_connection for fast_dispatch in _send_boot() +34b0efd (origin/wip-librbd-oc) ObjectCacher: fix bh_{add,remove} dirty_or_tx_bh accounting +8a05f1b ObjectCacher: fix dirty_or_tx_bh logic in bh_set_state() +d358741 Wait tx state buffer in flush_set +3c7229a Add rbdcache max dirty object option +5cb4b00 Reduce ObjectCacher flush overhead +9061988 osd: init local_connection for fast_dispatch in _send_boot() +b6f3aff Fix mismatched tags (struct vs. class) inconsistency +2aa3edc (origin/wip-8174) os/FileStore: fix max object name limit +f4bffec ceph_test_objectstore: test memstore +6f312b0 os/MemStore: copy attrs on clone +8dd6b8f os/MemStore: fix wrlock ordering checks +a2594a5 osd/MemStore: handle collection_move_rename within the same collection +3467110 (origin/wip-dencoder) ceph-dencoder: don't link librgw.la (and rados, etc.) +b1a641f rgw: move a bunch of stuff into rgw_dencoder +1c17077 libosd_types, libos_types, libmon_types +58cc894 Revert "ceph.spec: move ceph-dencoder to ceph from ceph-common" +f181f78 Revert "debian: move ceph-dencoder to ceph from ceph-common" +ad4a4e1 unittest_osdmap: revert a few broken changes +d7209c1 (origin/wip-8858) rgw: dump prefix unconditionally +dc417e4 rgw: list extra objects to set truncation flag correctly +82d2d61 rgw: account common prefixes for MaxKeys in bucket listing +924686f rgw: add NextMarker param for bucket listing +4a63396 rgw: fix decoding + characters in URL +09a5974 crushtool: Send output to stdout instead of stderr +e6cf618 rgw: improve delmited listing of bucket +49fc68c utf8: export encode_utf8() and decode_utf8() +bd3367e osd: add config for osd_max_attr_name_len = 100 +7c0b2a0 os: add ObjectStore::get_max_attr_name_length() +7e0aca1 osd: add config for osd_max_object_name_len = 2048 (was hard-coded at 4096) +e60dd0f (origin/wip-8811) osdc: refactor JOURNAL_FORMAT_* constants to enum +8eef89e doc: fix example s/inspect/journal inspect/ +5438500 mds: fix journal reformat failure in standbyreplay +ed3bc4c osdc/Journaler: validate header on load and save +18ca6b6 test: add a missing semicolon +0cd0268 (origin/wip-vstart-existing-mds) qa: generalise cephtool for vstart+MDS +bb5a574 mon: carry last_failure_osd_epoch across `fs new` +b936a27 mon/MDSMonitor: fix msg on idempotent `fs rm` +06a8f7b configure: do not link leveldb with everything +0193d3a AUTHORS +14a9ca6 (origin/wip-logrotate) logrotate.conf: fix osd log rotation under upstart +7b342ef doc: Add Note about European mirror in Quick Start +0f11aae (origin/wip-8849) remove suse service restarts +e3a5756 remove ceph restarts on upgrades for RPMs +4d6899c qa/workunits/cephtool/test.sh: fix erasure_code_profile get test +ce9f12d qa/workunits/cephtool/test.sh: test osd pool get erasure_code_profile +e8ebcb7 mon: OSDMonitor: add "osd pool get erasure_code_profile" command +5ccfd37 vstart.sh: default to 3 osds +5f6b11a (origin/wip-8857) mon/MDSMonitor: make legacy 'newfs' command idempotent +b89ab5f rgw: don't try to wait for pending if list is empty +19e68ac (origin/wip-rbd-defaults) rbd: respect rbd_default_* parameters +e891a93 rbd: remove accidental repeated option +0f87c55 librbd: use order-agnostic default stripe parameters +f9f2417 (origin/wip-8846) rgw: don't try to wait for pending if list is empty +420f0a4 (origin/wip-8813) set the default log level to WARNING +3e0d980 init-ceph: wrap daemon startup with systemd-run when running under systemd +99dfaf7 doc/release-notes: v0.80.4 +80ea606 Fix size of network protocol intergers. +2f43cef doc: Extended discussion for building docs on CentOS / RHEL. +124f97f doc: Added a script to build docs on CentOS / RHEL. +6c48d07 (origin/wip-set_layout) doc: add cephfs layout documentation +af740ec cephfs: pool safety & print deprecation warning +d915ceb update hadoop-wordcount test to be able to run on hadoop 2.x. The hadoop and mapreduce library are no longer hard coded so they can be specified to point to the right path. The relative paths hdfs are changed to absolute paths. A sample command to run the test on hadoop 2.x is TESTDIR=/home/test HADOOP_HOME=/usr/lib/hadoop HADOOP_MR_HOME=/usr/lib/hadoop-mapreduce sh workunits/hadoop-wordcount/test.sh starting hadoop-wordcount test +cceab2b qa: retire kclient-specific layout test +95f5a44 ceph.spec: move ceph-dencoder to ceph from ceph-common +b37e3bd debian: move ceph-dencoder to ceph from ceph-common +01cd3cd (origin/wip-8830) XfsFileStoreBackend: default to disabling extsize on xfs +fc597e5 doc/release-notes: some additional warnings and recommendations against adjusting tunables +e17e9d8 (origin/wip-8823) ceph_test_rados_api_tier: fix [EC] HitSet{Read,Write,Trim} tests +a4ed336 (origin/wip-mds-session-asok-squash) mds: add `session ls` and `session evict` to asok +0e0be07 client: include ID in mds_sessions asok +52a2bc5 mon: remove unused attribute notified_global_id +b120a48 common/admin_socket: remove dead code +bb47ff3 osd: fix confusing debug output for op_applied +586d3ee doc: Fixes a broken link on the rados deploy osd page. +447f849 doc/release-notes: v0.80.3 +29f20b7 (origin/wip-test-post-file) qa/workunits/post-file.sh +c9e1e82 rbdmap: per-device post-map/pre-unmap hooks +c93da05 (origin/wip-8815) osd/osd_types: be pedantic about encoding last_force_op_resend without feature bit +712d5d1 osd/osd_types: remove useless encode_compat local var for pg_pool_t::encode +50e93c2 (origin/wip-8696) qa/workunits: cephtool: adjust pool name where missing as it has changed +cf94cf3 (origin/wip-dump-new-crush) crush: include CRUSH_V3, v2/v3 rules checks in dump_tunables() +daadff4 doc: minor format fix for radosgw admin docs +b844ec9 rbdmap: per-device mount (Closes: #8538) +02683ac rbd.cc: Check io-size avoid floating point exception. +6cd3457 qa/workunits: cephtool: cleanup after pool creation +704b0a3 qa/workunits: cephtool: pool needs to be a tier to be used as such +49db676 qa/workunits: cephtool: test erroneous 'tier remove' +9fea033 qa/workunits: cephtool: test get/set on both tier and non-tier pools +df59449 qa/workunits: cephtool: split get/set on tier pools from get/set tests +8e5a8da mon: OSDMonitor: be scary about inconsistent pool tier ids +64bdf6c osd: pg_pool_t: clear tunables on clear_tier() +f131dfb mon: OSDMonitor: limit tier-specific pool set/get on non-tier pools +026b127 doc/changelog/v0.80.2: include tag +59c00e5 (origin/wip-kinetic-os) os: add prototype KineticStore +74f5e5e PG::op_must_wait_for_map: pass the epoch rather than the map +98f92d8 doc: Added CentOS/RHEL install for git. +115c078 rgw: modelines +c4afaf9 rgw: fix RGWObjManifestRule decoder +0839e2a doc: Added keyring location note to resolve pull abandoned pull request #1946. +4692257 (origin/wip-nuke-dlist) nuke dlist +a3e5c6d Add random_cache.hpp to Makefile.am +f51f162 test: fix make_pair() for c++11 +79e3761 Remove some not-resolving make_pair() invocations. +ebbdb3c Add required spacing after string literals (PRIu64). +16ef1ed Convert ConnectionRef explicitly to bool. +c930a1f Work around an apparent binding bug (GCC 4.8). +228760c Fix the PG listing issue which could miss objects for EC pool (where there is object shard and generation). Backport: firefly Signed-off-by: Guang Yang (yguang@yahoo-inc.com) +bd6ba10 doc: Clean up formatting, usage and removed duplicate section. +15d5b51 doc/release-notes: v0.80.2 +29c2bb2 Revert "qa: add an fsx run which turns on kernel debugging" +c15e524 Revert "qa: add an fsx run which turns on kernel debugging" +2217f2b doc: fix a typo in quickstart doc +7a0ea79 doc: fix a few typos in radosgw docs +d089283 doc: fix a few typos in rados docs +cc5c33f doc: fix a few typos in the dev docs +e23ed9b doc: fix a few typos in rbd docs +d693d7b doc: Fix a few typos in the install docs +bb881e5 doc: fix a few typos in architecture page +fcbdd2f doc: Fix a typo in the rbd man page +ef117fe Use submit_transaction_sync to make change durable +6ff5fed Add random cache and replace SharedLRU in KeyValueStore +c0dc245 (origin/wip-7891) osd: cancel agent_timer events on shutdown +ef40737 osd: s/applying repop/canceling repop/ +cafceae osd: clear PGBackend state on shutdown +e299357 osd: separate cleanup from PGBackend::on_change() +b16b64e Support for READFORWARD in the caching tier +b927c0d (origin/wip-8523) qa/workunits: cephtool: test for 'osd pool {get,set}-quota' +714a9bb mon: OSDMonitor: add 'osd pool get-quota' command +c92feeb (origin/wip-8727) messages: MForward: fix compat version +0bf4f65 osd: clear sessions_waiting_on_map on shutdown +aefbac5 osd: fix session leak when waiting on map +17ad083 osd: clear Sessions for loopback Connections on shutdown +231fe1b Revert "OSD: move waiting_for_pg into Session" +aa1be2e OSD: fix debug logging output +b700963 (origin/wip-8306-rebase) ceph.spec.in: add bash completion file for radosgw-admin +235e4c7 ceph.spec.in: rhel7-related changes: +7cf8132 Fix/add missing dependencies: +ec8af52 ceph.spec.in: whitespace fixes +e131b9d ceph.spec.in: split out ceph-common as in Debian +08fa16b common: seq_read_bench argument order changed The argument order for seq_read_bench in src/common/obj_bencher.h has been changed to match the argument order in obj_bencher.cc +cca5841 (origin/wip-8751) test: generalise default_pools in test_rados +a7a631d (origin/wip-8754) tests: don't depend on 'data' pool in rbd test +cf5f535 doc/release-notes: clarify CRUSH notes about tunables +d84d720 decrement WBThrottle perfcounters in clear_object +16df4c3 (origin/wip-8745) mds: use client-provided time stamp for user-visible file metadata +73b2928 Remove exclusive lock on GenericObjectMap +d104979 Add Header cache to KeyValueStore +c0806bb doc: mention kernel support for rbd format 2 +c7937ff doc: Fix a typo regarding requiretty for RHEL based platforms +54af810 (origin/wip-8738-next) mon: check changes to the whole CRUSH map and to tunables against cluster features +2280c0e OSDMonitor: fix quorum_features comparison in check_cluster_features +c0ba58c (origin/wip-refs) msg: debug refs on incoming Messages +c0dcf3b common/RefCountedObject: make nref, cct private +b0da92b msg/Message: use RefCountedObject ctor to set initial ref count +e621856 msg/Pipe: debug Pipe refs +242ee89 msg: debug Connection refs +fc8d198 osd: debug Session refs +45991c0 common/RefCountedObject: assert nref == 0 in dtor +ff1521f common/RefCountedObject: optionally take initial ref count to ctor +0547417 common/RefCountedObject: optionally debug +2226b91 qa: support running under non privileged user +f7086d3 Automagically setup submodules on first run. +0c7c722 ceph_argparse_flag has no regular 3rd parameter. +909850e [werror] Fix c++11-compat-reserved-user-defined-literal +fde99e6 OSD: adjust share_map() to handle the case that the osd is down +ddc04c8 (origin/wip-8670) mon: OSDMonitor: 'osd pool' - if we can set it, we must be able to get it +0392ddb ReplicatedPG: Removed the redundant register_snapset_context call +2f089d8 OpTracker: The optracker enabled/disabled check is added +63be0f2 OpTracker: use mark_event rather than _mark_event +bb3e1c9 (origin/wip-8728) qa/workunits/rest/test.py: make osd create test idempotent +7e1deb6 (origin/wip-async-log) mds: defer encoding/submitting log events to separate thread +44199d6 mds: use mutex to protect log segment list +6d8ccdd mds: add thread to encode/submit log events +70c0723 (origin/wip-osd-dumpres) osd: add dump_reservations asok command +6483710 common/AsyncReserver: add dump() +9ce5ff9 (origin/wip-8692) mon: clear osd request queue latency info on down or up +f8c88a4 OSD: wake_pg_waiters after dropping pg lock +e2b151d (origin/wip-fs-cmds-oops) mds: Update default FS name +f62f7f5 qa: update cephtool EC pools test to respect IDs +710561c mon/MDSMonitor: EC check in 'fs new' like newfs +44eb259 qa: add a check for crash_replay_interval autoset +c0ffa01 mon: Set crash_replay_interval automatically +82d3fcc qa: Update data pool ID for vxattrs test +917ef15 test: use 0U with gtest to avoid spurious warnings +522174b (origin/wip-vstart-wrapped) qa: support running under non privileged user +8697d6a OSD: await_reserved_maps() prior to calling mark_down +6f97206 (origin/wip-osd-map-cache-size) osd: allow osd map cache size to be adjusted at runtime +bcc09f9 qa/workunits/cephtool/test.sh: sudo ceph daemon +959f2b2 (origin/wip-fix-pglog-unittest) PGLog: fix clear() to avoid the IndexLog::zero() asserts +e0d3b78 (origin/wip-8699) rgw: fix uninit ofs in RGWObjManifect::obj_iterator +73b929b osd: improve tests for configuration updates +2dec8a8 (origin/wip-8542) qa/workunits/suites/fsx.sh: don't use zero range +83f1906 (origin/wip-fs-cmds) mon/MDSMonitor: log warning while MDS up but no FS +b7f09c2 mon/MDSMonitor: fix incorrect comment +fc0f8bd mon/MDSMonitor: s/enabled/get_enabled()/ +641b419 mds: Handle setting 'enabled' in upgrades +96f4e78 mds: journal-related debug messages +7294e8c test/qa: update for MDSMonitor changes +fd9c1fe vstart: update for newfs/rmfs changes +ae5f1db mon: add `ceph fs [new|rm|ls]` +1dfe913 erasure-code: add definitions to the glossary +5867464 mon: hide mdsmap in 'ceph status' if not enabled +6109cc9 mon: stop MDSMonitor when FS disabled +c442b0d mon: enable deleting pools when FS disabled +f6d029d mon: warn in newfs if crash_replay_interval=0 +243963c mon: don't require 'sure' flag for new fs +90e6dae osdmap: Don't create FS pools by default +13305d5 mds: no initial filesystem +8f7900a mds: add 'enabled' flag to MDSMap +ef7d1bc doc: RPM instructions correction +fcdf273 (origin/wip-port-fixes) mds: avoid comparing MutationRef with 0 +e473790 (origin/wip-krbd-settle) krbd: rework the unmap retry loop +59d18ac [RGW, memory leak] Memory leak in RGW has been fixed: deletion of allocated pointer to pointer to Log object has been added to "on_exit" handler. +8e5c921 [RGW, memory leak] Memory leak in RGW GC (losing pointer during allocating Ceph-context) has been fixed. +8706b74 [RGW, memory leaks] Memory leak in RGW initialization (Inserting new connection into connections map w/o check) has been fixed. +9bcc19d (origin/wip-map-unmap) map-unmap.sh: fail if 'rbd rm' fails +16b14ea map-unmap.sh: drop the get_id() logic +abdb168 (origin/wip-fsx-random-ctx) test_librbd_fsx: use private RNG context +9517cea os/FileStore: put SUPER usage in ifdef __linux__ +b066e16 common: move #include syscall into ifndef DARWIN +2db500b client: handle missing O_RSYNC constant +4b36074 os/FileStore: move ZFS_SUPER_MAGIC in linux ifdef +656bc04 common/Thread: add missing #include for pid_t +b2bcf52 ceph.in: handle DYLD_LIBRARY_PATH on OS X +12079a7 doc: dev: cache-pool.rst: fix typo s/objets/objects/ +4689467 PG: pass OpRequestRef by ref to avoid refcounting overhead +d48a737 osd/: in scrub, check for and remove obsolete rollback objs +953c33e osd/: plumb rollback_trim_to through interfaces and messages +ac11ca4 PGLog: add rollback_info_trimmed_to_riter to IndexedLog and use in PG +62027ec doc/release-notes: v0.82 +7fae941 rgw: allocate enough space for bucket instance id +2207ed1 PGLog: fix logging whitespace in trim +af4970c OSDMap: avoid passing pg_t by value +d72eec0 PG: block outgoing peering messages until the last interval is durable +f9f89be PG: add machinery to temporarily buffer outgoing recovery messages +f749812 os/: add async flush_commit() method to Sequencer and implementations +0debfe1 OSD: pass param by ref to avoid copying overrhead +1f3fbc9 mds: print sequence number of log segment +55ed85b mds: introduce sequence number for log events +a17462c mds: add get_metablob() to log events +0690078 mds: pass finish context to MDlog::submit_entry() +21955d7 MOSDOpReply: Constructor initialization list is used to instantiate members +44db3d0 MOSDOpreply: The functions are returned by const ref and parameters passed by ref +1c93c61 MOSDOp: The functions are returned by const ref and parameters passed by ref +ad81a98 Revert "ceph-disk: Enable creating multiple osds per dev" +e02957d test: use (unsigned)0 with gtest to avoid spurious warnings +f8df9bd (origin/wip-da-SCA-20140623) scratchtool.c: cleanup do_rados_getxattrs() +4e9c2c1 (origin/wip-osd-ints) osd: fix pg_stat_t int -> int32_t +238b1a3 osd: fix pg_shard_t int -> int32_t +709f0c4 osd: fix pg_interval_t int -> int32_t +a5f9a09 Fixed build on 32 bits platforms +f5a72b7 Added a couple of ASSERTS for avoiding coverity to complain about the possibility of a division by 0 +93df7da mds: set xattr_version to 0 if replay doesn't contain xattrs +046c976 common/fd.cc: fix possible out-of-bounds write +605d180 mount.ceph.c: fix strdup related memory leak +7f7e56c scratchtool.c: fix resource leak and error handling +bdb1346 scratchtool.c: fix resource leak +48e38ac (origin/wip-refactor-cephtool-test) qa/workunits: cephtool: fix 'osd bench' test +802290d osd: OSD: better explanation on 'max_count' calculation for 'osd bench' +4b0809a qa/workunits: cephtool: only run heap profiler test if tcmalloc enabled +5c4616e qa/workunits: cephtool: set +e for the tcmalloc tests +6725543 qa/workunits: cephtool: delete unnecessary function calls +946bd0d qa/workunits: cephtool: disable bash debug when not running tests +5d26575 qa/workunits: cephtool: allow running individual tests +f418408 qa/workunits: cephtool: cleanup state after erasure-code-profile test +780424d qa/workunits: cephtool: add/remove comments +3d14a96 qa/workunits: cephtool: split into properly indented functions +04658b7 qa/workunits: cephtool: move test line to where it's more appropriate +db6cc13 qa/workunits: cephtool: split into functions +3953053 (origin/wip-da-fix-make-check) test/ceph-disk.sh: fix for SUSE +be70c1f osdmaptool/test-map-pgs.t: fix escaping to fix run +dc1a4df Revert "Give meaningful error when submodules are not checked out" +9695535 Make in "ceph osd tier --help" clearer. +76361b8 mon: simplify output +385fd6c (origin/wip-disable-static) do_autogen.sh: --disable-static +14085f4 (tag: v0.82) 0.82 +152bbd6 osd: workaround race condition in tests +cb740b3 (origin/wip-mon-perf) mon: shut down perfcounters last +524700f doc: Fix malformed parameters in librados.h +56cad1a libcephfs/test.cc: fix use after free +a5c704b RadosStriperImpl.cc: catch exception by reference +6d79863 rgw/rgw_rados.h: use static_cast instead of c-style cast +0b3a398 (origin/wip-8654) osd/OSD.cc: parse lsb release data via lsb_release +d7350a3 (origin/wip-fix-rados-tool) rados.cc: fix pool alignment check +2b007c2 (origin/wip-8624) mon: MDSMonitor: print pool name along with id during 'newfs' errors +378b5ad qa/workunit: cephtool: test mds newfs and add_data_pool with ec pools +d6f6813 mon: MDSMonitor: do not allow ec pools to be used for data or metadata +20a1664 (origin/wip-mon-sanity-checks) common: LogClient: output to derr (i.e., dout(-1)) on CLOG_ERROR +9804360 mon: Monitor: observe conf changes and report on unsage option values +ec73888 mon: Monitor: sanitize options at start +87f9dba Give meaningful error when submodules are not checked out +58212b1 osd: Only normalize extent if op uses extent +4225e2f (origin/wip-leveldb-stress) osd: remove OSD-specific leveldb options +52b147c ceph-mon: override 'leveldb_*' config options for the monitor +d42d19d mon: MonitorDBStore: remove mon-specific leveldb options. +9844885 mon: DataHealthService: s/mon_leveldb_size_warn/mon_data_size_warn/ +57c5d05 (origin/wip-8610) osd: ignore CRUSH_ITEM_NONE in compat_must_dispatch_immediately +d9073f4 (origin/wip-disk-ioprio) osd: allow io priority to be set for the disk_tp +dd6badc common/WorkQueue: allow io priority to be set for wq +1b87410 common/Thread: allow io priority to be set for a Thread +a2b4911 common/io_priority: wrap ioprio_set() and gettid() +8700aa0 test/libradosstriper/striping.cc: fix potential memory leak +2a8c1e2 MDCache.cc: init 'umaster::ls' with NULL in contructor +da03e9e MDCache.h: init 'umaster::safe' in constructor +2210ee3 test/objectstore/store_test.cc: prefer ++operators for iterators +3e93d4a osd: tests for osd bench +74be320 Use sized integer. +66a5f3b doc: Fixed Typo in pools documentation - replaced '-' with '_' in example set-quota comands. +e189a66 (origin/wip-8603) log the command that is being run with subprocess +78cbac4 mailmap: Dmitry Smirnov name normalization +efefbfd mailmap: koleosfuscus affiliation +1cdea98 mailmap: Walter Huf name normalization +a58fbf7 mailmap: Colin Mattson affliation +41c536f mailmap: Dominik Hannen affiliation +1f96cb7 mailmap: Harpreet Dhillon affiliation +3716f58 mailmap: Lluis Pamies-Juarez affiliation +4222f29 mailmap: Wei Luo affiliation +009f01d mailmap: Sahid Orentino Ferdjaoui name normalization +06734f1 mailmap: Stephen F Taylor affiliation +4344295 mailmap: Sushma Gurram affiliation +2eddee7 mailmap: Sylvain Munaut affiliation +22c028d mailmap: Red Hat acquires InkTank +c270172 mailmap: Sebastien Ponce affiliation +39a4b78 mon: test that pools used in tiers cannot be removed +1de9071 (origin/wip-misc-fixes) osd/osd_types.cc: dump correct pg_log_entry_t member variable +363496a osd: use appropriate json types instead of stream when dumping info +97772c2 (origin/wip-tiermsg) mon: name instead of id in "has tiers" message +4d5469a osd: ECMsgTypes: dump json bools instead of strings +3f0ea95 osd: have 'tid' dumped as a json unsigned int where appropriate +debaf61 mon: dump 'epoch' as json unsigned instead of int +1a120e9 mon: PGMonitor: dump 'epoch' as json int instead of string +317cf95 mon: OSDMonitor: dump 'up' as json array instead of string +b7ff393 mon: OSDMonitor: dump 'acting' as json array instead of string +78f94a9 mailmap: Ailing Zhang affiliation +d2e852e doc: Fixed an incorrect flag in radosgw admin docs. +741ad3f (origin/fix_ut) autotools: avoid check_SCRIPTS duplication +c0d78c6 Fix dist package run unit test failed. +b3ace76 tests: prevent gitbuilder trigger in test-erasure-code.sh +3a9c0fc test: fix -Wsign-compare warnings +b46c405 erasure-code: verify that rados put enforces alignment +c35ceef ReplicatedPG: 'ajusted' typo +de2c085 rgw-admin: Fix the 'show log' command +304b08a enforce rados put aligment +8d9201f tests: remove spurious and harmless find command +cdca7b7 (origin/wip-osd-stats) osd: move osd_stat into OSDService +4afffb4 osd: fix filestore perf stats update +0985ae7 (origin/wip-backfill-priority) osd: prioritize backfill based on *how* degraded +d20da8d osd: add osd_min_recovery_priority tunable +b65ceb6 common/AsyncReserver: add a min_priority knob +0e7a979 osd: fix word sizes in MBackfillReserve +c4e8451 (origin/wip-scrub-sleep) osd: introduce simple sleep during scrub +7b580a2 mon: Monitor: complex code deduplication algorithm applied to tick() +0ed1fe6 mon: Monitor: rework tick() so we don't calculate the same thing over and again +ef8a128 (origin/wip-6703) support dmcrypt partitions when activating +7dc93a9 Fix EINVAL err when use "ceph tell osd.* bench" +3ed7f2d (origin/wip-8593) mon: ensure HealthService warning(s) include a summary +82e47db mon: refactor check_health() +98883f6 mon: fix typos, punctuation for mon disk space warning(s) +55a9778 mon/OSDMonitor: make down osd count sensible +c5b5ed6 (origin/wip-ec-hitset) ceph_test_rados_api_tier: disable LibRadosTierECPP::HitSetWrite +0bb0095 Revert "erasure-code: create default profile if necessary" +f53bed1 mon/OSDMonitor: fix build error +1c72465 osd: verify osd config sanity checks +4bd1b5e PendingReleaseNotes: note about keyvaluestore-dev on-disk format change +d93e74e common: Enforces the methods lru_pin() and lru_unpin() +d48ed68 common: Fixes issue with lru_clear() + add new test +62aa5c5 common: Adds simple tests to verify good behavior +64f6232 (origin/wip-ceph-isatty) ceph: output prompt only if stdin is tty +8d1cb8b (origin/wip-vstart-conf) vstart.sh: echo CEPH_{CONF,KEYRING} exports if necessary +2eb1f55 vstart.sh: rename conf variable to conf_fn +18f5807 Make KeyValueStore not use expected_write_size +360de6a erasure-code: create default profile if necessary +f3ec7d0 (origin/wip-osd-configs) osd: add sanity check/warning on a few key configs +4786a48 osd: remove non const get_erasure_code_profile +a1c13c5 tests: prevent kill race condition +5c1f9aa osd: improve osd pool create error message readability +6bf8183 erasure-code: consistent argument parsing for profiles +3c63811 erasure-code: OSDMonitor::get_erasure_code is a const +ff2eb23 erasure-code: pool create must not create profiles +0d63cf2 (origin/wip-import-purge) qa: extend cephfs_journal_tool_smoke +acd6ebb qa: set +x on cephfs_journal_tool_smoke +ee487b4 tools/cephfs: Purge trailing objects during import +ac05799 tools/cephfs: error handling in journal_export +381163c tools/cephfs: Clean up waits in Dumper +3fe1699 osd/OSDMap: do not require ERASURE_CODE feature of clients +250677c osd/OSDMap: make get_features() take an entity type +e29beff (origin/wip-8071) erasure-code: remove jerasure internals dependencies +e720314 (origin/wip-doc-os-recommendations) doc: Updated the OS Recommendations for Firefly. +2e3302c doc: Updated the example configuration. +5a31df2 doc: Updated doc for more recent versions. +2eab1c1 Update RBD doc for OpenStack +a290d34 (origin/wip-fsx-sizeof) test_librbd_fsx: fix sign-compare gcc warning +40c48bc qa: add script to test krbd setting ro/rw ioctl +b2542f8 (origin/wip-8585) rgw: set a default data extra pool name +94c8f70 doc: Made mention of "incomplete" status. +29c33f0 qa: add an fsx run which turns on kernel debugging +f978722 (origin/wip-xattr-spillout) FileStore: remove the user_only param from _fgetattrs +bb4e3a9 FileStore: remove user_only options from getattrs through the ObjectStore stack +fbe6009 FileStore: do not use user_only in collection_getattrs +7267a37 FileStore: remove dead code +e3b995e FileStore: set XATTR_NO_SPILL_OUT when creating new files. +239476a FileStore: make _clone() copy spill out marker +af8052b Add xattr test to ceph_test_objectstore +d9fac9c (origin/wip-7774-3) rgw: chain to multiple cache entries in one call +c616358 rgw: chain binfo_cache to multiple cache entries +7e81185 rgw: bucket info uses cache chaining +a2f6709 rgw: user info uses cache chaining +ab764f3 rgw: an infrastructure for hooking into the raw cache +7fb6a3d rgw: cache bucket info +eaff42f rgw: cache decoded user info +0bbeeee PG: Added a const spg_t member to the PG class The const spg_t member is been insantiated from constructor and now get_pgid() can reference this to return a spg_t instance without the need of pg_info (thus not requiring to acquire pg_lock). +85e491f doc: Added a tip to install NTP when running multiple monitors. +d37ef6a doc: Added additional background to address additional states. +b7f6147 doc: Added background discussion to clock settings. +ecbb005 OSD: The thread pool variable name changed The variable names are more meaningful now. op_tp -> osd_tp and op_sharded_tp -> osd_op_tp +2a5d83d ShardedTP: The config option changed The config option for sharded threadpool is changed to osd_op_num_threads_per_shard instead of osd_op_num_sharded_pool_threads. Along with osd_op_num_shards this will be much more user friendly while configuring the number of op threads for the osd. +a0e48b8 ShardedTP: Changes related to conforming to Ceph coding guidelines +2e3f4bc doc: Fixed typo. +6733947 Fix for bug #6700 +a4923f5 fix compilation warnings +63cc7f9 Add test for objectstore +50c8fee Fix write operation on a deleted object in the same transaction +737c13e Remove SequencerPosition from KeyValueStore +ef06515 doc: fix typo in erasure coding section +1080e7a Add upper limit to the write size of set_alloc_hint in KeyValueStore +6a7e201 (origin/wip-8554) init-ceph: continue after failure doing osd data mount +1f99cda (origin/wip-mon) mon: gather perf stats on elections +8f36d96 mon: gather perf stats on session adds, removes, counts +ecda2fe OSD: move waiting_for_pg into Session +1f40c35 Add set_alloc_hint test to ceph_test_objectstore +5dd9b2a Make KeyValueStore support set_alloc_hint op +b0c66a7 doc: Fixes spelling errors on README +910d73c Added RPM and debian packaging for libradosstriper, creating a new package called libradosstriper1 +fa01ca6 Added unit test suite for the Rados striping API. +d160ce2 Implementation of the radosstriper interface. +a6c34e4 (origin/wip-flag-known-redirs) osdc/Objecter: mark all ops as known-if-redirected +bc3b30e (origin/wip-set-extsize-fix) XfsFileStoreBackend: call ioctl(XFS_IOC_FSSETXATTR) less often +750b1db XfsFileStoreBackend: nuke redundant goto in set_extsize() +524a155 (origin/wip-rgw-manifest-iter) rgw: reduce calls to rgw_obj.set_obj() +e31d3fe doc: Descrption => Description Correct spelling error. +0ca43d8 doc: Use write_full for C++ example Latest version of librados uses write_full when writing entire object. +0bd6f67 OSD::calc_priors_during: handle CRUSH_ITEM_NONE correctly +2081c99 (origin/wip-i386-atomic) include/atomic: make 32-bit atomic64_t unsigned +64e99d8 ceph-objectstore-test: fix warning in collect_metadata test +e1ad0bf Added a striper interface on top of rados called radosstriper. +7ceeb9f Completed librados documentation of rados_write_op_cmpxattr and rados_read_op_cmpxattr concerning their error reporting +62064f3 Added const qualifiers for the layout argument of file_to_extents and object_truncate_size +8c12491 Fixed usage of rhel_version in spec file : it should have been rhel +f92d7bb Fixed missing include of assert.h in RWLock interface +b9a35b3 Extracted RadosXattrIter from librados.cc into independent .h anc .cc files. This makes this interface usable by clients of librados. +aede832 (origin/wip-os-rename) os: rename get_*() -> decode_*() +5bb078f (origin/wip-sahid-dist) Populate ChangeLog when distribute +b22cc85 Populate AUTHORS when distribute +d76936b OSD::calc_priors_during: fix confusing for loop bracing (cosmetic) +59d727d (origin/wip-da-SCA-20140604) kv_flat_btree_async.cc: remove consecutive break after return +82f5df4 JournalScanner.cc: catch exception by reference +53533ee KeyValueStore.cc: silence gcc -Wunused-variable +e24213e MemStore.cc: silence gcc -Wunused-variable +51abf20 Revert "Remove unused variables in MemStore.cc" +a325e3e Revert "Remove unused variables in KeyValueStore.cc" +cac902e os/KeyValueStore.cc: fix possible null pointer deref warning +3ee3e66 librbd/internal.cc: check earlier for null pointer +f17a963 test/librbd/fsx.c: fix gcc warning +f31e4c8 (origin/wip-da-update-libs3) libs3: update to latest git master of ceph/libs3 +18c07ec common/addr_parsing.c: fix realloc memory leak +5f86652 daemon_config.cc: add some more asserts +703d0eb (origin/wip-8452-2) rgw: set meta object in extra flag when initializing it +23b657c Remove unused variables in KeyValueStore.cc +307ba48 Remove unused variables in MemStore.cc +5185a36 (origin/wip-autotools-dummy) automake: add dummy.cc to fix 'make tags' +35509d274 bloom_filter, add test to validate assignement operator +c50f85e bloom_filter, remove unecessary operators +90cc6dd bloom_filter, add assertion to test validate element_count() +c323c5b Fix keyvaluestore fiemap bug +3ec32a6 (origin/wip-8447) librados: simplify/fix rados_pool_list bounds checks +5569d40 documentation: add osd erasure-code-profile {set,rm,get,ls} +8ff4edd documentation: update osd pool create erasure +22bc886 (origin/wip-rbd-doc-fix) doc: fix 'rbd map' example +4f834fa doc/release-notes: v0.81 +f4e81d3 librbd: clarify license header +884a6b3 RadosClient: Avoid the DispatchQueue for OSD responses. +0cc9ade doc: Updated monitor output and added usage calc explanations. +9c32cb2 doc: Added usage for pool quotas. +86754cc doc: Added more discussion of new CRUSH types. +cabb8f0 doc: Added a section for ceph df. +8de9501 (tag: v0.81) 0.81 +4bc5aef doc: Updated packages to reference firefly. +c18cbef (origin/wip-runxfstests) qa: add run_xfstests_krbd.sh wrapper +cd65246 qa: catch up with xfstests changes +703166c qa: cp run_xfstests.sh run_xfstests-obsolete.sh +601e25e erasure-code: Ceph distributed storage system +9bac31b scripts/run-coverity: don't explicitly specify tool version +e158ad9 erasure-code: make decode_concat virtual +6aa45b1 common: s/stringstream/ostream/ in str_map +319cb50 Make KeyValueStore support "ceph osd perf" command +06c0a42 Update INSTALL to mention the submodules/recursive +2dbd85c (origin/wip-sharded-threadpool) WorkQueue: The variable name is corrected. Modified the variable name from shardedpol_cond->shardedpool_cond +3e3632e WorkQueue: Removed the unused in_process variable +b05da1c WorkQueue: Taking care of potential race condition during pause() Introduced two variables to keep track of number of threads paused and drained during threadpool pause/drain. The pause()/drain() call is waiting till number of pause/drain threads equals to toral number of thread pool threads. +b15bf6b OSD:Derived sharded queue implementation is changed All the threadpool related stuff like stop/pause/drain etc. are not handled by sharded queue anymore. All it is implementing are related to processing,enqueue , signaling of waiting threads and shard queue status. The pg ordering is been taken care of by introducing a map in each shard. +c24ef00 ceph-common: The Sharded threadpool worker logic changed Now, the _process() of the derived queue is processing one request at a time and the outer loop is controlled by the sharded threadpool. The stop/pause/drain functionalities are controlled by the sharded TP. +06845d0 OSD: Sharded Op worker queue implementation for handling OSD ops This is the implementation for the client of the sharded thread pool/sharded workQ. Removed the op_wq class and now OSD ops are going through sharded workqueue model which is used by the sharded threadpool. Derived ShardedOpWQ implementation has a data structure called ShardData which has it's own lock/cond and storage. ShardedOpWQ holds a vector of that and the size of the vector is a config option. During enqueue operation on the queue, the ops are sharded across these ShardData based on pg hash % number of shards. Similarly, in the _process function the sharded thread pool threads are divided across ShardData based on thread index % number of shards +8369c08 ceph-common: Implementation of the sharded threadpool. Threadpool will only be having a single work queue and internally the work queue will be having multiple storage data structures. Based on some logic (which is derived class implementation specific) the work queue will shard the requests among these storage structures. Each storage will be guarded by finer grained sunchronization objects. Sharded threadpool threads will be assigned to work on a shard based on some algorithm which is again derived class implementation specific. +83ccba3 (origin/wip-sock-cmp) msg: remove comparison operators for sockaddr_storage +70afaaa (origin/wip-8452) rgw: fetch object attrs on multipart completion +669b605 PGLog: initialize complete_to +b300318 (origin/wip-8311) rgw: if extra data pool name is empty, use data pool name instead +38405d3 (origin/wip-8265) qa/workunits/cephtool: test setting options using SI units +5500437 common/config.cc: allow integer values to be parsed as SI units +40587d4 test/strtol.cc: Test 'strict_strtosi()' +67dc575 common/strtol.cc: strict_strtosi() converts str with SI units to uint64_t +9c56c86 rgw: calc md5 and compare if user provided appropriate header +cae085b (origin/wip-8472) msg_types.h: Don't use strncmp for comparing sockaddr_in. +00b9211 doc: Improve man page for rados bench +2da2699 doc: update pools documentation +ab59a10 doc: Improve man page for bench +0fd6e12 osd: replace shard_t usage with shard_id_t +dedd8e2 osd: explicit shard_id_t() and NO_SHARD +20e66d1 osd: loop over uint8_t instead of shard_id_t +d723cac osd: factorize shard_id_t/shard_t into a struct +dcf9568 doc: Define RADOS in glossary +e52b9c6 doc: Added osd pool default size setting example. +20a04c6 doc: Moved redundant text out of quick-common. +6786d60 common: WRITE_{EQ,CMP}_OPERATORS_1 +8679cdb osd_types: add pg_log_t::rollback_info_trimmed_to +f1b890e (origin/wip-8465) osd: fix bad is_active() assert in share_map() +f153bc1 doc: Made additional changes s/CRUSH/Ceph for pull request #1855 +c08f481 doc: alter doc CSS for the removal of Apex Sans +7f46b7b doc: removed Apex Sans font, replace with font from GFE +692f998 doc: Fixes broken hyperlinks +93a61df (origin/wip-8259) Makefile: make install-deps rule +6fe7564 debian: improve package dep list +e06c58c (origin/wip-smart-df) mon: set min_size to data chunk count for erasure pools +7a9652b mon: include 'max avail' in df output +2f63a30 mon: right justify df values +2339d4a vstart.sh: -e to create an ec pool called 'ec' +297f616 crush: add get_rule_weight_map +0b5a674 rest-api: key missing for per "rx" and "rwx" +634780a (origin/wip-8321) remove unused variables, gets all tox envs passing +23b75b5 add backport of collections.Counter for python2.6 +59b7113 intial take on ceph-brag-client and tox. Python 2.7 passes +bc85b5d mailmap: Aristoteles Neto affiliation +0b88659 mailmap: Chris Glass affiliation +7582fa9 mailmap: Christian Theune affiliation +b2cb36f mailmap: Shawn Edwards affiliation +e65b7e2 mailmap: Ilya Dryomov name normalization +e4928c5 mailmap: Stuart Longland affiliation +dbc66d7 mailmap: Walter Huf affiliation +6338542 mailmap: Michael Riederer affiliation +831b2c9 mailmap: Stefan Eilemann affiliation +1f22590 mailmap: Stephen F Taylor affiliation +be9f743 mailmap: Daniel J. Hofmann affiliation +c758584 mailmap: Kevin Dalley affiliation +7d1a493 mailmap: Florent Flament affiliation +2815e4d (origin/wip-tier-doc) doc: Fix cache tier docs +08b3cff os: FileStore::create_backend unit tests +3081652 os: ObjectStore::collect_metadata unit tests +97023dc (origin/wip-reweight-tree) mon/OSDMonitor: simplify 'osd crush reweight ...' flow +576315a mon/OSDMonitor: add 'osd crush reweight-subtree ...' +2916148 crush: add adjust_subtree_weight() +4021fb6 osd/: move split_list and split_request into OSD +26862ca Fix Documentation Typo +d4e8119 doc: Added primary affinity. Some minor rewrap edits. +1ac3a50 (origin/wip-8292) better error reporting on incompatible device requirements +c2225f8 mon: fix set cache_target_full_ratio +4c22c6f (origin/wip-pybind-timeout) pybind/rados: Fix timeouts for small t +1e0a82f (origin/wip-map-advance) osd: fix map advance limit to handle map gaps +641732d documentation: update pid file description +c9ff481 Improvements to radosgw docs - Correct a typo (`rados-admin`) in admin docs - Reorder sections in config so "above example" is in expected position +e741ea4 os/FileStore: include filestore backend, f_type in osd metadata +827df7d Fix Doc Typo +9312c5e os/FileStore: refactor backend instantiation +3cf723c os/FileStore: fix journal-less operation +200d0ae (origin/wip-multipartition) ceph-disk: Enable creating multiple osds per dev +2ceb13a (origin/wip-8428) rgw: check appropriate entity permission on put_metadata +ab0db34 documentation: adapt PG formula for erasure coded pools +d3af8fa Update architecture.rst:Calculating PG IDs +99b9682 documentation: update osd pool default size from 2 to 3. +4d4b77e (origin/wip-java-build) cephfs-java: build against older jni headers +6069ff0 doc/release-notes: v0.67.9 +f51e33b (origin/wip-librbd-flush) Avoid extra check for clean object +9235dcb (origin/wip-mon-get-version) mon: set MMonGetVersionReply tid +ba53889 README: move package dependencies into separate files +77066a2 README: clean up some whitespace +c08adbc Fix set_alloc_hint op cause KeyValueStore crash problem +d04b386 (origin/wip-8342) init-ceph: if we fail to set an OSD's crush position, continue +46f1eb6 init-ceph: continue loop immediately on daemon start failure +3bbe29e common/Finisher: add queue(list&) +c2644b2 Update manual-deployment.rst +74218f3 Define AO_REQUIRE_CAS (fixes FTBFS on 'hppa') +fb504ba (origin/wip-8373) mon: Fix check of ruleset id on pool update +1d9e4ac mon: Fix default replicated pool ruleset choice +799f76a (origin/wip-client-time) mds: remove unused Mutation::now +8768857 mds: use mds_stamp for mksnap +d4bfa39 mds: reset mds_stamp for readdir, rename, link +a09547b mds: use real timestamp for readdir leases +9c86a11 mds: use client-provided time stamp for user-visible file metadata +4a6596e mds: do the balancer and propagation timers based on mds_stmap +fd1f9bd mds: do rstat timestamps (rctime, fragstat mtime) in terms of op stamp +29c6844 mds: make sure mds_stamp is set when we journal +3569e80 mds: set mds_stamp on lock acquisition +e4c9c34 mds: add {mds,op}_stamp to Mutation +401319a (origin/wip-buildroot) ceph.spec.in: remove BuildRoot +93a5b88 (origin/wip-journal-tool) tools/cephfs: error handling in EventOutput +3207c50 osdc/Journaler: fix obj count in Journaler:erase +2621b5d tools/cephfs-journal-tool: handle --help cleanly +d66fa53 tools/MDSUtility: fix crash on bad config +708c4ed tools/JournalTool: update usage() +3bef125 qa: Add smoke test for cephfs-journal-tool +b76e64b tools/JournalTool: Fix 'header set' corner case +5d913e2 mds: Create JournalPointer in MDLog::create +bac434d mds: Make EMetaBlob::dirlump::_decode_bits const +1c2bb37 osdc: new style encoding for Journal::Header +f609a0a osdc: Simplify JournalStream::read +f12b9e8 osdc: make JournalStream::readable const +778b785 osdc/JournalStream: DRY envelope size calc +45c319e doc: Update ceph-mds manpage +423dafe osdc/Journaler: use pointers for out params +fc1d6da tools/cephfs: Update for JournalPointer +d52eeab Fix JournalStream::read length assertion +5c2a640 osdc/Journaler: include stream_format in dump() +68b2009 mds: Introduce mds_journal_format config setting +aec4c93 tools: update Dumper to use JournalPointer +1612677 mds: Generalize JournalPointer functionality +8b0383e dencoder: add JournalPointer to types.h +a4ae168 mds: add atomic log rewrite on format change +dba721f osdc: Add Journaler.erase +c73902b osdc/Journaler: privatize members +405cb85 osdc: fix redundant branch +e7fa5be osdc: Clean up journalstream readable check +79a1e58 mds/CDir: remove redundant inode enc/dec +49add98 docs: Add cephfs-journal-tool +5011945 gitignore: Add cephfs-journal-tool +7e4da00 debian: add cephfs-journal-tool to ceph-mds +403e028 rpm: add cephfs-journal-tool to RPM build +f7e9ff1 tools: Create cephfs-journal-tool +107821f Fix formatting of header +ad2e20f client: set timestamp in MDS requests +a91e072 mds: include timestamp in MClientRequest +d71839a (origin/wip-doc-openstack) doc: clarify openstack cow sentence +0f7f1e8 doc: note cinder multi-backend restriction +e92f2d9 doc: link to ephemeral rbd patches +13d6c3c doc: quick-ceph-deploy cleanup Improve documentation in quick-ceph-deploy.rst Use admin-node consistently. ceph should be installed on admin-node for the following reasons: "ceph-deploy admin admin-node" assumes that /etc/ceph exists. "ceph health" requires the use of ceph +d40ba05 doc: mention admin-node in common documentation +29f615b (origin/wip-8334) ReplicatedPG::start_flush: fix clone deletion case +5ff95db (origin/wip-8332) HashIndex: in cleanup, interpret missing dir as completed merge +bc897b8 rados.py: clarify recent change on write return value +6372118 doc: Clean up pre-flight documentation Mention recent Ceph releases. Move important message about sudo and ceph-deploy closer to the use of ceph-deploy. Mention files created by ceph-deploy comment Separate apt-get from yum command +06d05fd doc: fix link to FAQ The location of the ceph wiki FAQ has changed. Now, the link from ceph documentation matches the current FAQ location +03e3ccd doc: Restored glance_api_version=2 setting. +e8756be (origin/wip-8380-b) osdc/Objecter: flag ops that have been redirected +cf2b172 (origin/wip-8380) osd: skip out of order op checks on tiered pools +e47049b erasure-code: fix URL in developer notes +23787ba mailmap: Sahid Orentino Ferdjaoui affiliation +30ae96a Ensure autogen.sh to be executed at the top-level +fb8f469 mds: add getter for ESession.client_inst +730a011 mds: Add getter for EMetablob.client_name +220f9c9 mds: Add EMetaBlob::get_dentries +f4927f0 mds: switch __u32 with LogEvent::EventType typedef +c1b185b mds: Add LogEvent::str_to_type +e7f4b9e mds: Fix Dumper::undump (missing lock) +96720b6 mds: Add EMetaBlob::get_inodes +b3e57ba mds: Publicize some EMetaBlob members +2282739 mds: Refactor CINode encoding into CInodeStore +bf7b84c mds: Add get_metablob to LogEvent +e56b88f mds: Add ENoOp for padding journals +74ac6e4 mds: Add get_paths method to EMetaBlob +3fa825c osdc: Revise Journaler format +928d0f5 mds: Fix typo 'Sesion' +e3a9f66 objecter: Don't warn on multiple admin sockets +d4a250c common: Add write_stream(ostream) to bufferlist +5b20deb mds: Add LogEvent::get_type_str() +d776ec4 (origin/wip-multimds) mds: queue waiters in MDCache::force_dir_fragment() +b223055 mds: fix remote auth pin race +57c89bf mds: fix Server::submit_mdlog_entry() +f19cd4f mds: drop locks after removing import/export state +0bd4fa2 mds: try trimming exported objects +affce7a mds: journal rename source inode when rollback rename +0c14878 mds: allow early reply when there is no journaled slave update +6fe7d17 mds: skip journaling slave rename when possible +3783653 mds: include all of directory inode's replicas in rmdir witnesses +08b79ea mds: journal EImportFinish after adjusting subtree auth +c18da04 (origin/wip-osd-refs) osd: fix narrow session refcount race +2c4391b osd: fix session leak in ms_handle_fast_connect +15350de Add header cache to DBObjectMap +ee92a39 MDS: add admin socket cleanup on shutdown +a78b14e (origin/wip-osdmon-pa-wait) OSDMonitor: set next commit in mon primary-affinity reply +6dfc544 sample.ceph.conf: minor update +290ac81 (origin/wip-osdmap-sub-bug) OSD: fix an osdmap_subscribe interface misuse +6ec3c46 (origin/osd-metadata) osd: include osd_objectstore in metadata reported to mon +405063b workunits: provide some output in the dirfrag.sh test +aec5634 (origin/wip-8104) osd_types: remove the pool_id argument from (is|check)_new_interval +f47c160 PG: replace is_split, acting_up_affected with should_restart_peering +2ee3551 osd_types: factor out is_new_interval from check_new_interval +c48a4ef (origin/wip-perf-atomic) common/perf_counters: use second atomic to make counters safe to read +ab907c5 doc: Clarified Debian uses sysvinit. +c71c292 doc: Added rgw print continue guidance. +b082fd6 doc: Minor edit. +ca833bd doc: Added clarifying text to CRUSH add command. +48337e0 doc: Omitted glance_api_version=2 to fix creating images from volumes. +17930a1 doc: Changed example to use virtio and put key usage into one line. +8dd1190 Improve Bash completion for various tools +00225d7 test: fix some templates to match new output code +20aad8f doc: update instructions for RPM distros +26151ec mds: lower IO priority of storing backtrace +019483f mds: reduce verbosity of handle_client_file_{readlock,setlock} +ca313c2 mds: add a Server::submit_mdlog_entry() to provide event marking +9f0825c (origin/wip-8338) OSD: verify that client ops are targeted correctly in the current epoch +7411477 (origin/wip-8011) ReplicatedPG: block scrub on blocked object contexts +2ec2182 ReplicatedPG::start_flush: send delete even if there are no snaps +ca91743 Locker: mark_event in acquire_locks() when blocking or succeeding +2df68b6 Server: mark events when journaling and replying +a6aa812 MDCache: mark ops at various finish points +87f6cd4 MDS: add an OpTracker and use it +b277802 Mutation: add an MDRequestParams struct and use that when building MDRequests +ae80a1f MDS: add stubs for an AdminSocketHook +0d89e5c MDCache: pass the causative message to request_start_slave() +06d6d32 mds: remove a couple leftover declarations of MDRequest +428319e doc/release-notes: v0.80.1 +19f8849 doc: Improvements to qemu installation. +6e4455d doc: Added note on Default requiretty for CentOS and others. +8b682d1 (origin/java-gcj) prioritise use of `javac` executable (gcj provides it through alternatives). +89fe035 pass '-classpath' option (gcj/javah ignores CLASSPATH environment variable). +0f4120c look for "jni.h" in gcj-jdk path, needed to find "jni.h" with gcj-jdk_4.9.0 +2001572 mds: deny reconnect for closed session +59f539c mds: revert EMetaBlob::{fullbit,remotebit,nullbit} encoding optimization +f35648b mds: properly clear new flag for stale client cap +58ee556 mds: propagate inode rstat if it has never been propagated +54a9037 mds: avoid journaling unnecessary dir context +1f92f55 mds: cleanup usage of MDCache::predirty_journal_parent() +3d7f527 (origin/wip-da-SCA-20140510) BtrfsFileStoreBackend.cc: fix ::unlinkat() result handling +5f89128 TestLFNIndex.cc: remove unused variable 'mangled_name' +a445529 rgw_user.cc: remove dead assignment in generate_key() +b119679 rgw_user.cc: cleanup RGWAccessKeyPool::check_op() +b731c47 rgw_rados.cc: remove dead assignment / unused variable 'obj_name' +10e6d6e rgw_main.cc: remove dead assignment and unused variable +d2d6b0f PGMap.cc: remove dead assignment +cd611b4 MDBalancer.cc: remove some since 2009 unused code +6cda1e1 chain_xattr.cc: fix memory leak, free 'expected' +1d39b11 confutils.cc: remove unused variable 'val' +1cac491 SyntheticClient.cc: remove double check for "getdir" +5e05aca rgw_op.cc: reduce scope of 'int r' in execute() +f45a50f rgw_op.cc: use static_cast instead of c-style cast +8f90cd2 rgw_quota.cc: remove unused variable 'key' +4753ae8 test_rgw_admin_log.cc: prefer ++operators for iterators +218b6d8 test_cls_rbd.cc: use 'delete []' if 'new char[len]' was used +20455a6 test_rgw_admin_log.cc: prefer empty() over size() for emptiness check +d69fd90 test_rgw_admin_opstate.cc: prefer ++operators for iterators +0f899c8 test_rgw_admin_meta.cc: prefer ++operators for iterators +f523d64 TestErasureCodePluginJerasure.cc: prefer ++operators for non-primitive types +014f050 test/ObjectMap/KeyValueDBMemory.cc: use empty() instead of size() +d9fff40 (origin/wip-old-out) mon: restore previous weight when auto-marked out osd boots +87722a4 mon: remember osd weight when auto-marking osds out +45281d9 common/perf_counters: use atomics instead of a mutex +bf3ba60 atomic_t: add atomic64_t +b24b77a FileStore.cc: remove some dead assignments +39c071f (origin/wip-update-gitignore) .gitignore: ignore files generated by ctags on topdir +e847d56 add gitignore for wireshark subdir to track *.patch only here +b9cf708 .gitignore: add some patch/diff related files +f067013 .gitignore: add no longer used mkcephfs +ea69f6b cls_kvs.cc: return 'r' from get_idata_from_key() +574a940 cls_kvs.cc: remove dead assignment +36c1c97 rgw_user.cc: +a121d01 libcephfs.cc: fix possible NULL pointer deref +76568aa (origin/wip-8305) Objecter::_op_submit: only replace the tid if it's 0 +94773ac osd/OSD.cc: fix possible NULL pointer deref in share_map() +0d67f9b osd/ReplicatedPG: do not queue NULL dup_op +79c6491 mds/flock.cc: remove dead initialization of 'new_lock_end' +e8b4789 mds/flock.cc: remove dead initialization of 'new_lock_start' +5199c14 mds/Server.cc: remove unused initialization of 'destdnl' +63d92ab mon/OSDMonitor: force op resend when pool overlay changes +45e79a1 osd: discard client ops sent before last_force_op_resend +dd700bd osdc/Objecter: resend ops in the last_force_op_resend epoch +b3203e5 rbd.cc: remove used parameter from set_pool_image_name() +fe75075 test_librbd.cc: fix sizeof() in malloc call +eb2def8 CrushWrapper.cc: fix sizeof() call in calloc +11e5eef (origin/wip-5021) client: fix whitespace in stat relpath +cdbe6cf client: use __func__ instead of incorrect function name in insert_readdir_results +3eb2a77 client: make less noise when unlinking during readdir +d1c872d client: invalidate dentry leases when unlinking +d852a69 client: audit unlink() callers +3b867d3 TrackedOp: create an "initiated" event on construction +bdee119 msg: Fix inconsistent message sequence negotiation during connection reset +b5e4cd1 osd: fix MOSDMarkMeDown name +6b858be (origin/wip-8319) osd: handle race between osdmap and prepare_to_stop +b640301 osd: fix state method whitespace +ba01445 Fixed missing initializers issues +60b1071 Removed extra semicolons +5986f74 :doc Ceph OSD is standard name This is a method of standardizing the usage of OSD so that "Ceph OSD" is the daemon, and OSD maintains its industry standard usage of Object Storage Device. +ddc2e1a (origin/wip-8169) rgw: calculate user manifest +589b639 (origin/wip-7588) osd/ReplicatedPG: carry CopyOpRef in copy_from completion +db4ccb0 ReplicatedPG: block scrub on blocked object contexts +3152faf osd/osd_types: add last_force_op_resend to pg_pool_t +0f19626 (origin/wip-6966) ceph-disk: partprobe before settle when preparing dev +5690232 (origin/wip-da-sca-20140507) rbd-fuse.c: remove ridiculous linebreak +7a3724b rbd-fuse.c: fix indentation +8101f98 rbd-fuse.c: fix -Wmissing-field-initializers +65ca867 (origin/wip-krbd-fixes) krbd: fix sysfs path in the comment +f1d953e krbd: match new with delete, not free() +082367e rbd.cc: init 'snap_protected' to fix -Wconditional-uninitialized +0d01563 rbd-fuse.c: init 'rbd' in open_rbd_image() +cfc885f ObjectCacher::_wait_for_write(): init 'bool done' +8322878 Objecter::calc_target(): init best_locality with 0 +13750a1 (origin/wip-jcsp-clang) rgw: Remove trailing ; from fn definitions +447335a os/FileJournal: remove unused attribute +f0231ef mon: Fix % escaping (\% should be %%) +d85b8fa mds: Remove redundant 'using namespace std' +3fd8712 encoding: make .size() to __u32 cast explicit +6b15ce1 fragtree: remove unused and broken verify() +8584b40 fragtree: remove dead code +b4b79eb remove superfluous second semicolons at end of lines +1214257 msg: fix some -Wextra-semi warnings +9ad6042 crush/builder.c: remove some unreachable return statements +34e27e4 mds: remove unused MMDSCacheRejoin::{MISSING,FULL} +1f60060 mds: properly wake up dentry waiters after fragmenting dirfrag +5fa2bae mds: choose MIX state if replica of scatterlock is in MIX state +3ca0d01 mds: switch flushing ScatterLock to dirty ScatterLock after cache rejoin +8f3409d client: unlink dentry on traceless rmdir, unlink reply +627e644 client: do not manually clean up on unlink/rmdir +727ad64 client: refactor _lookup; fix NULL dentry case +635607f client: skip insert_trace on safe requests +f1d412c doc: Common graph used in 2 quick start files +d130763 vstart.sh: fix client admin socket path +0ee409b (origin/wip-7553) osd: Remove classic scrub code since Argonaut osd can't join +81c7418 ECUtil.h: clarify calculation with braces +13f54b7 PG::start_peering_interval: use check_new_interval for same_interval_since +5752d76 rgw_acl_swift.h: fix #define header guard +8059c9f rgw_rest_metadata.cc: fix -Wparentheses-equality +8a0c016 ReplicatedPG.cc: fix -Wparentheses +a0f59df test_rgw_manifest.cc: fix VLA of non-POD element type +817985b (origin/wip-fsx-krbd) test_librbd_fsx: align temporary buffers allocated in check_clone() +ab9de9c test_librbd_fsx: wire up O_DIRECT mode +c4a764c test_librbd_fsx: fix a bug in docloseopen() +421e6c5 test_librbd_fsx: add krbd mode support +d5daf71 test_librbd_fsx: add a flag to disable randomized striping +fef984b test_librbd_fsx: add holebdy option +d63808e test_librbd_fsx: make resizes sector-size aligned +3513ba0 test_librbd_fsx: use posix_memalign() to allocate aligned buffers +7df50ec test_librbd_fsx: align temp_buf by readbdy instead of writebdy +d13e32e test_librbd_fsx: move prterrcode() and simple_err() +8d41f86 test_librbd_fsx: update usage +99400f8 (origin/wip-da-cleanup-includes) osdmaptool.cc: cleanup included headers +a5e0d80 monmaptool.cc: cleanup included headers +537385c ceph_osdomap_tool.cc: cleanup included headers +d57561a ceph_monstore_tool.cc: cleanup included headers +e2e3d1d ceph_filestore_tool.cc: remove not needed includes +ea6df88 ceph_kvstore_tool.cc: cleanup includes +8620609 ceph_filestore_dump.cc: cleanup includes +16e86ae mon_store_converter.cc: remove not needed includes +2c33ace dupstore.cc: remove not needed include of +b1f4cd4 rest_bench.cc: remove not needed includes, re-order includes +bc166f3 psim.cc: remove not used includes +de252c1 scratchtool.c: remove not needed include of +4da8894 radosacl.cc: remove include of , re-order includes +24a047e ceph_conf.cc: cleanup includes, remove not needed headers +c0dcd23 ceph_authtool.cc: remove not needed includes +e2b4d41 ceph_monstore_tool.cc: remove not needed includes +8ab3232 rgw_admin.cc: remove twice included header, resort includes +ddb9ce0 MDSMonitor.cc: remove twice included header, resorted includes +a8a2b56 AuthMonitor.cc: remove twice included header, resorted includes +71b340a ceph_osdomap_tool.cc: remove some twice included headers +e66aec6 ceph_monstore_tool.cc: remove twice included headers +f9a91f2 Update doc to reflect the bahavior change for filestore_merge_threshold setting. +0d3cdb9 test/libcephfs/test.cc: free cmount structure before return +8fa5408 client: handle traceless rename in insert_trace, not verify_reply_trace +334c43f client: avoid blindly removing dentries +25d2469 client: leave NULL dentry in place on ENOENT during lookup +cc65c39 client: add debugging around traceless reply failures +545d8ad (origin/wip-8269) rgw: extend manifest to avoid old style manifest +9968b93 (origin/wip-8299) rgw: fix stripe_size calculation +6c2b173 mds: handle export freezen race +a09070a mds: allow negetive rstat +22abd7b mds: cancel fragmenting dirfrags when cluster is degraded +6e3501b mds: fix _rollback_repair_dir() +da17394 mds: fix root and mdsdir inodes' rsubdirs +5283d80 mds: ignore stale rstat/fragstat when splitting dirfrag +4e844c9 mds: encode dirfrag base in cache rejoin ack +f754106 mds: fix-up inode's fragstat/rstat according its dirfrags +a2caea7 mds: clear aborted flag before rollback slave requests +a85bf8c mds: remove mdsdir in the final step of shutdown MDS +c4f0f05 mds: tolerate bad sessionmap during journal replay +f386e16 mds: pre-allocate inode numbers less frequently +6d6d188 mds: fix frozen inode check in MDCache::handle_discover() +7a066f8 mds: include authpinned objects in remote authpin request +5b86a13 mds: send dentry unlink message to replicas of stray dentry +7d1fd66 mds: maintain auth bits during replay +09beebe (origin/wip-7157) ceph-disk: fix list for encrypted or corrupt volume +bd8e026 rgw: don't allow multiple writers to same multiobject part +03b0d1c (origin/wip-8289) rgw: cut short object read if a chunk returns error +2d5d309 Pipe: wait for Pipes to finish running, instead of just stop()ing them +6ec99f7 (origin/wip-rbd-clang) librbd: check return value during snap_unprotect +6f2edda ObjectCacher: remove useless assignment +3e387d6 (origin/wip-8296) osd/ReplicatedPG: fix whiteouts for other cache mode +5cc5686 (origin/wip-8170) rgw: send user manifest header field +e65a9da Revert "Fix installation into user home directory, broken by d3f0c0b" +b78644e (tag: v0.80) 0.80 +cdbbf86 doc: Fixed artifacts from merge. +a31b9e9 doc: Added sudo to setenforce. Restored merge artifact. +5158272 doc: Added erasure coding and cache tiering notes. Special thanks to Loic Dachary. +08a4e88 Variable length array of std::strings (not legal in C++) changed to std::vector +ae434a3 (origin/wip-8290) client: check snap_caps in Incode::is_any_caps() +4bf20af SimpleMessenger: Don't grab the lock when sending messages if we don't have to +b038f0c OSD: rename share_map_incoming and share_map_outgoing +e1277ba OSD: move the peer_epoch and map sharing infrastructure into OSDService +938feb4 OSD: move the {boot,up,bind} epochs into OSDService +2ec92c7 OSD: scan for dropped PGs in consume_map instead of advance_map +fccf1c7 OSD: do not take the pre_publish_lock in connection utility functions +fd2b57e OSD: enable ms_fast_dispatch +62b2d43 OSD: remove dead comment +9028f95 OSD: Juggle the locking when resurrecting a PG +5268e51 OSD: don't share_map_incoming() directly from handle_replica_op() +ebdc097 OSD: use the async workqueue to send OSDMap updates on dropped ops +6c98e36 OSD: add an op threadpool GenContext workqueue +9fba69a OSD: allow build_incremental_map_msg to fail on lookups +0ffdeab OSD: fix a few map sharing bugs +0fbaa16 OSD: move should_share_map and share_map_incoming to OSDService +399e67f OSD: pass a pointer to last_sent_epoch instead of the whole Session +c97f968 OSD: share map updates in the op_tp threads instead of the main dispatch thread +d78988b OSD: refactor handle_op error handling cases +276a4fe OSD: change Session handling around _share_map_incoming +1e3c495 OSD: add a Session::sent_epoch_lock +667769c OSD: simplify _share_map_incoming based on _should_share_map() +b53cec4 OSD: add _should_share_map function +b2187ac OSD: use an OSDMapRef& and require the Session* in _share_map_incoming +9835866 OSD: use safe params in map-sharing functions +b199194 OSD::send_incremental_map: use service superblock so we can avoid locking osd_lock +812c672 OSD::_share_map_incoming: pass osdmap in explicitly +2f97f47 OSD: protect state member with a Spinlock +a94a64d OSD: protect access to boot_epoch, up_epoch, bind_epoch +767e94a OSD: shard heartbeat_lock +9d8c797 OSD: Push responsibility for grabbing pg_map_lock up to callers of _remove_pg() +00d36f6 OSD: wake_pg_waiters atomically with pg_map update +3755318 OSD: remove wake_all_pg_waiters +eb30f88 OSD: add session waiting_for_map mechanisms +6d53349 OSD: pass osdmap to handle_op and handle_replica_op +475d831 OSD: add a RWLock pg_map_lock +5abbbfe OSDService: add osdmap reservation mechanism +09bf5e8 msgr: change the delay queue flushing semantics +69fc6b2 msgr: enable fast_dispatch on local connections +4e20ce1 Messenger,DispatchQueue: add ms_fast_dispatch mechanism +a62db61 DispatchQueue: factor out pre_dispatch and post_dispatch +1379c03 OSD: remove never-activated while loop from send_incremental_map +dd3d023 OSD: rename gen_wq, schedule_work, and PG_QueueAsync to include "recovery" +e0ac34a OSD: remove unused push_wq +ec16357 OSD: replace handle_pg_scan, handle_pg_backfill with handle_replica_op +63cc1ec OSD: add handle_osd_map debug output +37fac29 OSD::_share_map_incoming: line wrap debug output +78f310d PG: constify the init() function params +816b10e RWLock: assert pthread function return values +e2b62bc (origin/wip-messageless-tracker) TrackedOp: do not require a Message when creating new Ops +95fc551 TrackedOp: do not track a Message +5a3efda TrackedOp: introduce an _unregistered() function to let implementations clean up +2e674de TrackedOp: rename arrived_at to initiated_at, specify when constructed +6a559a5 TrackedOp: introduce a _dump_op_descriptor function +d7e04cc TrackedOp: remove the init_from_message function +fc3318e (origin/wip-doc-radosgw-80) doc: Fix hyperlink. +a7e7219 doc: Index update and librados. +fcbc5fa doc: Quotas for Admin Ops API. +e97b56e doc: New Admin Guide for Ceph Object Storage. +7539281 Fix installation into user home directory, broken by d3f0c0b +24c5ea8 osd: check blacklisted clients in ReplicatedPG::do_op() +f92677c (origin/wip-blacklist) osd: check blacklisted clients in ReplicatedPG::do_op() +c64b67b ceph-object-corpus: rebase onto firefly corpus +077e6f8 ceph-object-corpus: v0.80-rc1-35-g4812150 +8bd4e58 Fix out of source builds +3aee1e0 Fix clone problem +fd970bb (origin/wip-8155) mon: OSDMonitor: disallow nonsensical cache-mode transitions +72fdd55 (origin/wip-8283) osd/ReplicatedPG: fix trim of in-flight hit_sets +8472805 Revert "ReplicatedPG: block scrub on blocked object contexts" +f47f867 (origin/wip-8113) osd: Prevent divide by zero in agent_choose_mode() +b7d31e5 osd, common: If agent_work() finds no objs to work on delay 5 (default) secs +fe0031d (origin/wip-da-SCA-fixes-20140501) rados.cc: fix typo in help output +8bf039d Dumper::dump_entries(): reduce scope of 'got_data' +296b8ed PG::read_info(): pass 'const coll_t coll' by reference +8fad144 PGBackend::be_compare_scrubmaps(): pass pgid by reference +1e7eb1a osd_types.h: pass eversion_t by reference to operator<< +be5a99d SimpleLock.h: remove unused private function clear_more() +70a4a73 SimpleLock.h: remove twice included osd_types.h +4fe31c1 linux_fiemap.h: remove twice included int_types.h +b05e04e Dumper::dump_entries(): remove not needed variable +9a716d8 rgw_bucket.cc: return error if update_containers_stats() fails +89044a6 mon/PGMonitor: set tid on no-op PGStatsAck +4e0eaa9 mon/OSDMonitor: share latest map with osd on dup boot message +5a6ae2a mon/PGMonitor: set tid on no-op PGStatsAck +2e6b248 mon/OSDMonitor: share latest map with osd on dup boot message +77a6f0a mon/MonClient: remove stray _finish_hunting() calls +d024594 mailmap: Florent Bautista affiliation +61a2f06 mailmap: Warren Usui name normalization +7b192f7 mailmap: Guang Yang name normalization +4662890 sample.ceph.conf update: +9cf470c osd/ReplicatedPG: agent_work() fix next if finished early due to start_max +9f1a916 (origin/wip-snapmapper-debug) osd/SnapMapper: pass snaps set by const ref +6105c35 osd/SnapMapper: debug +f065809 (origin/wip-7576) mon/OSDMonitor: do not reply to MOSDMarkMeDown if ack is not requested +58ace1a osd: fix 'ack' to be 'request_ack' in MOSDMarkMeDown +49a3b22 osd: ignore MarkMeDown message if we aren't in PREPARING_TO_STOP state +cf25bdf osd: prevent pgs from getting too far ahead of the min pg epoch +81e4c47 osd: track per-pg epochs, min +c879e89 doc: Include links from hardware-recommendations to glossary Included :term: in parts of hardware-recommendations so that glossary links appear. Signed-off-by: Kevin Dalley +cc04322 (origin/wip-fix-master) mds: note MDiscoverReply encoding change in corpus +e597068 (origin/wip-mds-shutdown) mds: remove mdsdir in the final step of shutdown MDS +1f4a3e1 mds: bump protocol +1ac05fd doc/release-notes: changelog link +ffef20f doc/release-notes: final v0.67.8 notes and changelog +0454962 Fixes a very minor typo in the release notes +78b3c93 doc: documenting links to get-involved Create a link from documenting-ceph so that it is easy to find the github repository used for ceph. +0f3235d ReplicatedPG: block scrub on blocked object contexts +e66f2e3 ReplicatedPG: block scrub on blocked object contexts +4bac8c7 rados.h,ReplicatedPG: add CEPH_OSD_FLAG_ENFORCE_SNAPC and use on flush +d9106ce ECBackend::continue_recovery_op: handle a source shard going down +87195d5 ReplicatedPG: we can get EAGAIN on missing clone flush +d700d99 ReplicatedPG: do not preserve op context during flush +aafed10 rgw_common.cc: reduce scope of 'fpos' variable +49b810f rgw_admin.cc: remove unused string variable +b9e612c PGBackend.cc: remove unused to_remove variable +5fec86e KeyValueStore.cc: remove unused variable +7928fe7 rgw_op.cc: remove unused map variable +074161f rgw_main.cc: remove unused variable +ae9a7d0 rgw_main.cc: use static_cast instead of c-style +e624085 ObjectStore.h: pass const string parameter by reference +3ebbd99 CDentry.cc: fix bool comparison using relational operator +5da8e0e rados.cc: reduce scope of variable +b99f636 buffer.cc: catch exception by reference +022e705 SimpleLock.h: fix bool comparison using relational operator +46442ea hitset.cc: fix format string to unsigned int +ef0de7a OSDMap.cc: prefer prefix ++operator for non-trivial iterator +5562428 OSDMonitor.cc: prefer prefix ++operator for non-trivial iterator +e4b3109 KeyValueStore: rename s/logger/perf_logger/ +a84fed6 crush/mapper.c: fix printf format for unsigned variable +21bbdf5 (origin/wip-early-reply) mds: avoid adding replicas of target dentry to rename witnesses +3a7d668 mds: allow early reply when request's witness list is empty +41d93aa mds: include authority of the source inode in rename witnesses +68b440d (origin/wip-8147) osd: automatically scrub PGs with invalid stats +d01aa5b mon: OSDMonitor: return immediately if 'osd tier cache-mode' is a no-op +f689e5f (origin/wip-no-anchor) mds: remove discover ino +913a5dd mds: remove anchor table +8217600 (origin/wip-doc-radosgw) doc: Ensure fastcgi socket doesn't clash with gateway daemon socket. +9c9b92f doc: Verified RHEL configuration. +ec11bf7 doc: Fixed inconsistent header. +63b2964 doc: Added rhel-6-server-optional-rpms repo. +f674f36 Copy range using fiemap not entire length +3920f40 rbd-fuse: fix unlink +5d340d2 librbd: add an interface to invalidate cached data +e08b8b6 librbd: check return code and error out if invalidate_cache fails +b1df2c3 Changed the -i parameter to -r in order to avoid a conflict with a generic flag interpreted by the common code. +a027100 rgw: fix url escaping +9e3b860 (origin/wip-7500-wusui) Fix s3 tests in the rgw workunit. +3ec0040 Added a new command line parameter (-i or --image=) that allows rbd-fuse to specify a single image to be made available within the mount directory. The purpose of this is to allow a single RBD to be "mounted" in userspace without opening (and locking) the other RBDs in the pool. +060105c (origin/wip-8086) ReplicatedPG: we can get EAGAIN on missing clone flush +d83b8f5 ReplicatedPG: do not preserve op context during flush +a60e15a doc/release-notes: v0.67.8 notes +bcf92c4 (origin/wip-8202) rgw: fix url escaping +27ec495 Added Java Example +8f64b5c Update librados-intro.rst +3e41f92 (origin/wip-client-sleep) client: cleanup unsafe requests if MDS session is reset +70ab079 client: wake up cap waiters if MDS session is reset +b8aa58a client: drop dirty/flushing caps if auth MDS' session is reset +09a1bc5 client: add asok command to kick sessions that were remote reset +998b365 Changed the java code example +5d49782 (origin/wip-7966) mds: terminate readlink result in resapwn +d0f1806 (origin/wip-8193) ceph_test_rados_api_tier: increase HitSetTrim timeouts +9ac264a Skipping '_netdev' Debian fstab option +499adb1 (origin/wip-7941) rados.h,ReplicatedPG: add CEPH_OSD_FLAG_ENFORCE_SNAPC and use on flush +ddf37d9 (origin/wip-uselocalgithubforqemu-wusui) Use new git mirror for qemu-iotests +1885792 (origin/wip-8161) ECBackend::continue_recovery_op: handle a source shard going down +c0c2361 brag : implement --verbose on client +7009211 brag : document the zero argument behavior +2b16a81 brag : meaningfull error messages +83f8934 (origin/wip-8168) ReplicatedPG::do_osd_ops: consider head whiteout in list-snaps +39c1bfc ReplicatedPG::do_op: don't return ENOENT for whiteout on snapdir read +a83aff5 test_rbd.py: ignore children in cache pools +aae16ab mon: add ceph osd pool set auid +606e725 (origin/wip-7882-wusui) Support latest qemu iotest code +f631854 (origin/wip-libkrbd) rbd: deprecate --no-settle option +0c2b0fb doc: 'rbd showmapped' doesn't need privileges +4238ffd doc: do not mention modprobe in rbd docs +0ba3960 rbd: switch to libkrbd for 'rbd {map,showmapped,unmap}' operations +2521e73 mount.ceph: switch to module_load() +2651750 rbd: add libkrbd convenience library +bad34e9 (origin/wip-fs-client) client: check cap ID when handling cap export message +383d21d client: avoid releasing caps that are being used +d726251 (origin/wip-doc-cache-tier) doc: Fix hyperlink to CRUSH maps. +6902e22 doc: Added cache tiering settings to ceph osd pool set. +0d964bc doc: Added new cache tiering doc to index/TOC. +44e4e3d doc: Added new cache tiering doc to main docs. +2182815 (origin/wip-7439) ReplicatedPG: handle ec pools in mark_all_unfound_lost +6769f4d (tag: v0.80-rc1) 0.80-rc1 +245923e ReplicatedPG: enable mark_unfound_lost delete for ec pools +009e874 qa/workunits/rbd/copy.sh: skip some tests when tiering is enabled +c0bff43 qa/workunits/rbd/copy.sh: fix test +5daf538 ECBackend: use std::swap for boost::optional +ac9b461 common: add module_{load,has_parameter}() +944dd1c Makefile: build common/secret.c with libtool +070a820 configure: check for blkid/blkid.h header +9004049 rbd: use stringify() in options parsing routines +be081db stringify: use ostringstream instead of stringstream +cac15c7 (origin/wip-coverity-respawn) mds: make strncpy in ::respawn safer +b4eb502 (origin/wip-coverity) osd/osd_types: RWState: initialize snaptrimmer_write_marker +4e5f442 osdc/Objecter: drop unused field +124a663 doc/release-notes: a bit of prose about firefly +18aded2 (origin/wip-8139) osd/osd_types: pg_interval_t: include primaries in operator<< +931ae6b osd/osd_types: pg_interval_t: include up_primary in pg_interval_t +66170f3 osd/osd_types: pg_interval_t: dump primary +000233f osd: change in up set primary constitutes a peering interval change +5562e26 osd: use parent pgid (as appropriate) in generate_past_intervals() +025ab9f doc/release-notes: v0.80 +a80e66f qa/workunit/rbd/import_export.sh: skip list-objects tests with tiering +9d64ac6 qa/workunit/rbd/copy.sh: do not delete/recreate rbd pool +c3833d7 doc: Fixed syntax to include 'pool'. +8620bd2 PG::PriorSet: consider lost osds in up_now for pcontdec +95394b6 ReplicatedPG::do_op: check for blocked snapset obj +8259d87 ReplicatedPG: in trim, grab w locks on obc and snapset_obc +0d5a539 ReplicatedPG: if we get ENOENT on clone, remove clone from snapset +f3df501 ReplicatedPG: do not create whiteout clones +caa6356 ReplicatedPG,rados: add CEPH_OSD_[COPY_FROM]_MAP_SNAP_TO_CLONE +2cb0bac qa/workunits/cephtool/test.sh: make set pg_num test non-racy +506dce8 (origin/wip-8124) ReplicatedPG: do not use shard for hit_set object names +f7e7588 ReplicatedPG::agent_load_hit_sets: take ondisk_read_lock +16eccdd PG,PGLog: update hit_set during peering +5821cc7 osd/: propogate hit_set history with repop +7bb2011 encoding: use unqualified name for encode/decode in boost::optional encoding +e4a048c ECMsgTypes::ECSubWrite: fix at_version indentation +ddf1e98 osd: track the number of hit_set archive objects in a pg +1fb90c9 ReplicatedPG::hit_set_persist: clean up degraded check +95d0278 ReplicatedPG::mark_all_unfound_lost: delete local copy if necessary +61b6564 Simple mechanical cleanups +7a61cdb buffer: adjust #include order +f9e9365 (origin/wip-8153) Revert "ReplicatedPG::get_snapset_context: assert snap obj is not missing" +4413670 (origin/wip-throttle-snap-master) osd: throttle snap trimmming with simple delay +82edda2 test: handle the create-pg delay when testing cache split syntax +b2112d5 (origin/wip-7784) mon: OSDMonitor: HEALTH_WARN on 'mon osd down out interval == 0' +09985d2 (origin/wip-7997) mon: wait for PaxosService readable in handle_get_version +8fb2388 osd_types: pg_t: add get_ancestor() method +7e697b1 (origin/wip-8091) ReplicatedPG::recover_replicas: do not recover clones while snap obj is missing +3ad51c8 (origin/wip-num_objects_omap) osd_types::object_stat_sum_t: fix add/sub for num_objects_omap +3d0e80a (origin/wip-8048) osd/ReplicatedPG: check clones for degraded +93c0515 (origin/wip-8130) osdc/Objecter: fix osd target for newly-homeless op +881680e (origin/wip-8132) mon: set leader commands prior to first election +40e8dbb (origin/wip-poolset-noblock) mon: EBUSY instead of EAGAIN when pgs creating +f22e2e9 spelling corrections +18caa1c OSD: split pg stats during pg split +5e4a5dc osd_types::osd_stat_sum_t: fix floor for num_objects_omap +a3d452a common/obj_bencher: Fix error return check from read that is negative on error +4db1984 osd/ReplicatedPG: add missing whitespace in debug output +924064f (origin/wip-mds-op-prio) mds: dynamically adjust priority of committing dirfrags +0640a08 (origin/wip-8092) mds: fix cap revoke confirmation +8c7a5ab Use string instead of char* when saving arguments for rest-bench +0d2177a ReplicatedPG::get_snapset_context: assert snap obj is not missing +015df93 (origin/wip-8043) mon/OSDMonitor: require force argument to split a cache pool +c252345 (origin/wip-8108) osd: OSDMap: have osdmap json dump print valid boolean instead of string +aa6df59 (origin/wip-7699) mds: Fix respawn (add path resolution) +f6db1bc mds: share max size to client who is allowed for WR cap +358bde5 Add clone test on store_test +308758b Make rados/rest bench work for multiple write instances without metadata conflict. Signed-off-by: Guang Yang +9b7fa38 ReplicatedPG::process_copy_chunk: don't check snaps if we got head +43b7c3a ReplicatedPG::finish_promote: soid.clone may have been trimed, fix assert +3f7861e ReplicatedPG::agent_work: skip if head is missing +d39e003 ReplicatedPG::cancel_flush: requeue dup_ops even if !op +edda6f7 ReplicatedPG::_rollback_to: fix comment, clone certainly could be missing +37ed4b6 (origin/wip-stress-watch) ceph_test_stress_watch: test over cache pool +d0a7632 (origin/wip-strerror) Use cpp_strerror() wherever possible, and use autoconf for portability +502cc61 ReplicatedPG::agent_work: skip hitset objects before getting object context +0d4aed8 mon: fix Session ref leak in handle_get_version +d563434 doc: Distro specific rgw.conf example. +bd22cac doc: Distro specific rgw.conf example. +75606e9 doc: Created standalone doc for Keystone Integration. +6650c0e doc: Added new docs to index. +1310af2 doc: Reworked the simple configuration guide to be more generic. +6853d21 doc: New admin guide for Ceph Object Gateway. Needs some clarification (todo). +e02b845 doc: Admin API usage for quotas. Needs additional clarification on syntax. +d0d162a (origin/wip-8097) buffer: use Mutex instead of Spinlock for raw crcs +7c17fc4 mds: don't modify inode when calculating client ranges +65ec24e (origin/wip-client-debug) client: print inode max_size +d6c71b7 osd/ReplicatedPG: add missing whitespace in debug output +171d5c5 (origin/wip-librados-tests) ceph_test_rados_api_*: fix build warnings, memset ranges +8905e3e (origin/wip-8089) osd/ReplicatedPG: handle dup ops earlier in do_op +26659a5 mds: don't issue/revoke caps before client has caps +bd8aa6f mds: do file recover after authpin inode +a72bcdd (origin/wip-8085) osd/ReplicatedPG: handle misdirected do_command +4ccc845 (origin/wip-mds-typo) mds: fix typo in Server::do_rename_rollback() +809d0fa (origin/wip-hitset-missing) osd/ReplicatedPG: handle missing hit_set on HITSET_GET rados op +53a4b71 ceph_test_rados_api_watch_notify: test over cache pool +b31107b test/librados/TestCase: add Param option that can set up a cache pool +3ce4078 (origin/wip-7940) test: Add --pool-snaps option to ceph_test_rados +09b5538 test: Fix ceph_test_rados to not core dump with invalid arguments +b6b0c3b librados: Add ObjectWriteOperation::snap_rollback() for pool snapshots +6e0496b librados: Rollback interface additions +6ff645f (origin/wip-8008) osd/PG: fix repair_object when missing on primary +19acfeb (origin/wip-8063) ceph_test_librados_tier: tolerage EAGAIN from pg scrub command +39b9d9d (origin/wip-osd-boot) mon/OSDMonitor: fix osd epoch in boot check +78df66f (origin/wip-8077) osd/ReplicatedPG: skip missing hit_sets when loading into memory +7077438 (origin/wip-8054) mds: finish table servers recovery after creating newfs +052519e Revert "mds: finish table servers recovery after creating newfs" +82d8397 (origin/wip-5170-firefly) rgw: update bucket / object rewrite +6f2ee99 radosgw-admin: add some conditions for bucket rewrite +9130e7d radosgw-admin: new 'bucket rewrite' command +f12bccc radosgw-admin: check params for object rewrite +ad40356 Included the total cluster size in components_count object +78fcb1a Fetching the date from ceph osd dump as that is more reliable across ceph versions +99d74ee doc: Add additional information over CloudStack and RBD +db3e0b5 erasure-code: document the ruleset-root profile parameter +6d42bd9 While generating crush_types, avoiding item parsing, and calculating type count by just iterating thorugh buckets list +1987832 Bug fix in the way crush_type is extracted from osd crush dump +072d371 (origin/wip-lockdep) RWLock: make lockdep id mutable +da0d382 Revert "RWLock: don't assign the lockdep id more than once" +632098f common_init: remove dup lockdep message +3c54a49 Wordsmith the erasure-code doc a bit +f6c2073 mds: finish table servers recovery after creating newfs +3db7486 mds: issue new caps before starting log entry +07e8ee2 (origin/wip-7437) test: Add EC testing to ceph_test_rados_api_aio +69afc59 test: Add multiple write test cases to ceph_test_rados_api_aio +d99f1d9 test, librados: aio read *return_value consistency, fix ceph_test_rados_api_aio +3d290c2 test: Add EC unaligned append write test to ceph_test_rados_api_io +39bf68c pybind, test: Add python binding for append and add to test +d211381 pybind: Check that "key" is a string +9812720 librados, test: Have write, append and write_full return 0 on success +008663a (origin/wip-7499) rgw, radosgw-admin: bucket link uses bucket instance id now +6ce7116 (origin/wip-7786) civetweb: update subproject +43d837d rgw: radosgw-admin object rewrite +4c99e97 (origin/wip-8062) mon/OSDMonitor: ignore boot message from before last up_from +a8f0953 osd/ReplicatedPG: adjust obc + snapset_obc locking strategy +86b8594 (origin/wip-6789) mon: Monitor: suicide on start if mon has been removed from monmap +02048dc mds: guarantee message ordering when importing non-auth caps +ac51fca mds: include truncate_seq/truncate_size in filelock's state +808ba13 mds: remove wrong assertion for remote frozen authpin +860d727 osdc/Objecter: move mapping into struct, helper +18642ed (origin/wip-8042) mon: tell peers missing features during probe +39ca440 mon: move required_features back into Monitor +c8039ab mon: ignore sync clients without required_features +50ed65f (origin/wip-6480) auth: remove unused get_global_id() method +b297689 auth: make AuthClientHandler::validate_ticket() protected +3ccef66 auth: AuthClientHandler const cleanup +9af10b2 auth: CephxProtocol const cleanup +7594835 utime: declare is_zero(), ceph_timespec(), and sleep() as const +3119022 auth: separate writes of build_request() into prepare_build_request() +970d53f RWLock: make read locking methods const +957ac3c RWLock: don't assign the lockdep id more than once +4d3d89b auth: remove unused tick() method +2cc76bc auth: add rwlock to AuthClientHandler to prevent races +2e8035f osd: Fix appending write to return any error back to caller +3371a25 test: Fix Seg fault in ceph_test_rados +edd542e tools: Improve ceph_scratchtoolpp +34d69cd mon: refresh elector required_features when they change +b3b502f mon/Elector: ignore ACK from peers without required features +f1c6b65 (origin/wip-8028) ceph.spec.in: require redhat-lsb-core +ae09361 mailmap: Yan, Zheng name normalization +5ee0b7b mailmap: Nikola Kotur affiliation +02aedbc (origin/wip-8004) client: wake up umount waiter if receiving session open message +409999c rbd: Prevent Seg fault by checking read result in snap_read_header() +9c6733e librados: Allow rados_pool_list() to get NULL buffer if len == 0 +1848a23 librados: Fix typo for read functions documentation +a8330f5 (origin/wip-5469) librbd: fix zero length request handling +22a0c1f (origin/wip-8045) osd: do not block when updating osdmap superblock features +43f0519 doc: Made minor changes to quick start preflight for RHEL. +ab7a25c doc: Notes and minor modifications to gateway installation doc. +1d74170 pipe: only read AuthSessionHandler under pipe_lock +084db49 (origin/wip-die-mkcephfs) remove mkcephfs +277e7ac (origin/wip-5835) debian: update ceph description +72dc732 ceph.spec: update ceph description +79ac2f7 (origin/wip-8001) osd/PG: set CREATING pg state bit until we peer for the first time +4de49e8 (origin/wip-8019) os/FileStore: reset journal state on umount +1cdb738 vstart.sh: make crush location match up with what init-ceph does +d2edd9c (origin/wip-8031) osd: drop unused same_for_*() helpers +5d61161 osd: drop previous interval ops even if primary happens to be the same +d3833dd osd: make misdirected checks explicit about replicas, flags +55cfb14 (origin/wip-8026) mds: fix shared_ptr MDRequest bugs +2ba00bd (origin/wip-7914) erasure-code: thread-safe initialization of gf-complete +0022d91 mailmap: Paul Meserve affiliation +f261ad1 mailmap: Michael Nelson affiliation +89a5ec7 mailmap: Sandon Van Ness name normalization +010dff1 osd_types: fix pg_stat_t::encode, object_stat_sum_t::decode version +22894c3 (origin/wip-4354-shared_ptr) SimpleLock: Switch MutationRef& for MutationRef in get_xlock() +5f2ccab MDCache: use raw MutationImpl* instead of MutationRef in a few places +6c3fc3e Locker: use raw MutationImpl* instead of MutationRef in several places +920fd6c Locker: use a null_ref instead of NULL +099d1d6 Locker: Use MutationRef instead of raw pointers +e800bfa Locker: remove Mutation param from xlock_import +1294e55 MDCache: fix users of active_requests for use of shared_ptr +a5c7b27 MDCache: use a null_ref instead of NULL in a few places +6b76998 MDCache: use MutationRef instead of raw pointers +a6a0800 Server: use MutationRef instead of raw pointer +4dedab6 MDS: switch cache object classes to use MutationRef instead of raw pointers +9a4a429 ceph_test_rados_api_misc: print osd_max_attr_size +4b66868 doc: Removed --stable arg and replaced with --release arg for ceph-deploy. +7273d9e (origin/wip-7975) osd/ReplicatedPG: warn if invalid stats prevent us from activating agent +02d7e84 osd/ReplicatedPG: dump agent state on pg query +fa46aec osd/ReplicatedPG: kickstart the agent if scrub stats become valid +07099ec (origin/wip-8003) ReplicatedPG: do not evict head while clone is being promoted +67b2342 ReplicatedPG::trim_object: account evicted prev clone for stats +6ff6c19 ReplicatedPG::make_writeable: check for evicted clone before adjusting for clone_overlap +a8a49a0 ReplicatedPG: use get_clone_bytes on evict/promote +3286283 ReplicatedPG::_scrub: account for clone_overlap on each clone +4d5db06 ReplicatedPG::find_object_context: check obs.exists on clone obc before checking snaps +d0e2c98 ReplicatedPG::finish_promote: add debugging assert for clone_size +e213ee1 (origin/wip-7919) qa: workunits: mon: auth_caps.sh: test 'auth' caps requirements +85a1cf3 mon: MonCommands: have all 'auth' commands require 'execute' caps +4c2d73a (tag: v0.79) 0.79 +51da3bb mds: fix uninit val in MMDSSlaveRequest +09586ec (origin/wip-shrink-icache) client: pin parent dentry of inode who has ll_ref > 0 +76cbd5d mds: fix uninit MMDSSlaveRequest lock_type +4ea9e48 (origin/wip-8002) osd: fix map subscription in YOU_DIED osd_ping handler +2f7522c msgr: add ms_dump_on_send option +87e6a62 mds: fix uninitialized fields in MDiscover +67fd421 mon: wait for quorum for MMonGetVersion +a75af4c client: try shrinking kernel inode cache when trimming session caps +82015e4 (origin/wip-7958) client: release clean pages if no open file want RDCACHE +9484daf osd: disable agent when stats_invalid (post-split) +232ac1a (origin/wip-7994) OSD: _share_map_outgoing whenever sending a message to a peer +6f40b64 (origin/wip-7993) ceph-post-file: use getopt for multiple options, add longopts to help +2f6a62b (origin/wip-7992) ceph-post-file: fix installation of ssh key files +e02b7f9 (origin/wip-7983) osd/ReplicatedPG: do not hit_set_persist while potentially backfilling hit_set_* +4aef403 doc/release-notes: note about emperor backport of mon auth fix +db266a3 mon: MonCommands.h: have 'auth' read-only operations require 'x' cap +9caf3db Migrator: use a null ref instead of NULL when calling into path_traverse +0c9af93 Migrator: use MDRequestRef and MutationRef instead of raw pointers +3429dc5 SimpleLock: use MutationRef instead of raw pointers +c09878e Mutation: move self_ref into MutationImpl instead of MDRequestImpl +3be138f Mutation: rename to MutationImpl and define MutationRef +f41a2f8 Locker: use MDRequestRef instead of MDRequest* +5872c2d MDCache: use MDRequestRef instead of MDRequest* +565b2c8 Server: Use MDRequestRef instead of raw pointers +90ceb7c MDS: Convert the request_start* functions and their immediate callers +f773307 mds: MDRequest: rename to MDRequestImpl, and declare MDRequestRef +fd235cd include/memory: add static_pointer_cast +d121678 client: fix null pointer dereference in Client::unlink +f68e60e ObjectCacher: assert no waiter when remove buffer head +4be0b6b client: cleanup Client::_invalidate_inode_cache() +abc19dd client: drop Fr cap before gettattr CEPH_STAT_CAP_SIZE +954007e client: properly retain used caps +2d5bd84 client: assign implemented caps to caps field of MClientCaps +1538a98 client: hold Fcr caps during readahead +701c22a client: implement RDCACHE reference tracking +b219c8f (origin/wip-cache-create-fix) ReplicatedPG: fix CEPH_OSD_OP_CREATE on cache pools +be8b228 (origin/wip-7922) osd: Send REJECT to all previously acquired reservations +18201ef doc/release-notes: v0.79 release notes +4dc6266 Fix byte-order dependency in calculation of initial challenge +6cb50d7 (origin/wip-7964) ReplicatedPG::_delete_oid: adjust num_object_clones +0f2ab4d ReplicatedPG::agent_choose_mode: improve debugging +0552ecb (origin/wip-7978) rgw: only look at next placement rule if we're not at the last rule +eb23ac4 ReplicatedPG::agent_choose_mode: use num_user_objects for target_max_bytes calc +cc9ca67 ReplicatedPG::agent_choose_mode: exclude omap objects for ec base pool +a130a44 osd/: track num_objects_omap in pg stats +9894a55 ReplicatedPG: handle FLAG_OMAP on promote and copyfrom +a11b3e8 (origin/wip-7858) ReplicatedPG::do_op: use get_object_context for list-snaps +78e9813 ReplicatedPG: do not create snapdir on head eviction +31df91e (origin/wip-backfill) osd: add 'osd debug reject backfill probability' option +d323634 (origin/wip-test-alloc-hint-ec-fix) qa: test_alloc_hint: set ec ruleset-failure-domain to osd +8e46fe0 (origin/wip-vstop-unmap) stop.sh: unmap rbd images when stopping the whole cluster +afc5dc5 stop.sh: do not trace commands +0110a19 stop.sh: indent 4 spaces universally +e4a8535 (origin/wip-vstart-erasure-code-default) vstart: set a sensible default for ruleset-failure-domain +c43822c (origin/wip-7965) lockdep: reset state on shutdown +7a49f3d lockdep: do not initialize if already started +6bf46e2 (origin/wip-7915) OSDMap: bump snap_epoch when adding a tier +01445d5 (origin/wip-7937) ReplicatedPG::_scrub: don't bail early for snapdir +5f680f9 (origin/wip-7659) ReplicatedPG::_verify_no_head_clones: missing implies that the clone exists +7909262 (origin/wip-init) debian: fix control to allow upgrades +17732dc debian: move rbdmap config and sysvinit/upstart scripts into ceph-common +1d42de5 init.d: correcting rbdmap init order: +771e88a (origin/wip-dirfrag) mds: fix check for merging/spliting dirfrag +43bc39b (origin/wip-largedir2, origin/wip-largedir) mds: ignore CDir::check_rstats() when debug_scatterstat is off +5a9b99a mds: initialize bloom filter according to dirfrag size +16af25f mds: add dentries in dirfrag to LRU in reverse order +06ecb2c mds: handle freeze authpin race +d1967f3 mds: treat cluster as degraded when there is clientreplay MDS +b65a818 mds: don't start new segment while finishing disambiguate imports +ff44a99 mds: trim non-auth subtree more aggressively +c09f58e (origin/wip-7450) radosgw-admin: don't always generate access key for subusers +e1783a6 rgw: subuser creation can be idempotent +f54c684 radosgw-admin: fix subuser modify +e095b1d debian: make ceph-common own etc/ceph, var/log/ceph +d4d39a0 (origin/wip-7907) osd/ReplicatedPG: mark_unrollbackable when _rollback_to head +1acd547 debian: move ceph-rest-api from ceph-common to ceph +a76a129 (origin/wip-7939) PG: set role for replicated even if role != shard +ef94fcd test: Add EC testing to ceph_test_rados_api_snaphots +1871fe7 test: Add EC testing to ceph_test_rados_api_lock +759878c test: Add EC testing to ceph_test_rados_api_tier +38b9fe7 test: Add EC to ceph_test_rados_api_watch_notify +6cedfac test: Add EC testing to ceph_test_rados_api_stat +7ccf412 test: Add EC testing to ceph_test_rados_api_list +ea26e13 test: Add EC testing to ceph_test_rados_api_io +9bd5821 test: Add EC test classes RadosTestEC and RadosTestECPP +a4da24d test: Fix ceph_test_rados_list_parallel to clean up test pool +966480b test: Fix ceph_test_rados_api_aio to clean up all test pools +74ed448 test: Cleanup pools when FlushWriteRaces is done +c106976 librados: Add missing C variants for alignment +2d7da1d librados: Add missing rados_wait_for_latest_osdmap() +dde1c91 osd/ReplicatedPG: continue scrub logic when snapset.head_exists doesn't match +c2e5a42 osd/ReplicatedPG: handle snapdir properly during scrub +ed5a5e0 (origin/wip-7935) rgw: reverse logic to identify next part +48fbce9 (origin/wip-7916) ReplicatedPG: improve get_object_context debugging +5c9b8a2 osd/PG: debug cached_removed_snaps changes +824da20 librbd: skip zeroes when copying an image +e44f85c qa/workunits/cephtool/test.sh: test 'osd pg-temp ...' +2d4ec6a mon/OSDMonitor: clear primary_temp on osd pg_temp updates +255f840 OSDMonitor: add 'mon osd allow primary temp' bool option +63ac079 OSDMonitor: add 'osd primary-temp ...' command +07dcffa OSDMonitor: add 'osd pg-temp ...' command +d3183e3 java/test: ceph.file.layout xattr is still not there now +cd1a9c4 Add ceph-client-debug and jerasure shared objects to RPM spec file. +81853c6 (origin/wip-7912) mon/PGMap: clear pool sum when last pg is deleted +8c761c4 (origin/wip-ec-profile-idempotent) mon: make 'ceph osd erasure-code-profile set ...' idempotent +7d321d8 qa/workunits/rados/test_alloc_hint: fix erasure syntax +2826fda doc: fix typos in glossary +7fa025e .gitignore: add examples/librados files +14418a2 autotools: s/ssse3/sse3/ typo +1c92453 erasure-code: update jerasure / gf-complete submodules +ff51d3f doc: pgbackend dev doc outdated notice +d5973aa doc: update jerasure plugin +402e104 doc: erasure code developer notes updates +74fa3a7 (origin/wip-fuse-access) fuse: implement 'access' low level function +e672c52 osd/ReplicatedPG: fix cache tier scrub again +ea47b4a ceph_test_rados_api_tier: improve promote+scrub test +fc1a424 (origin/wip-7849) ceph-conf: use global_pre_init to avoid starting logging +98551fc global: separate first half of global_init into global_pre_init +c3292e4 (origin/wip-cache-scrub) ceph_test_rados_api_tier: improve cache tier + scrub test +cfd6f23 osd/ReplicatedPG: tolerate trailing missing clones on cache tiers +b8ea656 java/test: ceph.file.layout xattr is not there now +4f9f7f8 qa/workunits/fs/misc/layout_vxattrs: ceph.file.layout is not listed +b71e64d mds: find approximal bounds when adjusting subtree auth +fd28ad5 doc: erasure-code development complete +399de24 (origin/wip-sse-i386) erasure-code: do not attempt to compile SSE4 on i386 +07ccc4e mds: commit new dirfrag before splitting it +bd6e35c rbd.cc: yes, cover formatted output as well. sigh. +780fa91 Revert "ceph-conf: do not log" +b5a6320 Revert "ceph-conf: no admin_socket" +44afc23 init: fix OSD startup issue +fd76fec rbd.cc: tolerate lack of NUL-termination on block_name_prefix +056151a (origin/wip-7888) mon/MonClient: use keepalive2 to verify the mon session is live +d747d79 msgr: add KEEPALIVE2 feature +1aa1d93 (origin/wip-7904) ReplicatedPG: hit_set_setup, agent_setup, skip if !active +f1c7b4e (origin/wip-7867) client: pin Inode during readahead +032d4ec osdc/ObjectCacher: call read completion even when no target buffer +68dc0c6 (origin/wip-7903) rgw: move max_chunk_size initialization +a6be1d6 PG: always clear agent_state in clear_primary_state +dfd3cb5 rgw: only look at prefetched data if we actually prefetched +d78e678 (origin/wip-7902) osd/PG: fix choose_acting revert to up case +0bb911c mds: don't trim non-auth root inode/dirfrag +90b4e53 mds: include authority of the overwrited inode in rename witnesses +367987f mds: don't increase nlink when rollback stray reintegration +79aa26f mds: allow sending MMDSFindIno to MDS who is in clientreplay state +34ef91a mds: fix negative dirstat assertion +ce93616 mds: fix stack overflow caused by nested dispatch +71fa779 mds: don't clear scatter dirty when cache rejoin ack is received +fbf4fbc mds: explicitly set nonce for imported dirfrag +d14ec95 mds: skip non-opened session when flushing client sessions +fb19100 mds: fix null pointer dereference in MDCache::rejoin_send_rejoins() +ed49d5e mds: journal EFragment::OP_COMMIT before drop locks +1bd575e mds: fix CInode::get_approx_dirfrag +a1f5c64 mds: don't trim ambiguous import dirfrags +598c5f1 mds: trim empty non-auth dirfrags +3c6c712 mds: trim non-auth inode with remote parents +e811b07 mds: properly journal fragment rollback +6a548a9 mds: fix CDir::WAIT_ANY_MASK +e535f7f mds: avoid journaling non-auth opened inode +ffcbcdd mds: handle race between cache rejoin and fragmenting +6963a8f mds: handle interaction between slave rollback and fragmenting +72eaa5e doc: fix typos in tiering dev doc +1b5e8f4 (origin/wip-7880) mds: properly propagate dirty dirstat to auth inode +38d4c71 Pipe: rename keepalive->send_keepalive +c64d03d mon/OSDMonitor: require OSD_CACHEPOOL feature before using tiering features +69321bf mon/OSDMonitor: prevent setting hit_set unless all OSDs support it +eb71924 osd/ReplicatedPG: tolerate missing clones in cache pools +6508d5e osd/ReplicatedPG: improve clone vs head checking +9e2cd5f osd/ReplicatedPG: do not assert on clone_size mismatch +7f026ba ceph_test_rados_api_tier: scrub while cache tier is missing clones +7cb1d3a (origin/wip-fix-pools) qa/workunits/mon/pool_ops.sh: fix test +233801c qa/workunits/mon/pool_ops.sh: use expect_false +72715b2 (origin/wip-7849-b) ceph-conf: no admin_socket +fb20823 jerasure: fix up .gitignore +acc31e7 ceph-conf: do not log +ffd69ab (origin/wip-7876) rgw: use s->content_length instead of s->length +501e31d logrotate: do not rotate empty logs (2nd logrotate file) +91176f1 erasure-code: test encode/decode of SSE optimized jerasure plugins +b76ad97 erasure-code: test jerasure SSE optimized plugins selection +30e7140 osd: increase osd verbosity during functional tests +10fd6b3 erasure-code: SSE optimized jerasure plugins +e9878db arch: add SSE3, SSSE3, SSSE41 and PCLMUL intel features +c07aedb autotools: intel cpu features detection +cc0cc15 erasure-code: gf-complete / jerasure modules updates +12d4f38 erasure-code: allow loading a plugin from factory() +506d2bb logrotate improvement: do not rotate empty logs +dc3ce58 osd: do not make pg_pool_t incompat when hit_sets are enabled +92859ed (origin/wip-7837) ReplicatedPG: include pending_attrs when reseting attrs in WRITEFULL +b6a431b (origin/wip-7874) ReplicatedPG: disable clone subsets for cache pools +56974b9 (origin/wip-7860) test: Wait for tier removal before next test starts +7999bc9 (origin/wip-7828) ReplicatedPG:: s/_delete_head/_delete_oid, adjust head_exists iff is_head +9865409 rgw: configurable chunk size +832c007 (origin/wip-7871) RadosModel: allow --no-omap to be specified seperately from --ec-pool +555ae12 (origin/wip-7870) ReplicatedPG::do_osd_ops: only return ENOTSUP on OMAP write ops +6cb8595 (origin/wip-7835) ReplicatedPG::make_writeable: fill in ssc on clone +21fc535 (origin/wip-7823) osd: trim copy-get backend read to object size +18c3e9e osd: fix tests due to no default erasure-code ruleset +29f7420 Revert "osd: create the erasure-code ruleset in OSDMap::build_simple" +4cf9a73 fix bug in 'defaultweight' calculation on OSD start. +2779e2a (origin/wip-7863-wusui) Make sure s3_utilities are found. +38bcd3c osd: start_flush() should check for missing clones and return if requested +bf87562 osd: Error from start_flush() not checked in agent_maybe_flush() +ed43aa0 osd: Add logging of missed l_osd_agent_skip cases +d1d99df osd: Improve logging output including pg_shard_t as osd#(shard) +4ac7808 minor corrections to package descriptions +012bb5f minor init.d scripts lintianisation: +14b743b (origin/wip-7676-firefly) rgw: don't modify rgw_bucket for data extra pool +7989cbd rgw: multipart meta object uses extra data pool +f023f90 rgw: zone placement info includes extra data pool +3677076 rgw: add data_extra pool to bucket +58ef0da mailmap: Inktank jenkins bot +286131e mailmap: Huang Jun name normalization +0160d19 mailmap: Tyler Brekke name normalization +a310ea2 mailmap: Guang Yang affiliation +14921c7 mailmap: James Ryan Cresawn affiliation +2faf271 mailmap: Mohammad Salehe affiliation +27c28ad mailmap: Sharif Olorin affiliation +9fd61c7 mailmap: Stephan Renatus affiliation +01b9966 (origin/wip-dz-watch-test) qa: Add ceph_multi_stress_watch for rep and ec +6ec28fd (origin/wip-6465) ensure pybind is in the PYTHONPATH +37899fa be nitpicky about missing references +4186916 Revert "erasure-code: gf-complete detects SSE at runtime" +3f014da (origin/wip-status-function-names) mon: Monitor: s/_mon_status()/get_mon_status()/ +ed780ad mon: Monitor: s/get_status()/get_cluster_status()/ +08a3d6b (origin/wip-listxattr) client: don't include ceph.{file,dir}.layout vxattr in listxattr() +1bc680e erasure-code: deactivate SSE optimizations +8116394 (origin/wip-7827) msg: set recv stamp for local delivery +3ebeb8e mailmap: Allen Samuels affiliation +a217cd6 mailmap: Warren Usui is with Inktank +a4c652c document adding dev key for custom Apache/FCGI install +fb72330 (origin/wip-7810) mds: reset connection priv after connection's session is removed +e4f2d9f doc/release-notes: 0.78 final notes +185bcc4 doc/release-notes: final 0.78 +1817c23 rgw: get rid of a memory allocation +1e7cd10 rgw: remove memory allocation +f6c746c (tag: v0.78) 0.78 +28d8e7f Revert "ReplicatedPG: disallow trans which atomically create and remove an object" +49a0190 doc/release-notes: 0.78 notes +dbcf447 erasure-code: gf-complete detects SSE at runtime +8c7f6c1 autotools: AX_SSE detects the compiler SSE capabilities +5a3f6c7 (origin/wip-7438) test: Add erasure coding to stress watch test +6fb6588 test: Reorg multi_stress_watch to prepare for ec option +b110275 test: Fix ceph_filestore_dump.sh test for new EC pool creation +dad0faf tests: use ^ instead of ! as invalid char +d4d77d7 doc/release-notes: stop confusing sphinx +78ede90 (origin/wip-7780) objecter: waive OSDMAP_FULL check for MDS +a4849fb (origin/wip-flush-journal-asok) qa: test_alloc_hint: flush journal before prodding the FS +9d31c1b osd: add flush_journal admin socket command +b444e88 (origin/wip-multimds-fixes) mds: fix typo in MDCache::handle_cache_rejoin_strong +ddbb2f7 (origin/wip-jerasure-submodules) erasure-code: add gf-complete / jerasure submodules +5c34a0f erasure-code: remove copy of gf-complete / jerasure +0d167d2 mds: fix NULL pointer dereference in Server::handle_client_rename +272b53b mds: avoid infinite loop in MDLog::submit_entry() +3cadbfb mds: fix potential invalid pointer dereference +91c88c1 mds: rdlock dirfragtree lock when renaming directory +a867166 mds: don't mark scatter locks dirty when dirfrag is dirty +5150fe6 mds: trim other MDS' mdsdir during recovery +150c6ce mds: remove wrong assertion +de461a9 fragtree_t: fix get_leaves_under() +cbd1c44 mds: improve success rate of subtree exporting +3c39d6f mds: cleanup CInode::decode_import() +4973560 mds: export file locks together with inode +dc54b7b mds: re-issue caps after importing caps (rename) +b225ca9 mds: fix open remote dirfrag deadlock +dc52581 mds: properly initialize MDCache::fragment_info_t +ed30b83 mds: avoid issuing zero caps to client +e909eaf mds: drop auth pins before waiting for dir unfreeze +bc3325b mds: fix stack overflow caused by nested dispatch +63a597b mds: rollback slave request after slave prepare is journalled +a1ff489 mds: treat flushing as dirty when rejoining scattered locks +1268dbb (origin/wip-tid_t) Change tid_t to ceph_tid_t to avoid conflicts with a popular type +b227426 (origin/wip-no-version) Add NO_VERSION to avoid rebuilding ceph_ver.h and relinking +cfb04b2 (origin/wip-limit-libkeyutils) Makefiles: remove libkeyutils from every binary except two +e9eb641 remove gf-complete / jerasure sub modules +fdcf3eb (origin/wip-7777) ReplicatedPG::do_op: delay if snapdir is unreadable +7f7a998 (origin/wip-7708) mds/Locker: fix null deref on cap import +4221e0d build: add gf-complete/jerasure to gitmodule_mirrors +25d04fb (origin/wip-pq) osd: dump priority queue state on dequeue at level 30 +ff11965 osd: fix OpWQ dump locking +4a3464c common/PrioritizedQueue: include first item's cost in dump +de576d5 common/PrioritizedQueue: constify a few things +8bd8944 common/PrioritizedQueue: fix remove_by_class() corner case +f1e3bc9 doc/dev/cache-pool: describe the tiering agent +d728426 (origin/wip-7733) PG::start_peering_interval: always send_notify if !primary +b4420ff (origin/wip-7755) PG::find_best_info: fix log_tail component +1ddae7e erasure-code: jerasure and gf-complete moved to ceph namespace +01a0f2d (origin/wip-6806) mon: OSDMonitor: don't rely on client-side validation for command arguments +074c880 mon: Monitor: handle invalid 'quorum' command argument +652056e mon: Properly handle errors from 'cmd_getval()' when needed +543c642 erasure-code: disable SSE extensions +1c5411a erasure-code: update gf-complete v1 submodule +d5e38d4 erasure-code: update jerasure v2 submodule +eac224a doc: update the erasure-code dev documentation +b273011 osd,mon: use profile instead of properties +8cf85f0 mon: add osd crush create-erasure functional tests +b85330e osd: create the erasure-code ruleset in OSDMap::build_simple +5c1db3b osd: create erasure_code_profile in OSDMap::build_simple +f8aa1ed mon: set the profile and ruleset defaults early +5774344 mon: add crush ruleset name to osd pool create +4f1b372 osd: use erasure code profile when building the PGBackend +173e958 mon: OSDMonitor use erasure_code_profile instead of properties +063de51 osd: obsolete pg_pool_t properties with erasure_code_profile +04d2fd1 mon: add the erasure-code-profile {set,get,rm,ls} MonCommand +fa1d957 mon/Paxos: commit only after entire quorum acks +aed0744 (origin/wip-7738) os/FileJournal: return errors on make_writeable() if reopen fails +c31f38c (origin/wip-7728) ReplicatedPG: if !obc->obs->exists, lock snapdir obc if exists +9ee1084 ReplicatedPG: disallow trans which atomically create and remove an object +f094400 Add file to store mirror location of module's. +a9f8a9e (origin/wip-cli-err) ceph.in: Better error on bad arg to 'tell' +1a451f2 mon: functional tests teardown must be run on error +514b5e3 mon: add helper to selection functions implementing tests +e4b4b1f osd: OSDMap::erasure_code_profile accessors +c4f8f26 osd: add OSDMap::erasure_code_profile +2b9bd26 (origin/wip-tmap2omap-warn) mds: avoid spurious TMAP2OMAP warning +e39c213 (origin/wip-7611) ceph.in: do not allow using 'tell' with interactive mode +b2af217 (origin/wip-remotebit-dump) mds: Fix remotebit::dump for less common types +9d77ce1 (origin/wip-rados-outfile) tools/rados: Allow binary file output of omap data +be31998 erasure-code: make libcommon include liberasure-code +e6d9066 erasure-code: add ostream to factory() +de62572 erasure-code: remove dependency to the global context +bcc7487 common,erasure-code,mon: s/erasure-code-// +d4d6ff0 mon,osd,erasure-code: update copyright notices +29862f6 mon: tests for pool create erasure implicit ruleset creation +b7db487 mon: pool create erasure implicit ruleset creation +32e122b mon: add pool name to prepare_pool_crush_ruleset +cf25946 mon: create-erasure uses crush_ruleset_create_erasure +9850ab2 mon: crush_ruleset_create_erasure s/_map// +3bc607a mon: crush_ruleset_create_erasure indent +9622488 mon: crush_ruleset_create_erasure s/rule/err/ +370e000 mon: crush_ruleset_create_erasure set ruleset +8e07dbc mon: crush_ruleset_create_erasure error codes +402e646 mon: crush_ruleset_create_erasure reduce verbosity +6a16eac mon: create crush_ruleset_create_erasure helper +1ae3314 (origin/wip-7684) client: force getattr when inline data is missing +04de781 (origin/wip-7740) OSD::handle_pg_query: on dne pg, send lb=hobject_t() if deleting +9e21840 mds: include inline data in lock messages +5b3422a mds: fix corner case of pushing inline data +b2fcc6e (origin/wip-s3pm-wusui) Remove code duplication from s3 tests. +979e8b4 (origin/wip-7732) PG::build_might_have_unfound: check pg_whomai, not osd whoami +0f75c54 (origin/wip-7712) osd/ReplicatedPG: fix enqueue_front race +ef1d7c9 rados.py: Fixed docstring syntax warnings. +02b746d doc: Fixed release notes syntax warnings. +9cd67bb doc: Fixed hyperlink. +599a8d7 (origin/wip-7698) test: Add ceph_filestore_dump.sh to test ceph_filestore_dump +31a6679 tools: Fix ceph_filestore_dump to fully operate on EC pools +f633a03 tools: Cleanups in ceph_filestore_dump +bbc0d6d (origin/wip-7718) PG::issue_repop: only adjust peer_info last_updates if not temp +35f1b04 RGWListBucketMultiparts: init max_uploads/default_max with 0 +ab91b80 mon/OSDMonitor: fix fall-thru case +fc85075 (origin/wip-cache-last-epoch-clean) mon/PGMap: only recalculate min_last_epoch_clean if incremental touches old min +208959a mon/PGMap: cache min_last_epoch_clean +6f9db6c unittest_mon_pgmap: fix warnings +e941fef unittest_ceph_argparse: fix warnings +f2c6ff3 tools/: make filenames consistent +e330097 (origin/wip-7719) PG: clear want_pg_temp in clear_primary_state only if primary +da159f8 doc/release-notes: note that radosgw's should be upgraded together +f1bd59f (origin/wip-7692) mon: only do timecheck with known monmap +fba88de ceph-mon: be a bit more verbose on error +62af51c (origin/wip-7696) PG::activate: handle peer contigious with primary, but not auth_log +70d87df (origin/wip-7489) ceph_mon: output error message if unable to bind. +5ad9c16 ceph_mon: all output after initial fork go to dout/derr +c95234a ceph_mon: split postfork() in two and finish postfork just before daemonize +ceac36b doc/release-notes: 0.78 draft nodes; firefly draft notes +87c911c (origin/wip-7709) osd/ReplicatedPG: release op locks on on commit+applied +c5b557e qa/workunits: misc -> fs/misc +8c8b3e9 PGLog: remove unused variable +282497e osd: add tunables for cache_min_{flush,evict}_age +fa6887b osd: set default cache_target_{dirty,full}_ratios based on configurable +a72b636 mds: fix empty fs rstat +f2124c5 (origin/wip-7705) ceph_test_rados: wait for commit, not ack +dd946e0 MOSDOp: include reassert_version in print +73f6b4c (origin/wip-7706) config_opts: raise ms_pq_max_tokens_per_priority to 16MB +2722a0a PrioritizedQueue: cap costs at max_tokens_per_subqueue +88cb1c4 (origin/wip-3863) tools: Create ceph-client-debug +d2ce029 libcephfs: add ceph_ll_lookup_inode +724f30e client: Add lookup_parent & lookup_name +f1f2826 mds: Return EINVAL for parent lookup on root ino +a19ef01 (origin/wip-7703) rgw: manifest hold the actual bucket used for tail objects +33b889f rbd-fuse: fix signed/unsigned warning +c973e46 (origin/wip-coverity-20140312) mds/Mutation.h: init export_dir with NULL in ctor +fd383a9 mds/Migrator.h: init some members of import_state_t in ctor +5a53aa8 mds/Migrator.h: init some export_state_t members in ctor +b10692f CInode::encode_cap_message: add assert for cap +58e35a4 test_filejournal.cc: use strncpy and terminate with '\0' +a2784ba Add unit test for race condition in libnss +44aaaaf Work around race condition in libnss +fe8a715 Make the configuration "filestore merge threshold" can be negative which prevent it from merging, this could help: 1. We are trying to create the PG folder up to several levels with a standalone tool to prevent it from runtime splitting, we need a configuration which prevent it from merging even there is no file within the folder. 2. As runtime split / merge could bring latency issues, customer can use a negative merge threshold to prevent merging but only splitting. This change is backward compatbile. Signed-off-by: Guang Yang (yguang@yahoo-inc.com) +27f0634 doc: fix formatting on PG recommendation +7cf81ce libcephfs/test.cc: shutdown cmount at end of MountNonExist +269cf13 libcephfs/test.cc: shutdown cmount +94acb6b test_librbd.cc: add missing va_end() to test_ls_pp +fb4ca94 mailmap: Danny Al-Gaaf name normalization +fb8ff44 doc/release-notes: note that WATCH can get ENOENT now +2cbad1b (origin/wip-7671) test/librados/watch_notify: create foo before watching +9d549eb test/system/st_rados_watch: expect ENOENT for watch on non-existent object +b23a141 RGWListBucketMultiparts: init max_uploads/default_max with 0 +4057a30 AbstractWrite: initialize m_snap_seq with 0 +90a2654 (origin/wip-7682) ReplicatedPG::already_(complete|ack) should skip temp object ops +72bc1ef AdminSocket: initialize m_getdescs_hook in the constructor +f7529cf RGWPutCORS_ObjStore_S3::get_params: check data before dereference +5334d5c mds/Server.cc: check straydn before dereference +047287a doc: Add "nearest power of two" to PG rule-of-thumb +7bb0359 OSDMonitor::prepare_pool_op: add missing break in case +a4a91cc (origin/wip-7649) PG: do not wait for flushed before activation +a576eb3 PG: do not serve requests until replicas have activated +980d2b5 (origin/wip-7681) ECBackend: when removing the temp obj, use the right shard +dc00661 osd_types: print lb if incomplete even if empty +8e76e4e (origin/wip-7695) build-doc: fix checks for required commands for non-debian +dc82cd7 (origin/wip-7641) debian: make ceph depend on ceph-common >= 0.67 +d573710 (origin/wip-7687) rgw: don't overwrite bucket entry data when syncing user stats +2fbd772 qa/workunits/cephtool/test.sh: fix thrash (more) +64a6b26 doc/release-notes: fill in some firefly history +f4196cc doc/release-notes: firefly draft release notes +24774a8 osd/ReplicatedPG: fix typo +3d5a4b5 ReplicatedPG: CEPH_OSD_OP_WATCH return -ENOENT if !obs.exists +00bf3b5 (origin/wip-7674) osd/ReplicatedPG: do not include hit_set objects in full calculation +1836b6c (origin/wip-7592-final) osd: hit_set_persist(): Verify all objects aren't degraded +42ef8ba (origin/wip-6889) rgw: don't log system requests in usage log +406ff0b (origin/wip-is_down-boolean) OSDMap: clarify is_{down,in}() definitions +fe4ad29 (origin/wip-rbd-fuse-enumerate) rbd-fuse: fix enumerate_images() image names buffer size issue +377c919 rados_connect not thread-safe when using nss (documentation) +861e62a Update Python hashbang to respect environment +fa30eb5 rados.py: fix typo in Ioctx::read() docstring +1249b0b Use pgrep radosgw to determine if rados gateway is running. +745f72c Fixed get_status() to find client.radosgw fields inside of ps output. +880bc3a Fix get_status() to find client.rados text inside of ps command results. +fbd9c15 osd: Remove unused checkpoint code +d3e3df7 (origin/wip-flock) mds: fix owner check of file lock +8a72de3 (origin/wip-7663) ReplicatedPG: adjust pending_attrs correctly in copy_from +6669e4d ReplicatedPG: _delete_head should adjust pending_attrs +60c1b9a ReplicatedPG: use pending_attrs in rollback +d7c4d6a doc: Added init caps to Signed-off-by: and Fixes: +2b28407 (origin/wip-doc-prereq) doc: update build prerequisites +7ac98b2 doc: Updated sign-off by to sign-off-by +2e420f9 (origin/wip-build-doc) doc: rm duplicate info from release-process +52a2d69 doc: fix reST formatting in release-process +bb73711 doc: update release-process for packages +dd5a378 doc: misc updates for release-process +e272f74 (origin/wip-coverity-20140409) rgw_rados.h: RGWRegion: initialize cct and store with NULL +8de8819 (origin/wip-7672) PG::choose_acting: filter CRUSH_ITEM_NONE out of have +c7c9ae3 RadosModel.h: initialize CopyFromOp::snap +d7af7eb RadosModel.h: TestOp: initialize comp with NULL +9df9f4c ReplicatedPG.h: CopyResults() initialize final_tx with NULL +2daabc1 scratchtoolpp.cc: check return value of getchar() +0f7d954 doc: Updated pull request with suggested changes. +a9df888 AioTestData: initialize m_ioctx with NULL +6732c02 rgw_rados.h: generator class: initialize manifest with NULL +61f640c IoCtxImpl: initialize last_objver with 0 +b6947c0 ECSubWrite: pass some parameter by reference +200f747 test/bench/distribution.h: pass rngen_t by reference +d61fcfa ceph-filestore-dump.cc: pass OSDSuperblock by reference +7e43823 doc: Fixed typo. +6cd797b osd/Watch.cc: pass entity_addr_t by reference +40095ee watch_item_t: pass entity_addr_t by reference +62763d5 watch_info_t: pass parameter by reference +246564b pg_t::get_split_bits: add assert to silence coverity +aba5b7c rbdmap: bugfix upstart script +2e342d6 (origin/wip-libxfs-flag) FileStore: support compiling without libxfs +2626604 erasure-code: LARGEST_VECTOR_WORDSIZE is always 16 +2beb2a5 erasure-code: upgrade to jerasure version 2 +b74115a autotools: set SIMD_FLAGS with SSE flags +4105ab8 erasure-code: use jerasure as submodules +eb6ffdb erasure-code: remove jerasure version 1 +18506ad Removed all regular expression parsing and used '-f json' instead +4cb6b2a Modified num_bytes attribute in components_count to be a raw integer +18bdee6 MDSMonitor::prepare_command: fix "mds set" +7884780 osd_types.cc: add missing break in operator<< case handling +83731a7 ReplicatedPG::finish_ctx: clear object_info if !obs.exists +a7afa14 config.cc: add debug_ prefix to subsys logging levels +55c23a1 (origin/wip-hint-tests) qa: add script for testing rados allocation hint +54ffdcc (origin/wip-da-fix-doc) get-involved.rst: update information +d1a888e swift/containerops.rst: fix some typos +93b95a2 radosgw/troubleshooting.rst: s/ceph-osd/OSD/ +2223a37 radosgw/config-ref.rst: fix typo +87618d4 session_authentication.rst: fix some typos +682c695 release-process.rst: fix some typos +72ee338 doc: s/osd/OSD/ if not part of a command +e666019 doc/dev/logs.rst; fix some typos +bbd1c4b filestore-filesystem-compat.rst: fix typo +ae123a6 corpus.rst: fix typo +cf9f017 config.rst: fix typo +5aaecc7 cephx_protocol.rst: fix typo +2cbb0a4 architecture.rst: fix typos +f581bda rados: add set-alloc-hint command +a4cbb19 rados/operations/control.rst: fix typo +9bf39e2 Broke down sysinfo's format into a histogram with a value and count so that we just see how many of each version/distro/kernel/os/arch/cpu/etc are running +2591668 (origin/wip-div) PGLog::proc_replica_log: select divergent log entries correctly +3befb93 PGLog::_merge_object_divergent_entries: handle missing.have == prior_version +7c77ff6 TestPGLog: add a test case verifying case where we have the prior_version +e830f9f TestPGLog: check on last_update in run_test_case +4d6a74d TestPGLog::proc_replica_log: call doesn't adjust olog +71b4474 (origin/wip-nfs-export) client: fix Client::getcwd() +617ce67 mds: introduce LOOKUPNAME MDS request +1c8c618 qa/workunits/cephtool/test.sh: fix 'osd thrash' test +b62f9f0 (origin/wip-7642) mon/OSDMonitor: feature feature check bit arithmetic +8d52fb7 (origin/wip-7652) mon/PGMap: send pg create messages to primary, not acting[0] +c8b34f1 mon/PGMonitor: improve debugging on PGMap updates slightly +819cce2 mon/OSDMonitor: make osdmap feature checks non-racy +b9bcc15 mon/OSDMonitor: prevent set primary-affinity unless all OSDs support it +5f7efec (origin/wip-7650) tools/rados/rados.cc: use write_full for sync_write for ec pools +38fd666 (origin/wip-7210) qa: workunits/mon/rbd_snaps_ops.sh: ENOTSUP on snap rm from copied pool +c13e1b7 mon: OSDMonitor: don't remove unamanaged snaps from not-unmanaged pools +135c27e (origin/wip-7575) osd: Add hit_set_flushing to track current flushes and prevent races +3dd09e3 Removed nw_info from sysinfo +09a317f Made crush_types to be a map of type to count, so we can tell how many racks/rows/hosts/etc are there +e53aed2 SubmittingPatches: clarify "github fork" in preference to "clone" +c9eaa65 Changed Availability section of ceph-mds.rst to reference ceph-mds, not ceph-mon. Signed-off-by: James Ryan Cresawn +09668a4 (origin/wip-7637) osd: fix agent thread shutdown +7411c3c logrotate: copy/paste daemon list from *-all-starter.conf +b6872b2 (origin/wip-7638) ReplicatedPG::trim_object: use old_snaps for rollback +b5b67d1 (origin/wip-7634) ReplicatedPG: use hobject_t for snapset_contexts map +b436930 (origin/wip-firefly-misc) qa/workunits/rest/test.py: do not test 'osd thrash' +237f0fb os/ObjectStore: dump COLL_MOVE_RENAME +f888ab4 (origin/wip-7632) ReplicatedPG: consistently use ctx->at_version.version for stashed object +eca7e63 (origin/wip-7393) ReplicatedPG: clean up num_dirty adjustments +173116f (origin/wip-scrub-lock) osd: only register for scrub if we are the PG primary +d379b1f osd: bracket role changes with scrub reg/unreg +c8c2f54 Client: fix build issue (lost semicolon) +d171418 (origin/wip-7610) obj_bencher: allocate contentsChars to object_size, not op_size +bafd76a (origin/wip-7624) ReplicatedPG: ensure clones are readable after find_object_context +90f5a68 1. Removed name of the pool from pool_metadata 2. Included pool type in pool_metadata 3. Renamed rep_size attribute to size in pool_metadata +da97fee 1. simplified the 'bytes' info to just be bytes 2. prefix all the members of the components_info with 'num_' +2adc534 (origin/wip-pool-delete) mon/OSDMonitor: fix pool deletion checks, races +d9e8806 (origin/wip-7618) ReplicatedPG::wait_for_degraded_object: only recover if found +a222e7a ReplicatedPG::recover_replicas: do not assume that missing objects are unfound +3f59f02 Revert "c_read_operations.cc: fix resource leak" +a71ddb0 (origin/wip-7562) mon: make quorum list (by name) be in quorum order +240446e (origin/wip-7487) test: merge unittest_crushwrapper and unittest_crush_wrapper +772968e mon/OSDMonitor: disallow crush buckets of type 0 +8b3934f (origin/wip-7616) PGBackend::rollback_stash: remove the correct shard +1ddec86 FileStore::_collection_move_rename: propogate EEXIST +ca12e0d qa/workunits/mon/crush_ops: use expect_false +e016e83 (origin/wip-7608) test: Fix tiering test cases to use ---force-nonempty +0592368 (origin/wip-cache-warn-full) mon: warn when pool nears target max objects/bytes +f6edcee (origin/wip-pgmap-stat) mon/PGMap: return empty stats if pool is not in sum +640ff98 (origin/wip-vstart-paths) test: Use non-default out/ dev/ paths in vstart +1685c6f (origin/wip-crush-json) crush: revise JSON format for 'item' type +d4950a1 mailmap: Danny Al-Gaaf affiliation +0eac1ba mailmap: Bjørnar Ness affiliation +fdb644a mailmap: Ron Allred affiliation +a85d0ef mailmap: Steve Stock affiliation +076bec8 mailmap: Christopher O'Connell affiliation +4cb1cbf (origin/wip-7607) ReplicatedPG::fill_in_copy_get: fix omap loop conditions +11393ab ReplicatedPG::fill_in_copy_get: remove extraneous if statement +8fdfece ReplicatedPG::fill_in_copy_get: fix early return bug +364fed8 (origin/wip-debian-files) packaging: use wildcard for test files in Debian +65f3354 (origin/wip-7293) Make symlink of librbd to qemu's folder so it can detect it. +d0b1094 (origin/wip-7447) ECBackend,ReplicatedPG: delete temp if we didn't get the transaction +f2a4eec PGBackend/ECBackend: handle temp objects correctly +308ea1b ECMsgTypes: fix constructor temp_added/temp_removed ordering to match users +3e21996 ReplicatedPG::finish_ctx: use correct snapdir prior version in events +a7057e1 doc: Improve CloudStack RBD documentation +31eb533 (origin/wip-da-SCA-firefly-20140304) librados.cc: remove unused variable cpp_category +c2cc178 ECBackend.cc: use !empty() instead of size() +35ae7ed ceph_argparse.cc: prefer prefix ++operator for non-trivial iterator +39fc1db KeyValueStore: use !empty() instead of size() +8c2b2d3 PG.h: use !empty() instead of size() > 0 +9e52695 PG::generate_past_intervals: reduce scope of variable +3a786ca test_o_trunc.c: fix indentation to kernel style (tabs, 8 spaces) +e4c4aae ErasureCodePlugin.cc: reduce scope of local variable +35f2080 SyntheticClient::play_trace: reduce scope of local variable +f836909 test_o_trunc.c: reduce scope of some variables +c2f3f2b close file descriptor in error case +8f63fdb Formatter::new_formatter(): pass const function parameter by reference +724ad02 doc: update the operator create pool reference +7461410 doc: erasure coded pool developer documentation +6d323c0 mailmap: Mike Lundy affiliation +49e54ab (origin/wip-cache-add) mon/OSDMonitor: fix race in 'osd tier remove ...' +241b9e8 mon/OSDMonitor: fix some whitespace +c029c2f mon/OSDMonitor: add 'osd tier add-cache ' command +62e0eb7 mon/OSDMonitor: handle 'osd tier add ...' race/corner case +0e5fd0e osd: make default bloom hit set fpp configurable +eddf7b6 osd/ReplicatedPG: fix agent division by zero +08efb45 (origin/wip-tier-add) OSDMonitor: do not add non-empty tier pool unless forced +12909bb (origin/wip-2288) mds: check projected xattr when handling setxattr +20fe162 (origin/wip-7563) TestPGLog: tests for proc_replica_log/merge_log equivalence +9a64947 TestPGLog::proc_replica_log: adjust wonky test +6b6065a TestPGLog::proc_replica_log: adjust to corrected proc_replica_log behavior +97f3596 TestPGLog::proc_replica_log: add prior_version to some entries +200e296 PGLog::proc_replica_log: _merge_divergent_entries based on truncated olog +b0357ab PG.h:PGLogEntryHandler: remove silly cant_rollback logic +c99b7e1 PG,PGLog: replace _merge_old_entry with _merge_object_divergent_entries +86b21e0 TestPGLog::merge_old_entry: ne.version cannot be oe.version +3dc4f10 TestPGLog::merge_old_entry: we no longer use merge_old_entry this way +ff329ac TestPGLog:rewind_divergent_log: set prior_version for delete +9e43dd6 TestPGLog: ignore merge_old_entry return value +3cc9e22 TestPGLog: not worth maintaining tests of assert behavior +a234053 (origin/wip-osd-verbosity) OSD,config_opts: log osd state changes at level 0 instead +68890b2 osd: be a bit more verbose on startup +4e06dfd (origin/wip-messenger-shutdown) msg: Make SimpleMessenger shutdown safer +371a80c librbd: prefix rbd writes with CEPH_OSD_OP_SETALLOCHINT osd op +8e49bc3 FileStore: add option to cap alloc hint size +1f5b796 FileStore: introduce XfsFileStoreBackend class +391257c FileStore: refactor FS detection checks a bit +6456802 osd: add SETALLOCHINT operation +8982734 common: -- support for env_to_vec +28c29c1 Revert "ObjectCacher: remove unused target/max setters" +d00a927 Revert "librbd: remove limit on number of objects in the cache" +195d53a rgw: off-by-one in rgw_trim_whitespace() +37e7817 In database delete Session.flush() has to be called appropriately, to avoid foreign key conflicts in delete() request to the database +f3d6491 Following changes are made 1. Increased the String length for distro, version and os_desc columns in osds_info table 2. Corrected version information extraction in client/ceph-brag 3. Removed the version_id json entry when version list returned for UUID 4. Updated the README to reflect point 3 +3cc8b27 Modifed the String variables in db.py to be of fixed length to support databases which doesn't have VARCHAR support +30a5bdb Added an instruction in 'How to deploy' field in README.md +aca6ac3 (origin/wip-7248) qa: workunits: cephtool: test 'osd bench' limits +09099c9 (origin/wip-osd-status) osd: 'status' admin socket command +25a9bd3 osd: OSD: limit the value of 'size' and 'count' on 'osd bench' +ef25135 erasure-code: test rados put and get +0b612d1 mon: prepend current directory to PATH for tests +eb21bc8 osd: helper to create an OSD for functional tests +cababd9 mon: add mon-test-helpers.sh to EXTRA_DIST +927153f osd: do not attempt to read past the object size +9dd6e34 mailmap: Mouad Benchchaoui affiliation +e782051 mailmap: Andrey Kuznetsov affiliation +7b6d417 mailmap: Wang, Yaguang affiliation +855edc6 Fix typo ceph-disk +43b7b0b mailmap: The Linux Box affiliations +62fd382 (origin/wip-7539) osd_types,PG: trim mod_desc for log entries to min size +d4118e1 MOSDECSubOpWrite: drop transaction, log_entries in clear_buffers +718cda6 TrackedOp: clear_payload as well in unregister_inflight_op +59ff572 OpTracker: clarify that unregister_inflight_op is only called if enabled +fc9b8ef MOSDOp: drop ops vector in clear_data() +1ea59f6 ReplicatedPG: delete mark_all_unfound_lost transactions after completion +e19dffb (origin/wip-7572) mon: fix 'pg dump' JSON output +1a4657a (origin/wip-fix-coverity-20140228) req_state: fix uninitialized bool var +605e645 Objecter::recalc_op_target: fix uninitialized scalar variable +754a368 PGMonitor: fix uninitialized scalar variable +1747c58 MDCache: fix potential null pointer deref +93c0983 MDCache::handle_discover: fix null pointer deref +249e210 FileStore: fix resource leak in queue_transactions() blackhole case +3cd751b c_read_operations.cc: fix resource leak +ad9b6d2 c_write_operations.cc: fix some ioctx resource leaks +e8533ee ReplicatedBackend: check result of dynamic_cast to fix null pointer deref +8d6b25a mds: use "lookup-by-ino" helper to handle LOOKUPPARENT request +dc20c7d OSDMonitor: enable getting hit set parameters We would like to get the hit set parameters: hit_set_type | hit_set_period | hit_set_count | hit_set_fpp via OSDMonitor +5b88856 (origin/wip-s3radoscheck-wusui) Use pgrep radosgw to determine if rados gateway is running. Fixes: 7528 Signed-off-by: Warren Usui +0ed63fd (origin/wip-libcephfs-fixes) client: fix Client::trim_caps() +cdbe413 client: update dirfragtree/fragmap according to mds request reply +214977a client: choose hash function according to dir layout +23de48b client: check inode's cap when looking up dentry +0638d61 client: add flushing inode to proper list when auth mds changes +4bdecf1 client: add imported caps when handling cap export message +1ddc951 client: remove exported caps when handling cap import message +a7b7c31 client: use ceph_seq_cmp() to compare cap seq/mseq +3dd323e client: don't send cap release when removing exported cap +0bf5f86 store_test.cc: fix unchecked return value +7eefe85 histogram.h: fix potential div by zero +500206d ReplicatedPG.cc: fix ressource leak, delete cb +fbb1ec8 (origin/wip-7542) ECBackend: don't leak transactions +b0d4264 OSD::handle_misdirected_op: handle ops to the wrong shard +123ff9e (origin/wip-7458) osd: stray pg ref on shutdown +448fc0e (origin/wip-pg-msg) mon/OSDMonitor: missing space in string +799cde0 Fix python-requests package dependencies. +bfad17b (origin/wip-librados-end-iterator) librados: fix ObjectIterator::operator= for the end iterator +a850a38 (origin/wip-doc-cache-pool) doc/dev/cache-pool: fix notes +f0241c8 (origin/wip-cache-pool) mon/OSDMonitor: make default false-positive-probability 5% +30aa2d6 client: clear migrate seq when MDS restarts +c1e40c6 client: fix race between cap issue and revoke +5c55eb1 client: check mds_wanted for imported cap +9476f84 client: allow revoking duplicated caps issued by non-auth MDS +6797d30 client: call handle_cap_grant() for cap import message +154efb1 client: don't update i_max_size when handle reply from non-auth MDS +9a0ef6a (origin/wip-requests-dependencies) Fix python-requests package dependencies. +c07a758 (origin/wip-mds-dumper) mds: Add dump-journal-entries +7a985df mds: Create MDSUtility as base for Dumper/Resetter +410c507 mds: Fix Dumper shutdown +7ba3200 mds: fix nested_anchors update during journal replay +1040d1b (origin/wip-primary-temp-fix) osd/OSDMap: respect temp primary without temp acting +8020dcf (origin/wip-7375-wusui) Fixed get_status() to find client.radosgw fields inside of ps output. Fixes: 7375 Signed-off-by: Warren Usui +8200b8a (origin/wip-7374-wusui) Fix get_status() to find client.rados text inside of ps command results. Added port (fixed value for right now in teuthology) to hostname. Fixes: 7374 Signed-off-by: Warren Usui +be2748c (origin/wip-7537) OSDMap::_pg_to_up_acting_osds: use _acting_primary unless acting is empty +dc079eb OSDMonitor: when thrashing, only generate valid temp pg mappings +891343a rados.py: add aio_remove +9f7f4ed (origin/wip-dz-scrub-fixes) Revert "osd/PG: fix assert when deep repair finds no errors" +728e391 osd: Don't include primary's shard in repair result message +3ee71a5 (origin/wip-mon-docs) doc: troubleshooting-mons.rst: better document how to troubleshoot mons +69082a6 (origin/wip-7485) mds: add mds_kill_create_at for testing +27968a7 ceph_test_objectstore: fix i386 build (again) +14ea815 (origin/wip-osdmap-inc) mon/OSDMonitor: fix osdmap encode feature logic +7357b6e (origin/wip-7517) PG: skip pg_whoami.osd, not pg_whoami.shard in scrub feature check +696fa36 (origin/wip-7512) OSD::project_pg_history needs to account for acting_primary/up_primary +0442b45 Objecter/OSDMap: factor out primary_changed() into static OSDMap method +d0359f7 PG: clarify same_primary_since updates regarding primary rank +73c59a0 (origin/wip-last-epoch-clean) mon/PGMap: fix osd_epochs update +df3ba72 mon/PGMap: add unit test for min_last_epoch_clean +8913ab4 ECBackend: skip canceled xattr reads as well +0e376ee (origin/port/temp-failure-retry) compat: avoid unused warn with TEMP_FAILURE_RETRY +23e538e (origin/wip-create-null) client: fix possible null dereference in create +bcc18d4 osd: increase default leveldb write buffer, cache size +c4a3a86 ceph_test_objectstore: fix i386 build error +b25c22a ceph_test_objectstore: fix signed/unsigned warning +9651b18 os/ObjectStore: fix rebase errors +cfafa0b README: add build dep +1340b36 erasure-code: test that changing the pool size is not allowed +d74f128 os/ObjectStore: document interface +6d8cb22 unittest_ecbackend: fix signed/unsigned warnings +fed655e (origin/wip-scrub-primary) mon/PGMonitor: fix primary osd check on deep-scrub +7b0f3d9 (origin/wip-7513) PGLog::activate_not_complete: fix log.complete_to increment typo +e3e3328 (origin/wip-repair) osd/PG: fix assert when deep repair finds no errors +9da4d40 (origin/wip-ec-bugs) PGLog: test for missing using the correct shard value +ace65fe OSD: fix query for ec pgs +93983c9 Objecter: make is_pg_changed static and const for old/newacting +8b4cf1c OSDMap: make calc_pg_rank/role const for acting +005b4fa Objecter: resend op if primary role changed +b7de0fd ECTransaction: require hash_infos for deleted objects +ab4c9a6 ECUtil: clear() should reset hashes to -1, not 0 +8593ad7 ReplicatedPG::cancel_pull: ECBackend might cancel_pull on a non-missing object +9b85241 ECBackend::filter_read_op: clean up read state properly +70d23b9 (origin/wip-subscribe) osd: fix off-by-one is boot subscription +90ebdcc Rename keyvaluestore_check_backend to keyvaluestore_debug_check_backend +a52d7cd Add KeyValueStore op thread options +62c1631 Remove eio inject codes in KeyValueStore +8c4d865 Add config tracker to KeyValueStore +697411c Add backend check option to KeyValueStore +9543664 Remove filestore_inject_stall +dcfe098 Remove m_eio in KeyValueStore +4b3bf3e Make SequencePosition sync by each transaction +ec8a419 Implement collection_rename interface in KeyValueStore +6314350 Remove unnecessary "check_coll" check +88bec06 Optimize write call add enhance error detect +2a363d6 Unify object level lock in GenericObjectMap +a9fa341 Fix incorrect read and truncate +9ed2958 Return 0 when the offset of read exceed the length of object +3e6a1fc Add read/write operation to store_test.cc +4e7f1de Adjust some interfaces to optimize caller codes +024a120 Use rename operation to make colection_move atomic +d7be540 Add get_*_with_header to StripObjectHeader +c9fdcee Add test for omap interface +2b9e893 Move perf counter and add op queue reserve throttle +5eb7592 Fix deadlock caused by hold collection obj +c278269 Added a note that the ceph-osd command requires the cluster option. +0da25e6 (origin/wip-librados-object-iterator) librados: implement ObjectIterator copying and assignment +d9bedb9 Added evaluation of cluster and fixed evaluation when setting initial weight on start in verbose mode +8a0017a librados: don't destroy ObjListCtx when iterator reaches the end +d8a7bef librados: remove extra advance from objects_begin(position) +a9677e1 (origin/wip-6685-firefly) Revert "ReplicatedPG::recover_backfill: adjust last_backfill to HEAD if snapdir" +133ddb7 packaging: match all test files +1c129df packaging: add missing file +bd59db2 (origin/wip-corpus) ceph-object-corpus: prune some old releases +76046cf (origin/port/updates) dencoder: check for radosgw build option +5373ee2 osd: use ceph scoped shared_ptr +0ebb1f8 mon/MDSMonitor: Cope with failures during creation +c6e6ced (origin/wip-copyget) PG::build_might_have_unfound: skip CRUSH_ITEM_NONE +1f30d1a ECBackend: deal with temp collection details in handle_sub_write +c703a89 ReplicatedPG::on_global_recover: requeue degraded, then unreadable +caf2edf rgw: minor cleanup +1307ba9 mds: Table read failure should log at error level +81bcf43 mds: Don't create the /.ceph directory +2762ede mds/CDir: Remove a few lines of cruft +a4d0eb1 mds: Remove some unused #defines +5fb90a2 Fix generate keystone token from credentials +541beb8 (origin/wip-mds-dencoder) mds: Add encode/decode/dump for use with dencoder +ebd4397 RadosModel: copyfrom should result in a dirty object +68184d4 PG: fix scrub feature check +67d1f36 ReplicatedPG: assert no omap for ec pool in _write_copy_chunk and skip +4441792 ECBackend: handle short reads +715cbd3 ReplicatedPG: ensure that ec appends are aligned +78d9c00 ReplicatedPG::fill_in_copy_get, use getattr_maybe_cache +c337f63 ReplicatedPG: fix stat uses to use the correct shard +aa110af OSDMap::_apply_primary_affinity: skip CRUSH_ITEM_NONE in non-default check +b3bb9ef doc/release-notes: v0.77 +fa96de9 doc/release-notes: v0.67.7 +1bca9c5 (tag: v0.77) v0.77 +40bdcb8 osd/,mon/: add (up|acting)_primary to pg_stat_t +0427f61 (origin/wip-7099) rgw: fix swift range response +2b3e3c8 (origin/wip-6830) rgw: fix etag in multipart complete +859ed33 (origin/wip-6951) rgw: reset objv tracker on bucket recreation +53de641 (origin/wip-6936) radosgw-admin: don't generate access key if user exists +9e8882e (origin/wip-da-SCA-20140218) BackedUpObject::get_xattr() pass function parameter by reference +53b3689 TestRados.cc: use !empty() instead of size() +86b0879 ErasureCodeBench: prefer prefix ++operator for non-trivial iterator +200ebb9 ceph_erasure_code.cc: prefer prefix ++operator for non-trivial iterator +e6772c7 RGWObjManifest: prefer prefix ++/--operator for non-trivial iterator +42e6da7 ReplicatedPG: prefer prefix ++operator for non-trivial iterator +29c4abd OSD: use !empty() instead of size() > 0 +be85727 PG: use !empty() instead of size() > 0 +f23ab4a RPCRecPred: use !empty() instead of size() >= 1 +0626df9 KeyValueStore: prefer prefix ++operator for non-trivial iterator +76c1723 KeyValueStore: use !empty() instead of size() +ede614a FileStore: use !empty() instead of size() +eaf6696 DBObjectMap: use !empty() instead of size() +0bf0ec0 OSDMonitor: prefer prefix ++operator for non-trivial iterator +31b4107 OSDMonitor: use !empty() instead of size() > 0 +a1412bd MDCache: prefer prefix ++operator for non-trivial iterator +4a48d8e CrushWrapper::is_valid_crush_loc(): pass function parameter by reference +3f68a5c CrushWrapper: prefer prefix ++operator for non-trivial iterator +dd71051 PGLog.h: prefer prefix ++operator for non-trivial iterator +8488e71 Client: remove a std::string::c_str() calls +1099e25 common/config.cc: prefer prefix ++operator for non-trivial iterator +c7dfdfd str_map.cc: prefer prefix ++operator for non-trivial iterator +7da714a Client.cc: use !empty() instead of size() +fd08b09 ceph_argparse.cc: prefer prefix ++operator for non-trivial iterator +1d1392d Monitor: pass function parameter by reference +ab45d44 BarrierContext: prefer prefix ++operator for non-trivial iterator +4adcfa5 BarrierContext: reduce scope of 'done' variable +19dad03 MonClient: pass function parameter by reference +314116e PG: insert into stray set if !us_up() && !is_acting() +a5c5d92 (origin/wip-agent) osd/ReplicatedPG: EOPNOTSUPP on hit_set_get on non-replicated pools +a40cd50 osd/ReplicatedPG: load older HitSets into memory +0af7375 osd/ReplicatedPG: strengthen agent_work assertions +1d907c6 OSD: consider up/acting primary for new intervals +afbd58e (origin/wip-7064) rgw: don't try to read bucket's policy if it doesn't exist +3ed68eb rgw: return error if accessing object in non-existent bucket +b0dcc79 radosgw-admin: gc list --include-all +609f4c5 Throw a Timeout exception on timeout. +1975441 (origin/wip-rgw-manifest-2) dencoder: fix for new rgw manifest code +b3ce188 cls/rgw: fix debug output +3fb6e25 test/rgw: manifest unitest +da64bf7 rgw: scalable manifest object +db88e7f (origin/wip-7463) ceph_rest_api.py: don't fail if no up OSDs found on startup +7a019b3 (origin/wip-librados-ops-and-rvals) test/librados: remove unused lines and fix return code for cmp guards +bfbfcd6 ReplicatedPG: fix successful write condition +18f08cd ReplicatedPG: clear osd op reply output for writes +1d661ca ReplicatedPG: set individual osd op rvals +7743698 ReplicatedPG: don't copy the ops vector into OpContext +e550ad7 ReplicatedPG: avoid undefined behavior in xattr comparison +4b229f7 qa: add librados c object operations tests to librados test script +7a76033 packaging: add test programs for librados c object operations +bac7bb6 librados: bump version number +995fea9 librados: add omap object operations to the c api +242a6c8 librados: add read xattr functions for c object operations +f68b706 Objecter: add a way to chain callbacks +2543cde librados: add exec to the c object operations api +0dc4309 librados: add read to c object operation api +6503f21 Objecter: add a context argument to ObjectOperation::read() +6094e43 librados: add simple atomic read operations to c api +770942a librados: add exec to the c write operations api +bc03fbb librados: add individual op flags for c write operations +4f4121a librados: add global op flags to the c api +7f1f0b5 librados: remove constant for CMPXATTR_NOP +50ca88a librados: add some comments about constants in librados.h +e255bf5 librados: add section docs for object operations +c61ba41 test/librados: add ObjectReadOperation tests +5276e3c test/librados: refactor setup/teardown in tiering tests +ae072ac test/librados: use standard rados test case for snapshot tests +5497e1c test/librados: use a test case instead of duplicating code everywhere +c6d8d0e test/librados/cmd: remove unnecessary pool creation +d3c6f17 test/librados: use connect_cluster_pp() instead of duplicating it +8d4a5fd test/librados: add a connect_cluster() helper +9630f2f test/librados: create general test case classes +6273ba4 test/librados: move test.cc into its own library +abca34a Objecter: keep ObjectOperation rval pointers for writes +4bee6ff (origin/wip-cache-perf) osd/ReplicatedPG: clean up agent skip debug output +d1a185b osd: l_osd_agent_{wake,skip,flush,evict} +dbec109 osd: l_osd_tier_[dirty|clean] +150e87a osd: l_osd_tier_whiteout +2d5371d osd: l_osd_tier_evict +c45a477 osd: l_osd_tier_[try_]flush[_fail] +4b0a0a1 osd: l_osd_copyfrom +5e727bf (origin/wip-ecbackend-for-review, origin/wip-ecbackend-12) RadosModel: only output if missing header is actually a problem +11f288e Objecter: track primary explicitly to detect changing primaries +bc31c4b ReplicatedPG: add some debugging if waiting_for_commit is non-empty +b90584a osd/: instantiate the right backend based on pool +792f0a8 ECBackend: flesh out ECBackend implementation +45b6c59 osd/ECTransaction: add type encapsulating EC transaction +33c3830 osd/ECUtil: add ec encode/decode util helpers +7731a94 ObjectStore: add bufferlist/string getattr +258af5e buffer: allow caller to initialize bufferhash state +ae827cf osd_types: add swap, claim_append to ObjectModDesc +7772014 OSD,PG: pass through EC messages +6cd64a5 messages,osd: add EC messages and associated types +e8820ac src/osd/: add ECBackend stubs +0661d80 PGBackend: make getattrs virtual +ca323ff ReplicatedPG: fix size checking for ECBackend pools +510585b PGBackend/ReplicatedBackend: factor out logical to ondisk size mapping +26745ca PGBackend/ReplicatedBackend: move the backend agnostic code into PGBackend for scrub +1835c29 ReplicatedBackend: factor out be_deep-scrub +f0b69b3 osd/: replace bufferptr with bufferlist for attrs in recovery +0b180e6 PG::discover_all_missing: request a FULLLOG +84e2f39 PG,ReplicatedPG: Generalize missing_loc for ECBackend +8b33d60 PG: allow PGBackend to set criteria for PG up-ness +facec76 PGBackend: add some additional helpers. +74b8a0c PG,PGBackend: expose acting and backfill_targets +5a8c0bb os/: allow objects with NO_GEN but non-NO_SHARD shard +2d3205f PG: skip CRUSH_ITEM_NONE in acting set in various places +5db3b2d osd/: extend pg_interval_t to include primary +9d8be1b Objecter: handle primary other than acting[0] +904704a OSDMap: handle CRUSH_ITEM_NONE in acting sets +109b3c9 OSDMap: fill in get_primary_shard +285cf77 PG: introduce calc_ec_acting +41e1945 PG: refactor calc_acting to handle pg_shard_t changes +035d6cc osd/: refer to pg by spg_t and replica by pg_shard_t +8b46dd1 messages/: include shard information in various pg messages +fa98064 ReplicatedBackend: excise OSDService* +31b7937 PGBackend/ReplicatedBackend: move temp handling into PGBackend +761f0b1 PGBackend: use whoami_shard().shard in rollback*, objects* +5d01f88 ReplicatedBackend/PGBackend: move objects_* methods into PGBackend +8ca875b PGBackend/ReplicatedBackend: move rollback methods into PGBackend +4a25951 osd_types: introduce spg_t, pg_shard_t +44b43df ObjectStore: use ghobject_t for setattrs +f2826fa src/osd: pass in version to recover to recover_object +1c93e03 osd/: Add a shard parameter to SnapMapper to handle multiple pg shards +f678aef TestPGLog: remove test with DELETE op with prior_version = eversion_t() +09d611d PGLog::merge_old_entry: simplify the oe.version > ne.version case +e6a1122 osd: l_osd_tier_promote +d116e55 PG: just ignore rollbacks on objects we have already failed to rollback +0e7b10a PG::remove_snap_mapped_object: use pg_whoami.shard +fd9da00 ReplicatedPG: take snapset_obc write lock where appropriate +da4652c ReplicatedPG: release backfill state on_global_recover not peer recover +d687ed9 ReplicatedPG: take clone write lock as well in make_writeable +643b6a5 ReplicatedPG,osd_types: seperate require_rollback from ec_pool +f020ce9 ReplicatedPG:: remove_snap_mapped_object already removes the object +17e6ecc ReplicatedPG: find_object_context debugging: output oi +b3b2bab ReplicatedPG: handle xattr cache on rollback and delete_head +d8b6d4c ReplicatedPG: release_op_ctx_locks in all-applied, not all-committed +13a41e1 FileStore: permit NULL onreadable callback +3650da6 ErasureCodeJerasure: fill in decoded if all shards are included +44f5d4d ErasureCodeJerasure: fix alignement issues in encode/decode +06ec9bd ObjectStore: fix OP_COLL_ADD dump output +541a7e2 TestRados: send aligned appends on erasure pools +e0b0508 ReplicatedPG: reject unaligned writes on ec pools +211fc4e librados: add calls to expose required write alignment +4c1338f SimpleMessenger: init_local_connection whenever my_inst changes +bd8fcd2 osd: improve whiteout debug prints +63f5a79 osd/ReplicatedPG: make agent skip blocked obcs +7997646 ReplicatedBackend: print char ack_type as int +a71d829 (origin/wip-barrier) client: disable barrier support +747002c client: fix barrier interval +d7457f7 client/barrier: drop unused active_commit_interval +ce643e0 client: don't populate Client::barriers from read accesses +a1dbc9c qa/workunits/suites/pjd: use test suite with acl tweak +623748e (origin/wip-dirfrags) mds: bump the protocol version +2a19a1b osd/ReplicatedPG: allow is_degraded_object() to be called outside of backfil +e5457df mds: open sessions for rejoin imported caps +c54b3ce mds: fix slave rename rollback +9e8dbf9 mds: remove failed MDS from export bystanders list +21d209d mds: wake up dentry waiters when handling cache rejoin ack +74ef370 mds: fix negative rstat assertion +2253534 mds: avoid race between cache expire and pushing replicas +cc77ef2 mds: fix scattered wrlock rejoin +3b90c78 mds: fixes for thrash fragment +5b1de69 mds: force fragment subtree bounds when replaying ESubtreeMap +4d5ceba mds: fix 'force dirfrags' during journal replay +f3666ed mds: journal dirfragtree change +ee7ac6f mds: allow fragmenting subtree dirfrags +98105b2 mds: preserve dir_auth when spliting/merging dirfrags +3dc51de mds: minor cleanup for EFragment and MMDSFragmentNotify +9df6861 mds: freeze dir deadlock detection +9a47913 mds: improve freeze tree deadlock detection +8079939 mds: handle frag mismatch for cache expire +305d16f mds: handle frag mismatch for cache rejoin weak +0eb311d mds: fix open undef dirfrags +6e013cd mds: properly set COMPLETE flag when merging dirfrags +ee0ab2b mds: fix CInode::get_dirfrags_under() +1080fa4 mds: fix MDCache::adjust_subtree_after_rename() +e0e2565 mds: fix MDCache::get_force_dirfrag_bound_set() +ffe7151 mds: handle frag mismatch for discover +b88034e mds: use discover_path to open remote inode +1ff7766 mds: introduce fine-grained discover dirfrag wait queue +2c909cd mds: revert commit 15a5d37a +5faa313 mds: acquire scatter locks when exporting dir +3154ee8 mds: acquire locks required by exporting dir +3fb408e mds: introduce nonlocking auth pin +d0df841 mds: allow acquiring wrlock and remote wrlock at the same time +1dae27c (origin/wip-7371) ReplicatedPG: return no data if read size is trimmed to zero +774125c osd: set client incarnation for Objecter instance +0dd1e07 osd: schedule agent from a priority queue +a812982 osd/ReplicatedPG: simplify agent_choose_mode +905df2e osd/ReplicatedPG: block requests to cache PGs when they are full +85e06f9 osd/ReplicatedPG: redirect reads instead of promoting when full +b92c79d osd/ReplicatedPG: use reply_ctx in a few cases +7f85421 osd/ReplicatedPG: do not flush omap objects to an EC base pool +8c7bc2e osd/ReplicatedPG: do not activate agent unless base pool exists +11e4695 osd: add OMAP flag to object_info_t +6581ce9 osd/ReplicatedPG: ignore starvation potential when taking write lock during promote +f617eba osd/ReplicatedPG: do not choke on op-less flush OpContexts (from flush) +dd3814f osd/ReplicatedPG: do not flush|evict degraded objects +90457b1 ceph_test_rados_api_tier: fix osd pool set json syntax +230aad7 osd: clear agent state when PG becomes a replica +c2d16d7 osd/ReplicatedPG: do not flush or evict hitsets +e07f987 osd/ReplicatedPG: fix evict mode selection for large target +c9daf8e osd/ReplicatedPG: add slop to agent mode selection +3bc3127 osd/ReplicatedPG: initial agent to random hash position inside pg +f693045 osd: add pg_pool_t::get_random_pg_position() +7bb0aa5 osd: only enable tier agent when osd is in active state +cb4aa3a osd: observe 'notieragent' osdmap flag +dcf20b9 osd: add 'notieragent' flag to OSDMap +a5dabb5 histogram: fix histogram::get_position_micro overflow +199bdb1 mon: test dirty stats in ceph df detail +18bc151 osd/ReplicatedPG: decay tier agent histograms over time +da9ed08 osd/ReplicatedPG: basic flush and evict agent functionality +a54f819 osd: agent worker thread +9ac03ef osd/ReplicatedPG: fix finish_flush +34fcf42 osd/HitSet: add HitSetRef +6950212 osd/ReplicatedPG: factor clone check out of evict op code +fc28a99 osd/ReplicatedPG: add on_finish to OpContext +a57052c mon: include dirty stats in 'ceph df detail' +bc94524 osd: rename test/test_osd_types.cc -> test/osd/types.cc +e65c280 osd: add pg_pool_t::get_pg_num_divisor +95f25ce mon/OSDMonitor: allow new pool policy fields to be set +0988c84 osd/osd_types: add cache policy fields to pg_pool_t +297d54e histogram: add decay +fb4152a histogram: move to common, add unit tests +85a8272 histogram: rename set -> set_bin +8b68ad0 histogram: calculate bin position of a value in the histrogram +d921d9b qa: do not create erasure pools yet +4560078 common: ping existing admin socket before unlink +c673f40 (origin/wip-primary-affinity) osd/OSDMap: include primary affinity in OSDMap::print +87be7c1 osd/OSDMap: remove bad assert +ba3eef8 mon/OSDMonitor: add 'mon osd allow primary affinity' bool option +c360c60 ceph_psim: some futzing to test primary_affinity +f825624 osd/OSDMap: add primary_affinity feature bit +8ecec02 osd/OSDMap: apply primary_affinity to mapping +871a5f0 (origin/wip-brag) ceph.spec: add ceph-brag +4ea0a25 debian: add ceph-brag +57d7018 ceph-brag: add Makefile +cf4f702 (origin/wip-7212-sage-b) mon/Elector: bootstrap on timeout +4595c44 mon: tell MonmapMonitor first about winning an election +7bd2104 mon: only learn peer addresses when monmap == 0 +3c76b81 (origin/wip-7395) OSD: use the osdmap_subscribe helper +6db3ae8 OSD: create a helper for handling OSDMap subscriptions, and clean them up +5b9c187 monc: new fsub_want_increment( function to make handling subscriptions easier +7d398c2 doc/release-notes: v0.67.6 +0ed6a81 (origin/wip-osdmaptool-pool-fix) osdmaptool: add tests for --pool option +f98435a osdmaptool: add --pool option for --test-map-pgs mode to usage() +eedbf50 osdmaptool: fix --pool option for --test-map-object mode +e44122f test: fix signed/unsigned warnings in TestCrushWrapper.cc +64cedf6 (origin/wip-7394) OSD: disable the PGStatsAck timeout when we are reconnecting to a monitor +794c86f monc: backoff the timeout period when reconnecting +60da8ab monc: set "hunting" to true when we reopen the mon session +1a8c434 monc: let users specify a callback when they reopen their monitor session +589e2fa mon: ceph hashpspool false clears the flag +7834535 mon: remove format argument from osd crush dump +020e543 mon: do not goto reply if a ruleset exists in pending +0c9c157 mon: osd crush rule create-simple functional tests +c248e7c mon: osd crush rule functional tests +4784a68 mon: add ruleset name to crush rule dump +fce4d68 mon: add missing format argument to crush dump +cec1893 mon: add missing format argument to crush rule dump +7ff2756 mon: osd create pool test refactor +fd13307 mon: minor improvement to test-helpers.sh +4b687ba mon: if crush rule create-simple exists return +a7e9a7b crush: display item name in CrushWrapper::dump_rule() +e5b6eb4 crush: cosmetic changes to CrushWrapper::dump_rule() +dcfeee6 crush: add the dump_rule(int ruleset) method +f77e8ea crush: add CrushWrapper::dump_rules() unit test +462ad76 crush: fix leaks in TestCrushWrapper.cc +6ad6b09 mon: remove racy tests from osd-pool-create.sh +8dea588 mon: add osdmonitor_prepare_command to the admin socket +07c494b mon: add --mon-advanced-debug-mode +5ea156a mon: Monitor::send_reply gracefully handles no connection +53e92f6 mon: split prepare_command in two +d012119 (origin/wip-null-xattr) mds: remove xattr when null value is given to setxattr() +6e6a333 (origin/wip-open-truncate) mds: properly replay dentry trace for open truncate. +9035227 doc/release-notes: do not downgrade from v0.67.6 +7533b3b doc/release-notes: note about dumpling xattr backport +cc1e844 PendingReleaseNotes: note about cephfs backtrace updates +74951ca osd/OSDMap: pass pps value out from _pg_to_osds +e107938 osd/OSDMap: fix _raw_to_up_osds for EC pools +1cc8c25 mon/OSDMonitor: add 'osd primary-affinity ...' command +cee9142 osd/OSDMap: add osd_primary_affinity fields, accessors, encoding +af4c142 mon/OSDMonitor: fix legacy tunables warning +a0b2c74 (origin/wip-moncap) osd/OSDCap: handle any whitespace (not just space) +824dd52 mon/MonCap: handle any whitespace (not just space) +5a6c950 packaging: do not package libdir/ceph recursively +840e918 tests: fix packaging for s/filestore/objectstore/ +b64f1e3 tests: fix objectstore tests +f34eb1b (origin/wip-update-backtrace) mds: force update backtraces for previously created FS +b5c10bf Fix bad dealloctor +a4b3b78 correct one command line at building packages section +33692a2 osdmaptool: fix cli test +fed8396 tset_bufferlist: fix signed/unsigned comparison +8ca3d95 (origin/wip-7346) rgw: multi object delete should be idempotent +bf38bfb (origin/wip-7271) rgw: set bucket permissions, cors on swift creation +2682b64 (origin/wip-doc-librados-intro) doc: Incorporated feed back from Loic and Dan. +0da9621 doc: Adds additional terms for use with librados. +e1a49e5 ObjectCacher: remove unused target/max setters +0559d31 librbd: remove limit on number of objects in the cache +db034ac ObjectCacher: use uint64_t for target and max values +bf8cf2d ObjectCacher: remove max_bytes and max_ob arguments to trim() +d136eb4 (origin/wip-crush) mon: allow firefly crush tunables to be selected +e3309bc doc/rados/operations/crush: describe new vary_r tunable +525b2d2 crush: add firefly tunables baseline test +37f840b crushtool: new cli tests for the vary-r tunable +e88f843 crush: add infrastructure around SET_CHOOSELEAF_VARY_R rule step/command +f944ccc crush: add SET_CHOOSELEAF_VARY_R step +e20a55d crush: add infrastructure around new chooseleaf_vary_r tunable +ac16fd6 mailmap: Derek Yarnell is with University of Mississippi +9e43f93 mailmap: Dmitry Smirnov is with Debian GNU/Linux +0869fcb mailmap: Eric Mourgaya is with Credit Mutuel Arkea +165e76d common: admin socket fallback to json-pretty format +e98e344 client ownership info validation corrected +f2f4eb5 Updated client code to complete PUT and DELETE requests +69682ad1 memstore: fix touch double-allocation +9292cc2 doc: highlight that "raw" is the only useful RBD format for QEMU +9e62beb qa: add script for testing rados client timeout options +79c1874 rados: check return values for commands that can now fail +8e9459e librados: check and return on error so timeouts work +d389e61 msg/Pipe: add option to restrict delay injection to specific msg type +671a76d MonClient: add a timeout on commands for librados +3e1f7bb Objecter: implement mon and osd operation timeouts +9bcc42a (origin/wip-7334) alert the user about error messages from partx +42900ff use partx for red hat or centos instead of partprobe +6926272 (origin/wip-fsetpipesz-fix) common/buffer: fix build breakage for CEPH_HAVE_SETPIPE_SZ +a5f479c configure: fix F_SETPIPE_SZ detection +450163e configure: don't check for arpa/nameser_compat.h twice +c1d2a99 libcephfs: fix documentation for ceph_readlink +dbaf71a mailmap: Moritz Möller is with Bigpoint.com +4cf2c72 Server changes to deploy in a production env 1. Added the wsgi entry point app.wsgi 2. Updated client code to mandate the update-metadata to have url to publish and unpublish 3. Updated the README to describe a bit about the server operations as well. +575566b (origin/wip-7329) ceph_test_rados_api_tier: try harder to trigger the flush vs try-flush race +a8e6c9f crush: add chooseleaf_vary_r tunable +f17caba (origin/wip-7370) crush: allow crush rules to set (re)tries counts to 0 +795704f crush: fix off-by-one errors in total_tries refactor +ed32c40 crushtool: add cli test for off-by-one tries vs retries bug +75c5525 qa/workunits/rest: use larger max_file_size +a2dae0d mailmap: Somnath Roy is with SanDisk +17c8a23 mailmap: Yan, Zheng name normalization +5d20c8d mailmap: Ray Lv is with Yahoo! +1a588f1 Rename test/filestore to test/objectstore +3d65660 script to test rgw multi part uploads using s3 interface +5d59dd9 script to test rgw multi part uploads using s3 interface +0bac064 added script to test rgw user quota +8cb3dad doc: Added Python doc. +22afd6c doc: Added inline literal tag. +aaa2799 doc: Adds Python to index and sets maxdepth to 2. +0f2386a script to test rgw user quota functionality +16ae4f8 fuse: fix for missing ll_ref on create +c1b0714 client: For rebase need to fix ll_readlink() call in Synthetic client +349b816 client, libcephfs: make readlink sane +afcc7eb mds: include requested caps (namely, xattrs) on getattr reply +77047ee libcephfs: add an xattr ll test +55a20c0 libcephfs: add ceph_ll_listxattr +acf2e49 libcephfs: add ceph_ll_lookup_root() +e2dc1b6 libcephfs: expose new client ll_ interface +935f8b3 client/fuse_ll: adapt to new ll_ interface +9ad8f57 client/SyntheticClient: adapt to new ll_* interface +dad91b5 client: direct read/write methods that bypass cache, cap checks +b700768 client: expose layout information +e08210d client: switch ll_* methods to Inode* arguments +3752660 client/Client: make open fhp argument optional +23577c8 client/Client: return 1 from readdir cb on full +ff04629 client: add barrier and types +7f6d755 client: whitespace +7f9fdc3 osdc/Objecter: whitespace +548ccd9 mds/Server: whitespace +3a5fa87 (origin/wip-osdmap-primary) osd/OSDMap: populate *primary when pool dne +5b7e2b2 rgw: initialize variable before call +45d31f0 osdmaptool: tests for --test-map-pgs +b98eaa5 osdmaptool: test --import/export-crush +7c31036 osdmaptool: s/simple.t/missing-argument.t/ +362825c osdmaptool: fix cli tests +9caaef7 osdmaptool: allow a completely random placement +7f1b12f osdmaptool: add --test-map-pgs mode +bb6d3f8 rest/test.py: use larger max_file_size for mds set test +f584de5 With functionality test cases. Test it using 'python setup.py test' +302fc92 mon: s/ENOSYS/ENOTSUP/ +e1e6c45 Completed model and controller code 1. GET, PUT and DELETE request are added 2. Removed public folder as it will never be used +42a64e1 Revert test case of "mon: OSDMonitor: do not allow changing an erasure-coded pool's size" +0aa25b1 Some suggested changes, both errors and rewordings +30fd0c5 Intial version of the server code. 1. Database modelling is done 2. PUT request is completed +fc963ac (origin/wip-erasure-code-directory) erasure-code: move test files to a dedicated directory +7baa62f erasure-code: move source files to a dedicated directory +9ecf3467 (origin/wip-rgw-vg) rgw: initialize variable before call +ce0e3bd qa/workunits/snaps: New allow_new_snaps syntax +22b0057 mon: test osd pool create pg_pool_t::stripe_width behavior +dfc90cf mon: osd pool create sets pg_pool_t::stripe_width +33b8ad8 common: add osd_pool_erasure_code_stripe_width +798b56a unittests: update osdmaptools with stripe_width +11c11ba mon: add erasure-code pg_pool_t::stripe_width +922e5cf (origin/port/fixes) osd: fix type mismatch warning +6fda45b os/kvstore: remove used var +994bdea os/kvstore: trivial portability fixes +377a845 common: simpler erasure code technique +04b1ae4 (origin/wip-7336) rgw: fix rgw_read_user_buckets() use of max param +fdeb18e (origin/wip-7109) mon: MDSMonitor: Forbid removal of first data pool +c7d265a mon: OSDMonitor: Refuse to delete CephFS pools +e80b084 (origin/wip-erasure-code-command) erasure-code: add ceph_erasure_code debug command +68e6dad (origin/wip-mds-cluster) mds: avoid sending duplicated discovers during recovery +bec1209 erasure-code: benchmark moves to a dedicated directory +ad8c666 mon: check cluster features before rule create-erasure +c8c4cc6 (origin/wip-7146) mon: OSDMonitor: do not allow changing an erasure-coded pool's size +7b15cb1 mon: osd-pool-create test no longer use hardcoded ruleset +428c75e mon: osd-pool-create test EAGAIN when pending +59ba03b mon: test erasure code pool creation +d40841c mon: osd-pool-create test enforce -e +d8d747d mon: osd-pool-create test must kill -9 +0ca7ed8 mon: osd-pool-create test initialization +9cb2215 mon: osd-pool-create shows logs on error +5bb4ca4 vstart: load erasure code plugins from sources +5f9f300 unittests: reduce paxos propose interval to increase speed +3370973 pybind: osd crush rule create-erasure tests +fdc967d pybind: cosmetic changes to tests +ad09023 pybind: fix tests that do not fail as expected +cb39b13 mon: osd crush rule create-erasure +1acc73b mon: compute the ruleset of erasure-coded pools +8259e51 mon: compute the size of erasure-coded pools +caefb8a mon: erasure code plugin loader helper +61c45fe mon: pool create helper for crush ruleset +6caac92 mon: pool creation helper for size +9d766ca mon: no default ruleset except for replicated pools +0cac202 mon: helper for pool properties parsing +cc66c6a erasure-code: test ErasureCodeJerasure::create_ruleset +02869f8 erasure-code: implement ErasureCodeJerasure::create_ruleset +f019c90 erasure-code: implement example create_ruleset +6ca9b24 erasure-code: add crush ruleset creation API +2dca737 erasure-code: the plugin is in a convenience library +e47e49d doc/release-notes: v0.77 draft notes +2c504ea doc/release-notes: v0.76 +60ca6f6 client: fix warnings +1829d2c librados: add timeout to wait_for_osdmap() +0dcceff conf: add options for librados timeouts +a23a2c8 os/KeyValueStore: fix warning +8e30db8 rest: add a few rest api tests +eb9ffd5 mon: use 'mds set inline_data ...' for enable/disable of inline data +408b0c8 mon: fix 'mds set allow_new_snaps' +e5ed1b2 mon: do not force proposal when no osds +3b99013 (tag: v0.76) v0.76 +7ff2b54 client: use 64-bit value in sync read eof logic +2f85b8c doc: Incorporated feedback. +684e5c4 (origin/wip-performance-configs) Pipe, cephx: Message signing under config option +5fde828 cmp.h: boost tuple comparison is replaced by regular comparison +8e19488 TrackedOp: optionally disable the actual tracking operations +98ae059 Throttle: Turn off throttle based on max bytes +03f7f77 Throttler: optionally disable use of perfcounters +ee48c87 common/shared_cache.hpp: compact to a single lookup where possible +27b5f2b common/shared_cache.hpp: avoid list::size() +ee4cfda doc: rgw: el6 documentation fixes +48fbcce (origin/wip-5997) osd: Change some be_compare_scrub_objects() args to const +ce1ea61 osd: Change be_scan_list() arg to const +e1bfed5 common: buffer::ptr::cmp() is a const function +34eb549 osd: Move the rest of scrubbing routines to the backend +f9128e8 osd: Move PG::_scan_list() to backend as ReplicatedBackend::be_scan_list() +37447e7 osd: Add scrub_supported() backend interface +560f5f1 OSDMap: fix deepish_copy_from +d508079 OSDMonitor: use deepish_copy_from for remove_down_pg_temp +61914d8 OSDMap: deepish_copy_from() +802692e os/KeyValueStore: fix warning +0389f1d (origin/wip-osdmap-features) mon/OSDMonitor: encode full OSDMap with same feature bits as the Incremental +b9208b4 OSDMap: note encoding features in Incremental encoding +e4dd1be (origin/wip-pybind-enverr) pybind: improve EnvironmentError output +754ddb1 rgw: fix build on centos +1628423 mailmap: Rutger ter Borg affiliation +3a1a8c3 mailmap: Laurent Barbe affiliation +5b5bc0b mailmap: anonymous contributions are unaffiliated +b0fe2a9 mailmap: Andras Elso affiliation +93a62d7 mailmap: Ma Jianpeng affiliation +74d5bf5 mailmap: Simon Leinen is with SWITCH +f9132e0 mailmap: John Spray is with Inktank +49842db mailmap: Alan Somers affiliation +79563e1 mailmap: Jonathan Dieter affiliation +a28f1fa mailmap: Christian Marie affiliation +aa7fc3b mailmap: Dan Chai is unaffiliated +cb9792e mailmap: Kai Zhang affiliation +30f4969 mailmap: Ron Allred name normalization +b5d22eb mailmap: Thomas Bechtold affiliation +c8c103b mailmap: Xihui He affiliation +f7b000e mailmap: Adam Twardowski affiliation +47a5122 mailmap: Huang Jun is unaffiliated +0dbf44f mailmap: Kun Huang affiliation +ad515bf ceph-disk: support and test the absence of PATH +3f5e4f5 ceph-disk: larger timeout in the test script +d70efe9 FileStore: avoid leveldb check for xattr when possible +6d1daea unittest_striper: fix warning +f9071a7 doc: cls moved to subdirectory +e78f756 (origin/wip-rbd-rm-watchers) run-rbd-tests: run remove_with_watcher test +4ebc32f rbd: don't forget to call close_image() if remove_child() fails +0a553cf rbd: check for watchers before trimming an image on 'rbd rm' +dcbe872 pybind: work around find_library() not searching LD_LIBRARY_PATH +47dcddc Corrected the sample output in README.md +9006777 1. Updated README.md with sample output 2. Remove 'osd_hosts' entry from json and added that information as part of sys_info 3. In the 'num_components' entry, 'bytes' entry is replaced to contain an object with 'count' and 'scale' members +70c7c9e pybind/rados.py: improve error output +456c727 doc: Removed extraneous character from path. +f32bfa5 ceph_test_object_map: fix build +5476b4b keyvaluestore: name to keyvaluetore-dev for now +cfdfb98 Make ObjectStore unit tests shared with KeyValueStore +972d4b2 Add KeyValueStore implementation +03da035 docs: Typo in CloudStack user creation +f0f4b8d docs: Improve CloudStack documentation. +8fb366f Add a new KV wrapper GenericObjectMap +b31c0f0 civetweb: fix warning +1e85bc9 cls_user: init cls_user_list_buckets_op fields +fd260c9 cls_user: init cls_user_stats fields in ctor +d0f13f5 OSDMap: fix deepish_copy_from +d7b0c7f ceph-disk: run the right executables from udev +318e208 (origin/wip-7190) OSD: don't assume we have the pool in handle_pg_create +2a737d8 leveldb: add leveldb_* options +11cf9bb (origin/wip-7169-2) rgw: fix multipart min part size +12ba8a3 Add a virtual interface init, open, create_and_open to KeyValueDB +2e7bd83 rgw: fix multipart upload listing +f1b5309 osd: OSDMonitor: ignore pgtemps from removed pool +ff5abfb buffer: make 0-length splice() a no-op +86c3c5a test/Makefile.am: update test_cls_rgw* rules +26ace1e test_rgw_admin_opstate: get it compiled +28c7388 osdc/Striper: test zero-length add_partial_result +f513f66 (origin/wip-7116-joao) osd: OSDMonitor: ignore pgtemps from removed pool +3c77c4c (origin/wip-7060) OSDMap: use deepish_copy_from in remove_redundant_temporaries +368852f OSDMap: fix damaging input osdmap from remove_down_temps +bd54b98 OSDMap: deepish_copy_from() +9e52398 packaging: apply udev hack rule to RHEL +64a0b4f packaging: apply udev hack rule to RHEL +9265d76 client: Avoid uninline empty inline data +b99e9d3 mds: Handle client compatibility +ddbaa5c mds: Shutdown old mds when inline enable +e3c4c4c mds: Add inline switch +81c4f54 client: Make inline size tunable +40a6939 client: Fallocate inline data path +47e6a78 client: Write inline data path +a0cb524 client: Read inline data path +4a5c099 client: Add inline data migration helper +165ddb9 client: Push inline data to mds by send cap +3c05e80 client: Receive inline data pushed from mds +be3db0b client: Add inline fields to Inode +45c2ab4 mds: Receive updated inline data from client +1280d99 mds: Push inline data to client in inodestat +7af7a5e ceph: Add inline fields to InodeStat +cf63f7e mds: Push inline data to client in cap message +3aa7f0b mds: Add inline fields to Capability +0f00f07 osdc: Add write method with truncate parameters +ac5c9dd ceph: Add inline fields to MClientCaps +eff9f02 If 'ceph osd metadata' isn't working, inform the user about it via stderr +fffbfc9 mon: test for MForward messages +d9a689d mon: shell test helpers to run MONs from sources +c06eca2 unittests: fail early when low on disk +9413a51 (origin/wip-user-quota-2) rgw: simplify a code path +1b0567b radosgw-admin: add usage for user stats [--sync-stats] +97edd2f doc: Switched logging to true. Now required for sync agent. +9a55fa1 cls_user: add generate_test_instances() implementation +e5dc8d6 rgw, cls_user: handle error cases related to response decoding +8a69ac8 rgw: implement restful set user quota request +92cabd4 rgw: new restful api for retrieving user quota info +0f7b3c7 rgw: quota thread for full user stats sync +51ffede (origin/wip-7215-quorum-features) mon: do not use CEPH_FEATURES_ALL for things that touch the disk +3d4a673 Elector: send an OP_NAK MMonElection to old peers who support it +687b570 Elector: ignore messages from mons without required feature capabilities +41796c0 Monitor: add a function to get the required quorum features from the local compatset +f8e4af2 OSDMonitor: do not allow creation of EC pools if the quorum can't handle it +e79e1d2 Monitor: introduce a function that translates quorum features into disk features +2f9a93d rgw: round bytes to the next 4k for quota use +6f34df4 rgw: sync bucket stats thread +7545177 rgw, cls_user: fix bucket creation +d992043 radosgw-admin: dump header when requested for user stats +5976bfc radosgw-admin: update stats sync completion +ba39512 cls_user: op to keep track of sync completion time +a68b52a cls_user: keep time info about stats update +0b7968c cls_user: header cleanup +45b2229 rgw: user quota should rely on cached info +c59a98e rgw: more quota fixes +12f5801 rgw: configure user quota also through region map +a6fae68 rgw: more rgw_quota fixes +04b5a71 rgw: some quota fixes +cfb9553 rgw: enable user quota +15c0189 radosgw-admin: user quota interface +a854d89 rgw: some fixes +c1c40df rgw: implement quota handlers for user stats +c13634e rgw: extend infrastructure to handle user stats read +364f7c5 rgw: move some code around, no actual changes +92a87b3 rgw: refactor quota cache +4aee3fa rgw: rename RGWBucketStats to RGWStorageStats +5612ded rgw: pass bucket owner all around +cbe1da8 radosgw-admin: bucket stats --sync-stats [--bucket=...] +c8793fb cls/user: some fixes + handle old buckets case +eef7ba4 rgw, radosgw-admin, cls/user: retrieve user stats +edcf9fe cls/user: a new op to retrieve user header +438aea7 cls/user: accounting functionality +c7b4d00 rgw: move bucket add / remove to new user objclass +23aa65f rgw: replace user bucket listing with objclass call +248c4ae rgw: new user objclass +b90570f Fix 404 broken links to logging and debug configuration +4553e6a Fix trailing space +7bed2d6 called sysinfo.append(meta) in get_sysinfo within the while loop +ef3fe7b Updated README with How-to-use instructions +faae5b9 (origin/use-ceph-sharedptr) libc++: convert tr1 uses +ea026c6 doc: Added domain pool, and changed zone configs to use domain tool so they don't clash. +0303f0f doc: Change zone domain to include "domain" so it is clear. +95e63ac doc: Added space between {Query_String} and [E=HTTP ... to solve for 500 error. +6f6b1ee ReplicatedBackend: fix uninitialized use warning/bug +df4df46 Monitor: use a single static accessor for getting CompatSet features off disk +6915053 doc: Adding more information on style and usage for documenting Ceph. +2216afd doc: Fixed omission of a comma in zone configuration. +55ab35b (origin/wip-7207) FileStore: perform LFNIndex lookup without holding fdcache lock +1560cc0 (origin/wip-rgw-civetweb-2) mongoose: git rm src/mongoose +bd089b1 civetweb: md5.inl -> md5.h +1a2bed1 civetweb: add include to makefile +287ea5c rgw: modify the civetweb rule +d26e766 civetweb: fix module uri +3f20a41 civetweb: update submodule +f2f7475 rgw: switch mongoose to civetweb +08fa34d (origin/wip-erasure-rule) osd/OSDMap: do not create erasure rule by default +6f8541c (origin/use-unordered-map) osd: use ceph:: scoped hash_map +289a400 Corrected ownership info which was presented as string, added stub code for unpublish +ecbdeb1 PGBackend: clarify rollback_stash name and method comments +4fc4573 PG: drop messages from down peers +e73a9f7 ReplicatedPG: make STARTSYNC a noop +96d4a0c PG::calc_acting: consider newest_update_osd when choosing backfill peers +7e3ccfe ReplicatedPG: take ReplicatedPGRef in BlessedContext +167f852 RadosModel: RollBack dirties the object +6e74123 RadosModel: undirty with update_object_undirty +ca37d08 ReplicatedPG::trim_object: remove unused int r; declaration +d0eda79 common/hobject: print shard as unsigned, not as char +9273177 ReplicatedPG::_process_copy_chunk: use append +183f41c ReplicatedPG: fill in mod_desc for hitset repops +9fd7a80 ReplicatedPG: use append for write and writefull +7c9425c ReplicatedPG: fill in mod_desc in finish_copyfrom +e8a08ff ReplicatedPG::finish_copyfrom: check new_obs.exists, not obs.exists +eb8f66d ReplicatedPG: handle removing the old object in finish_copy_op +f238441 ReplicatedPG: EOPNOTSUPP on ec_pool if there are omaps in the COPY_GET +b3c2ef2 ReplicatedPG: make COPY_GET async read friendly +a382ab8 ReplicatedPG: requeue in_progress_async_reads on_change +0bba79b ReplicatedPG: support async reads on ec pools +647e75a src/: add CEPH_OSD_OP_READ_SYNC +3ef6282 ReplicatedPG: use pgbackend->objects_read_sync() as appropriate +2fe5e1f osd/: add sync/async read methods to PGBackend +66bc91c ObjectStore: _collection_move_rename needs to increment ops +a3e4a84 PGLog,PG: reset can_rollback_to when we get a log entry without a transaction +347d968 PGLog: we cannot rollback past a recovered object entry +25eced5 PGLog: create interface allowing interface user to cleanup/rollback +c98cb1c ReplicatedPG: Fill in rollback info for log events +ecae37c osd/: introduce xattr caching for ec pools +155b4b0 PGBackend,ReplicatedBackend: add support for rolling back log entries +0528974 osd_types: add a can_rollback_to line to pg_log_t +63f64de osd_types: add ObjectModDesc into pg_log_entry_t +a7a6a2f osd_types: ObjectModDesc +53c26bc osd/: move client op handling into ReplicatedBackend +c58c899 PGBackend: allow queue_transaction to specify an op +1a4694f ReplicatedPG: factor out should_send_op +26b804f ReplicatedPG: split out op_applied_replica +09717e6 PG/ReplicatedPG: move snap map management into append_log +5732f0c ReplicatedBackend: implement RPGTransaction +bf9390f hobject_t/ReplicatedPG: tempness is now an hobject thing +c60185c PGBackend: add PGTransaction +d3c8e85 ReplicatedBackend: update the collection_list mechanisms to skip stashed objects +4d56e3c test/osd/: verify length of buffer returned in read +0885880 test/osd/TestRados.cc: skip 0 weight ops +d0933ee test/osd: add append support to WriteOp +ca91fb4 test/osd: adapt RadosModel to not do omap ops on ec_pools +7fe22da test/osd: restructure Object/RadosModel in prep for append +69ad880 test/osd/Object: create encoders for ContDesc +8494aa8 src/test/osd: remove tmap test +03c5344 PGLog: allow for empty pg log in update_range if log_tail == eversion_t() +1b0335e common: add option to disable filestore sharded object check +1b5992b FileStore::lfn_link: handle link within a collection +6d05fa2 PG: prefer older last_update for ec_pool +393a035 OSDMonitor: add debug_fake_ec_pool +a1ee1ee PGLog::rewind_divergent_log: we can rewind to tail, fix assert +a200650 PGLog: don't move up log.tail +1f9457c ReplicatedBackend: remove pushing entry for each object as it completes +b7d100b FileStore::_collection_move_rename: remove source before closing guard +06f7a98 ReplicatedBackend.h: don't need to be active for pushes +518774d ObjectStore: improve name of the queue_transaction which cleans up the transaction +c03d027 hobject: admit that gen_t is actually version_t +8060afd (origin/wip-osdmapenc-fix) MOSDMap: reencode maps if target doesn't have OSDMAP_ENC +9792500 doc: add-or-rm-mons.rst: better explanation on number of monitors +9eac5e3 Added update_metadata, clear_metadata, and usage description code +dcca413 added perl script for rgw bucket quota tests +28c75f8 removing rgw_tests.sh +54caa01 removing rgw_tests.sh +8b8ede7 modified the port to 7280 in the script instead of the default 80 +850b4f4 script for rgw bucket quota testing +339bed1 (origin/wip-cache-mode-fix) mon/MonCommands: 'invalidate+forward' -> 'forward' +b88c8ea doc: Added Documenting Ceph (draft) document. +90aea59 doc: Added documenting Ceph to the toc tree. +ed2decb doc: Fixed end string from '' to `` to stop warnings. Enforced 80 char line. +584c2dd (origin/wip-stray-mdsmaps) mon/MDSMonitor: do not generate mdsmaps from already-laggy mds +4c96853 packaging: ship libdir/ceph +6bee188 Docs: Add backfill_toofull to list of PG states +199e614 Initial version of the source code. Statistics extraction is done +78150bd osd: Add op_process_latency in perf counter +67d8b72 common: fix bufferlist::append(istream) test +fdf3b55 Fix #7187: Include all summary items in JSON health output +c78c300 Remove some almost-duplicate COMMAND definitions +20cf41d Missing a key for perm 'w' in permmap (src/pybin/ceph_rest_api.py:277) It leads to a 500 error when getting mds help info via rest api. Changed "w" to "rw" in MonCommands.h +586ad1f rgw: Use correct secret key for POST authn +52a9154 rgw: Fix signature variable naming/failure print +6dcf462 rgw: Document fields for access/secret key +7314cde (origin/wip-7184) osd: ignore num_objects_dirty for old pools +1b308b6 (origin/port/libc++) libc++: fix null pointer comparison +1fcbddc libc++: avoid hash re-definitions +aae4700 libc++: use ceph::shared_ptr in installed header +4c4e1d0 libc++: use ceph:: namespaced data types +8e86720 libc++: create portable smart ptr / hash_map/set +7e7eda4 (origin/wip-osdmap-7177) OSDMap: Populate primary_temp values a little more carefully +47bc71a fixed the syntax for test maxmds=2 +a13ebd3 fix for the test maxmds=2 +ad203d5 doc: Fixed ruleset typo. +6b7f27c (origin/wip-rgw-contention) librados: use rwlock for lookup pool, cache results +4b31456 rgw: add .h file to Makefile rule +d1de32c doc: Added default-placement to list of placement targets. Added SSL commentary. +80212ea doc: Added additional comment about port number. +0215342 (origin/wip-rgw-loadgen) rgw: loadgen, configurable num of objs, buckets +7c86764 rgw: loadgen shutdown, error out on failures +85267cf rgw: sign loadgen requests +e8a4b30 rgw: loadgen frontend read uid, init access key +57137cb rgw: add a load generation frontend +f01202d Fixes: #7172 +b1a853e (origin/wip-rbd-mount_timeout) rbd: expose mount_timeout map option +8ec7fa8 PendingReleaseNotes: note ceph -s fix +6e93132 doc: Removed Calxeda example. +dd4a9e1 doc: Removed saucy salamander reference. +e7d28a7 doc: Added host resolution commentary. +22e9a75 doc: Added comments from #6682. +6e37b7a doc: Added modification to quick start. +742d425 doc: Changed file name. +f7f9bed doc: Added source file for graphic. +26aa602 doc: Added source file for graphic. +c30b138 doc: Added third monitor icon. +add59b8 doc: Added additional monitor icon. +4b03326 doc: Removed old file. Changed file name. +86c1548 (origin/wip-7168) rgw: handle racing object puts when object doesn't exist +5c24a7e rgw: don't return -ENOENT in put_obj_meta() +a84cf15 rgw: use rwlock for cache +790dda9 osd: OSDMap: fix output from ceph status --format=json for num_in_osds num_up_osds returns as an int value, while num_in_osds returns as a string. Since only an int can be returned from get_num_in_osds(), num_in_osds should should also be an int to remain consistant with num_up_osds. +3194d66 doc: Fixed keyring command and updated for current conventions. +ec5f7a5 client: ceph-fuse use fuse_session_loop_mt to allow multithreaded operation if "fuse multithreaded = 1". Signed-off-by: Moritz Moeller mm@mxs.de +e1fd0e8 first commit +ac5a9fe mon: larger timeout for mon mkfs.sh test +50808af ceph-disk: larger timeout in the test script +1aa2601 (origin/wip-7166) osd: OSDMap: build reverse name->pool map upon decoding +f97264d (origin/wip-rgw-expose-bucket) 6748: rgw: Optionally return the bucket name in a response header. +2d0d48b (origin/wip-7117-redhat) packaging: ship libdir/ceph +8b09a43 doc/release-notes: v0.76 draft notes +2b36761 mon: favor 'mds set max_mds' over 'mds set_max_mds' +e60dcfa packaging: add missing test files +5ed7865 (origin/wip-7073) rgw: use configurable prime number for gc hash +e7b3236 (origin/wip-temp-primary) OSDMonitor: make sure we don't send out maps with a primary_temp mapping +28e0b76 test: add an OSDMap unittest +b183115 OSDMap: move temp manipulation functions out of OSDMonitor +fafc8e9 OSDMap: pay attention to the temp_primary in _get_temp_osds +12122b1 OSDMap: add primary out params to _pg_to_osds and _raw_to_up_osds +0c30509 OSDMap: add primary out params to internal _pg_to_up_acting_osds function +1c750c6 OSDMonitor: implement remove_down_primary_temp() +412afea OSDMonitor: make remove_redundant_pg_temp clear primary, too +e2db4ae OSDMonitor: remove primary_temp entries when you remove their pool +a246039 OSDMap: expose the primary_temp in print() +1f81fda OSDMap: dedup the primary_temp +e9e615c OSDMap: add primary_temp to apply_incremental() +74bdcb6 OSDMap: add [new_]primary_temp to the map and Incremental +b55c45e OSDMap: update Incremental encode/decode to match the full map's +3d7c69f OSDMap: add a CEPH_FEATURE_OSDMAP_ENC feature, and use new encoding +2646d5e OSDMap: add primary out param to pg_to_raw_up, and use pointers instead of refs +045e1d7 OSDMap: add primary-specifying pg_to_acting_osds +93d481a mon, osdmaptool: switch to primary-specifying pg_to_up_acting_osds +9749f30 OSDMap: implement pg_to_up_acting_osds with primary interface +5b69978 OSDMap: switch pg_to_osds to have an explicit primary param +5367d92 OSDMap: rename _raw_to_temp_osds() -> _get_temp_osds() +69a2ec2 OSDMap: unify the pg_to_acting_osds and pg_to_up_acting_osds implementations +c1a95f8 OSDMap: remove get_pg_primary() function +7a9c171 OSDMap: doc the different pg->OSD mapping functions +268ae82 osd: do not misuse calc_pg_role +a09d4f1 PG: do not use role == 0 as a determinant of primacy +644afd6 (origin/wip-3454) radosgw-admin: add temp url params to usage +fdf1a41 (origin/fix-configure-rerunning) autogen: re-run aclocal after libtoolize +970f938 doc: Updated paths for OSDs using the OS disk. +4425f9e librados: Add C API coverage for atomic write operations +1ffe422 mailmap: add athanatos +4b5f257 common: fix bufferlist::append(istream) test +e55a089 doc/release-notes: v0.75 +08c17b7 qa: cleanup cephtool/test.sh tmp files +5cf6908 mds: Add inline encode/decode to inode_t +caf7971 mds: Add inline fields to inode_t +b67e9ef ceph: Add inline state definition +978ec18 ceph: Add inline data feature +e268e95 updated "sample.ceph.conf": +91b8c78 (origin/wip-tier-bits) mon/OSDMonitor: simplify and make 'osd pool set ...' output consistent +413fc23 osd/ReplicatedPG: no HitSet on non-primary +be8db8c (origin/wip-cache-snap) osd/ReplicatedPG: use get_object_context in trim_object +b5ae76e ceph_test_rados: do not delete in-use snaps +8b39719 osd/OSDMonitor: fix 'osd tier add ...' pool mangling +d41a1d3 osd/ReplicatedPG: update ObjectContext's object_info_t for new hit_set objects +10547e6 osd/ReplicatedPG: always return ENOENT on deleted snap +8cab9e7 ceph_test_rados_api_tier: partial test for promote vs snap trim race +8221a2a osd/ReplicatedPG: cleanly abort flush if the object no longer exists +f3ce254 osd/Replicated: mark obc !exists on snap trim +48306e4 mon: debug propagate_snaps_to_tiers +6719d30 osd: fix propagation of removed snaps to other tiers +7e80fa0 osd/ReplicatedPG: handle promote that races with snap deletion +cd42368 osd/ReplicatedPG: simplify copy-from temp object handling +1a7335d ceph_test_rados_misc: test bad version for copy-from +7daab5a osd/ReplicatedPG: adjust flow in process_copy_chunk +0b816c3 osd/ReplicatedPG: make CopyResults inline in CopyOp +d00116c ceph_test_rados: flush can also fail due to snap trimming +7eede85 osd/ReplicatedPG: handle promotion of rollback, src_oids, etc. +ac446b5 osd/ReplicatedPG: preserve clean/dirty state on clone +27eb4c5 ceph_test_rados: improve read debug output +627bdea osd/ReplicatedPG: infer snaps from head when promoting oldest clean clone +21f3dcb osd: include snap_seq in copy-get results +c6b73eb osd/ReplicatedPG: always set obc->ssc SnapSetContext for clones +934de77 osd/ReplicatedPG: do not promote nonexistent clones +55b83f1 ceph_test_rados: is_dirty on non-flushing objects only +af5a407 ceph_test_rados: assert on read error +b70c476 ceph_test_rados: make flush clean correct snap in model +ac63551 ceph_test_rados: IsDirty on random snaps +6f4f651 ceph_test_rados: test flush/evict on snaps +9688642 ceph_test_rados: don't update any state on successful cache-evict +fc9f8ad ceph_test_rados_api_tier: test flush on snaps/clones +b2f752a osd/ReplicatedPG: construct appropriate snapc for flush/writeback +5b8d957 osd: add pg_log_entry_t event type CLEAN +c91166e osd/ReplicatedPG: refuse to flush when older dirty clones are present +6bff648 vstart.sh: allow MDS=0 +de8e8b5 osd/ReplicatedPG: make cache-[try-]flush CACHE instead of WR ops +4e8259d osd/ReplicatedPG: allow cache-evict on snaps +90e352c osd: add rados CACHE mode (different from RD and WR) +1f4350e ceph_test_rados_api_tier: test promotion of clones +c05765e osd/ReplicatedPG: update snap_mapper for promoted clones +5c94d53 osd/ReplicatedPG: only encode SnapSet on head objects in finish_ctx +38fe575 osd/ReplicatedPG: always encode snaps in finish_ctx +bfd4530 osd/ReplicatedPG: mirror SnapSet info when promoting head +0554735 osd/osd_types: SnapSet::from_snap_set +c70edf3 osd/ReplicatedPG: add PROMOTE log entry type +b840aae osd/ReplicatedPG: adjust clone stats when promoting clones +6dd0a1f osd/ReplicatedPG: include snaps in copy-get results +d22ecf3 osd/ReplicatedPG: using missing_oid to decide which object to promote +c3c1541 osd/ReplicatedPG: make find_object_context() pass missing_oid +33b5ef4 (origin/wip-mon-pgmap) mon/PGMap: make decode version match encode version +a5aaab3 ceph-dencoder: include offset in 'stray data' error message +1308225 buffer: do not append trailing newline when appending empty istream +946d603 (tag: v0.75) v0.75 +9034370 doc: Added comment and example for SSL enablement in rgw.conf +9615645 doc: Added python example of handle, and closing session examples. +c0d92b6 (origin/wip-5858-rebase) osd: Implement multiple backfill target handling +a657fad osd: Interim backfill changes +54e588c doc: Modified doc examples to use rados_create2. +4c92dc6 (origin/wip-7141) DBObjectMap::clear_keys_header: use generate_new_header, not _generate_new_header +93a9b68 (origin/wip-vector-op) erasure-code: use uintptr_t instead of long long +0082d88 doc: format man pages with s/2013/2014/ +b4054fc doc: copyright s/2013/2014/ +efbdd16 doc: update the crushtool manual page +283793a doc: crushtool man page nroff format +d3393e9 crush: tests for crushtool --build +26f7fa9 crush: crushtool copyright notice update +b705e52 crush: crushtool emacs compile helper +d3d75a2 crush: crushtool --build informative messages +5b28405 crush: crushtool --build uses OSDMap helpers for rulesets +1368229 crush: print --build debug information when verbose 2 +5b95d18 crush: display args on crushtool failure +2765f81 crush: parse CEPH_ARGS in crushtool +cf9a764 osd: factorize build_simple_crush_map* rulesets creation +7676550 osd: ostream is enough for build_simple* +cec8d85 (origin/wip-omapdirfrag2) mds: require CEPH_FEATURE_OSD_TMAP2OMAP +1d8429d osd/OSDMap: get_up_osd_features() +b8dfcc1 mds: use OMAP to store dirfrags +0f0dd74 osd: introduce TMAP->OMAP conversion operation +90d6cec (origin/wip-7135) src/test/ObjectMap: test clear_keys_header() call +617a50c src/test/librados/misc.cc: verify that omap_clear doesn't blast xattr +0c81849 os/DBObjectMap, FileStore: omap_clear should not remove xattrs +6225f2c mailmap: fix typo in Alexandre Maragone +d429ab5 (origin/wip-tier-snap) osd/OSDMonitor: fix 'osd tier add ...' pool mangling +f49d9cd osd: fix propagation of removed snaps to other tiers +3b3511c mon: debug propagate_snaps_to_tiers +631d0c7 erasure-code: erasure code decode interface helper +d2b2f5d erasure-code: jerasure implementation of chunk size helpers +eb2374e erasure-code: refactor the example to use chunk size helpers +1f3c1bd erasure-code: add chunk size calculation helpers +fa43d9c organizationmap: joe.buck@inktank.com is Inktank +8604e76 organizationmap: match authors with organizations +ce95cef mongoose: fix warning +af0269d mailmap: make roald@roaldvanloon.nl primary +f18b310 mailmap: remove company name from Pascal de Bruijn name +39db90f mailmap: add Andrew Leung, Carlos Maltzahn and Esteban Molina-Estolano +176cec8 mailmap: add David Moreau Simard alias +29da2ec FileStore: detect XFS properly +8c5c55c mon: set next commit in mon command replies +9395e0d rgw: fix temp url restful apis and support multiple keys +7ccb513 rgw: support multiple temp url keys +56e4015 rgw: handle temp url key authorization +0e43ac9 rgw: add optional tenant name for swift urls +2626101 rgw: can set temp url key on user +efb4cf6 doc: Removed extraneous comment from snapshot text. +5070597 (origin/install-erasure-headers) osd: add missing header to install list +a5f8cc7 (origin/wip-7110) rgw: convert bucket info if needed +029b9ef remove spurious executable permissions on files +995a3cc (origin/wip-max-file-size) mds/MDSMap: include max_file_size in plaintext print output +2de2148 mailmap: add Yan Zheng fixes for Reviewed-by: +62fbcac mailmap: add Loic Dachary fixes for Reviewed-by: +3fe5f11 mailmap: add Gary Lowell fixes for Reviewed-by: +17e0a5e mailmap: add Noah Watkins fixes for Reviewed-by: +43fa055 mailmap: add João Eduardo Luís fixes for Reviewed-by: +96d9b99 mailmap: add Dan Mick fixes for Reviewed-by: +7aac350 mailmap: add Samuel Just fixes for Reviewed-by: +6d0ba4d mailmap: add Greg Farnum fixes for Reviewed-by: +a3eb935 mailmap: add Yehuda Sadeh fixes for Reviewed-by: +f6b52fd mailmap: add Sage Weil fixes for Reviewed-by: +ca9acb9 mon: implement 'mds set max_mds|max_file_size' +0940d8f osd: Change waiting_on_backfill to a set +695255e osd: Interim working version with backfill reserve state changes +a07d682 osd: Recovery reservations need to include backfill peers +25a798e messages, os, osd: Clean-up g/hobject_t MAX handling +f89d410 osd: Return false for func that returns bool +7837490 osd: Fix problems in ReplicatedPG::do_op() logic +f9a11ef osd: Determine if compatibility is required due to back level OSDs +ba19006 osd: Config OSD when CEPH_FEATURE_OSD_ERASURE_CODES feature first seen +09d021b doc: Updated for hostname -s and resolving to non-loopback IP address. +ed605f0 doc: Fixed hyperlink. +b780f4b osd: Remove redundant incompat feature +294cdfb erasure-code: relax zero copy requirements in tests +656de1b erasure-code: ensure that coding chunks are page aligned +9ba6599 EC-JERASURE: rewrite region-xor function using vector operations to get ~ x1.5 speedups for erasure code and guarantee proper 64-bit/128-bit buffer alignment +31f3745 mailmap: Adds Christophe Courtaut +7d5674c doc: Added librados introduction doc. Still wip. +33e78a4 doc: Updated terminology. Added librados intro to index. +7acb0a1 (origin/port/onexit) on_exit: remove side effects from asserts +e3d0b0a common: fix large output in unittest_daemon_config +822ad58 configure: support Automake 1.12 +b1976dd (origin/wip-7083) radosgw-admin: fix object policy read op +3f34dc7 common: unit tests for config::expand_meta +9485409 common: recursive implementation of config::expand_meta +87db534 common: cosmetic inversion of tests arguments +5bb1545 common: multiple variable occurence expansion test +98ed9ac (origin/wip-7093) mon: only send messages to current OSDs +f68de9f osd: ignore OSDMap messages while we are initializing +35da8f9 osd: do not send peering messages during init +7aa9805 log: use on exit manager to flush logs on exit +2181d25 onexit: add an on exit callback utility +3d19f7c (origin/port/misc) test: disable cross process sem tests on non-Linux +6342d05 pipe: handle missing MSG_MORE and MSG_NOSIGNAL +26c07d9 ipaddr: use IN6_ARE_ADDR_EQUAL for comparison +ef6a56a keyutils: handle non-linux platform +ab2b2bb doc: Fixed typo. +bb8b750 add autotools-generated files to .gitignore +f2e33e8 mon: get rid of --keyring /dev/null hack +d110c91 doc: Removed dash from --dmcrypt option. +c772b6d ceph-disk: fix false positive for gitbuilder +e2ee528 (origin/wip-objectcacher-backoff) osdc/ObjectCacher: back off less during flush +daefe81 Be more explicit how to discover available API calls +de8522f ceph-disk: tests for the --data-dir code path +a71025d ceph-disk: implement --sysconfdir as /etc/ceph +ca713f4 ceph-disk: implement --statedir as /var/lib/ceph +51ee3c0 ceph-disk: add copyright notice +306b099 ceph-disk: create the data directory if it does not exist +0fcc081 ceph-disk: run ceph-osd when --mark-init=none +e773b68 ceph-disk: implement --mark-init=none +b65eb37 ceph-disk: fsid is a known configuration option +97f516a ceph-disk: use CalledProcessError.returncode +d09af0f ceph-disk: display the command output on OSD creation failure +2b935bb ceph-disk: which() uses PATH first +ad6b4b4 ceph-disk: add --prepend-to-path to control execution +908348b ceph-disk: make exception handling terse in main_activate_journal +55ca7bb ceph-disk: do not hide main_activate() exceptions +324804a ceph-disk: fix activate() indent +de00505 ceph-disk: remove noop try: +b82ccfb ceph-disk: fix Error() messages formatting +830583f osd: Correction to #6690 change +6b8d418 init-ceph: pass config file path when adjust crush position +2ba6930 ceph-disk: cannot run unit tests +24417f9 test/cli-integration/rbd: silence stderr +8220549 (origin/port/bitsandints) inttypes: detect and define missing integer types +8f91cac endian: check byte order on OSX +46a5674 doc/release-notes: fix bobtail version +f6bbcf4 mon: tests for ceph-mon --mkfs +41987db doc/release-notes: v0.74 +229740f ceph-conf: display arguments when an option cannot be parsed +07f5399 common: CEPH_ARGS should trim whitespaces +2b848a9 osdc: = is not a delimiter in --crush-location +7dfe550 ceph-disk: prepare --data-dir must not override files +4c8a313 mon: implement --key for --mkfs +ab6203f mon: fix indentation +e946df1 mon: do not use the keyring if auth = none +f12abbf (origin/wip-6914) mds: don't allow changing layout for non-regular file +f292992 mds: always store backtrace xattr in the default pool +cae663a osd/ReplicatedPG: improve debug output from check_local +ac547a5 (origin/wip-empty-rbd-ls) rbd: return 0 and an empty list when pool is entirely empty +e91fb91 librbd: better error when unprotect fails on unprotected snap +42e98ac Be more explicit how to discover available API calls +eeba294 mon: remove fixture directory between runs +1eafe8d mon: make ceph-mon --mkfs idempotent +f0ae4ab mon: create mon-data directory on --mkfs +d443841 mon: add flags argument to common_init_finish +403f777 mon: fix indentation +a194513 mon: do not daemonize if CINIT_FLAG_NO_DAEMON_ACTIONS +10aa220 mon: set CINIT_FLAG_NO_DAEMON_ACTIONS when appropriate +e0bae95 Fix typos in erasure code documents +2b0a435 osd_types: add missing osd op flags +f8e413f msgr: fix rebind() race stop the accepter and mark all pipes down before rebind to avoid race +8fcfc91 (origin/wip-listomapvals) qa: test rados listomapvals with >512 keys +be5afa2 rados: allow listomapvals to list all k/v pairs +c165483 (tag: v0.74) v0.74 +b4fc16c make: conditionally build filestore backends +9d41fd2 test_cls_rbd: avoid warning -Wno-unnamed-template-args +fdd8562 test_cls_rbd: avoid shift overflow +ce8b26e erasure: add dummy symbol to avoid warnings +5b77533 make: avoid symbol exporting for C++ libs on non-Linux +8c8be16 json_spirit: don't build json_spirit_value.cpp +da5a082 make: add top-level libcommon dependency +f7a66d6 make: restrict use of --as-needed to Linux +87db89e librados: read into user's bufferlist for aio_read +0b40bbd common: evaluate --show-config* after CEPH_ARGS +b5c17f6 vstart: set fsid in [global] +d7d7ca8 Fix qa/workunits/rados/test_cache_pool.sh typos +cc67b7b Fix test/filestore/store_test.cc error +e8e174e (origin/port/public-hdrs) rados: include struct timeval definition +356d71a inttypes: use portable types in public headers +76ad85d test: include headers for struct statfs +93c125c test: remove platform specific header +a625b28 test: print warning about missing fs features +9a7a33e test: only build some tests on linux +a48d038 test: fix VLA of non-POD type +424d7c7 gtest: disable tr1/tuple +0c09abd make: use c++ flags for building librados +891801e warning: fix typo and -Wmismatched-tags +c7e1c4b c++11: fix std::lock naming conflicts +bbcb022 kvstore: only build on linux +1fec818 (origin/port/spinlock) spinlock: add generic spinlock implementation +12f4631 qa/workunits/rest/test.py: rbd pool ruleset is now 0 +b286e4f ceph_test_rados_api_tier: retry EBUSY race checks +b88af07 libcephfs: get osd location on -1 should return EINVAL +250ecf6 qa/workunits/mon/crush_ops.sh: fix in-use rule rm test +d4f07cd crush: fix get_full_location_ordered +fd57d99 Fix rbd bench-write improper behavior +30078e6 autoconf: trim duplicated headers +f9f5c37 (origin/wip-rgw-leak) rgw: fix leak of RGWProcess +96fe80d (origin/wip-snaps) osd: preserve user_version in snaps/clones +80b5487 ceph_test_rados: test read from snapshots +2f8b602 osd/OSDMap: observe 'osd crush chooseleaf type' option for initial rules +9b7364d rbd: expose options available to rbd map +b3bda08 Lack of "start" member function declare in WBThrottle.h +4a9c770 messages: add tid to string form of MForward +67f99f3 packaging: make check needs argparse and uuidgen +4cea789 (origin/wip-rbd-tinc-5426) librbd: call user completion after incrementing perfcounters +f8a4001 osd: create default ruleset for erasure pools +8b2b5a3 mon: implement --osd-pool-default-crush-erasure-ruleset +dd81858 mon: implement --osd-pool-default-crush-replicated-ruleset +2a7fcc3 osd: use CrushWrapper::add_simple_ruleset +a10fc02 osd: build_simple creates a single rule +15b6959 crush: set min_rep and max_rep depending on mode +da67f7c crush: add rule_type argument to add_simple_ruleset +2ae9c1c partially rename rule to ruleset +8b0b32b doc: Add OpenStack Havana documentation +6e92ed1 osd: factorize build_simple and build_simple_from_conf +5cf2cdc qa: remove osd pool create erasure tests +c6d876a mon: osd-pool-create must not loop forever on kill +272eed3 client: SyntheticClient uses the first available pool +20b3da0 mon: MDS data and metadata pool numbers are hardcoded +bf24317 Fix WBThrottle thread disappear problem +87b8e54 (origin/wip-argparse-fix) ceph_argparse: kill _daemon versions of argparse calls +ea4724d rados: deprecated attribute has no argument +e7bf5b2 (origin/wip-librados-lock) librados: lockless get_instance_id() +771da13 objecter, librados: create Objecter::Op in two phases +5ff30d6 crush/CrushWrapper: note about get_immediate_parent() +0cdbc97 librados: mark old get_version() as deprecated +006449d librados: deprecate aio_operate() read variant that takes snapid +909f8a4 librbd: localize or distribute parent (snap) reads +22df773 osdc/Objecter: use crush location and distance for LOCALIZE_READS +ac14d4f osdc/Objecter: maintain crush_location multimap +746069e crush/CrushWrapper: simplify get_full_location_ordered() +dcc5e35 crush/CrushWrapper: add get_common_ancestor_distance() +0903f3f mon/OSDMonitor: use generic CrushWrapper::parse_loc_map helper +8f48906 crush/CrushWrapper: add parse_loc_[multi]map helpers +8fc66a4 (origin/wip-7056) osd/ReplicatedPG: fix copy-get iteration of omap keys +0c9acf1 ceph_test_rados: s/tmap/omap/ +3b0d9b2 vstart/stop: do not loop forever on kill +4ce6400 config: add 'crush location' option +19213e6 doc: Fix caps documentation for Admin API +ac10aa5 (origin/wip-fix-mon-fwd) mon: fix forwarded request features when requests are resent +2e4c61b osd/ReplicatedPG: include omap header in copy-get +537a7c3 (origin/wip-crush-shrink-diff) crush: misc formatting and whitespace fixes +fa6a99a crush: use kernel-doc consistently +6e36794 crush/mapper: unsigned -> unsigned int +d8512f1 mon: use kill instead of pkill in osd-pool-create +c030569 (origin/wip-7051) osd: OSDMap: dump osd_xinfo_t::features as an int +b4fbe4f mon: Monitor: Forward connection features +93c44cb mon: unit test for osd pool create +59941b1 mon: erasure code pool properties defaults +29d1fcd mon: add error message argument to prepare_new_pool +2d01da6 mon: do not include = in pool properties values +a44a57a common: implement get_str_map to parse key/values +df1704e osd: pool properties are not an array +df0d038 mon: osd create pool must fail on incompatible type +af22b0a packaging: erasure-code plugins go in /usr/lib/ceph +203c5d6 mon: s/rep/replicated/ in pool create prototype +d192062 ceph_test_rados: update in-memory user_version on RemoveAttrsOp +750da11 osd/ReplicatedPG: clear whiteout on successful copy-from +37eac2b ceph_test_rados: check existence on is_dirty completion +173b060 mon/OSDMonitor: propagate snap updates to tier pools on update +baa74d5 osd/OSDMap: implement propapage_snaps_to_tiers() +cf34af8 rgw: add -ldl for mongoose +9b182c7 ceph_test_rados_api_tier: more grace for HitSetTrim +2bb90b3 ceph_test_rados: update in-memory user_version on RemoveAttrsOp +a0d1521 replace pool type REP with REPLICATED +45449b8 doc/release-notes: missed a name +b0e42d8 doc/release-notes: v0.72.2 +c10ba91 pipe: add compat for TEMP_FAILURE_RETRY symbol +f13709d linux_version: build on all platforms +79c5a2e make: add libcommon for missing symbols +ab19c5f buffer: remove darwin portability cruft +cf9569f statfs: include headers for statfs structs +3510400 compat: enable lseek64 alias +9d72c4f libcephfs: ignore missing offset64 definition +d9a1ff3 rgw: add some debug output +cf53d8a rgw: abstract RGWProcess +cdc178f Revert "Enable libs3 support for debian packages" +1e238e6 mon: pool create will not fail if the type differs +5f1957d doc/release-notes: v0.67.5 +98a1525 unittests: fail if one test fail +9ab947c (origin/port/buffer) buffer: use int64_t instead of loff_t +03693ac osd: git ignore erasure code benchmark binary +42b4fe1 osd: erasure code benchmark is installed is part of ceph-test +81dee1b osd: erasure code benchmark workunit +a619fe9 osd: erasure code benchmark tool +a36bc5f osd: set erasure code packet size default to 2048 +c7d8ba7 osd: better performances for the erasure code example +ff9455b osd: conditionally disable dlclose of erasure code plugins +8879e43 osd: Fix assert which doesn't apply when compat_mode on +0bd5cb6 Add backward comptible acting set until all OSDs updated +8d31f71b osd/ReplicatedPG: fix promote cancellation +923bff1 osd/ReplicatedPG: drop RepGather::ondone callback +2a9c6fc vstart.sh: go faster +bc893f5 osd/ReplicatedPG: fix undirty on clean object +c561d5e osd/ReplicatedPG: track dirty, whiteout stat counts +028bb0d osd/osd_types: include num_objects_dirty, num_whiteouts in object_stat_sum_t +1403798 osd/ReplicatedPG: EBUSY on cache-evict when watchers are present +9ed6679 ceph_test_rados: test cache_flush, cache_try_flush, cache_evict +1dcbb66 ceph_test_rados_api_tier: fix HitSet* test names +99cee55 osd/osd_types: debug: include size in object_info_t operator<< +1af6723 osd/ReplicatedPG: debug: clean up oi printout +0d2d6a5 osd/ReplicatedPG: debug: add an assert for copy-get +2fda4c0 osd/ReplicatedPG: fix locking for promote +927b0e6 osd/ReplicatedPG: fix user_version preservation for copy_from +bc05104 osd/ReplicatedPG: handle ECANCELED in C_CopyFrom, C_Flush +2d5a7e2 osd/ReplicatedPG: uninline CopyFromCallback, PromoteCallback +54f0c60 osd/osd_types: make object_info_t::dump() dump user_version +ba2f9e2 osd/osd_types: include user_version in operator<< object_info_t +ffdaa5f vstart.sh: --cache to set up pool cache(s) on startup +57e9145 qa/workunits/rados/test_cache_pool.sh: fixes +1bde88f qa/workunits/rados: rename cache pool tests +ea519b4 qa/workunits/rados: test cache-{flush,evict,flush-evict-all} +71cd4a2 rados: add cache-flush, cache-evict, cache-flush-evict-all commands +ad3b466 osd/ReplicatedPG: implement cache-flush, cache-try-flush +edaec9a osd: Fix assert which doesn't apply when compat_mode on +ac16a9d (origin/wip-kill-raid4) osd: remove remaining instances of raid4 pool types (never implemented) +40a48de mds: fix Resetter locking +087fe57 packaging: revert adding argparse and uuidgen +8272538 packaging: make check needs argparse and uuidgen +f193925 autogen: test compare strings with != not -ne +98af37d Fix segmentation fault when handler is NULL pointer +44aacae (origin/wip-mds-coverity2) mds: fixes for coverity scan +8b38f10 crush/mapper: fix crush_choose_firstn comment +ea3a0bb crush/mapper: attempts -> tries +0497db4 crush/mapper: finish adding choose_local_[fallback_]tries +99f41de (origin/sage-valgrind) vstart.sh: NOTE, not WARNING, to make gitbuilder happy +b3ee598 (origin/wip-6028) qa: workunit: cephtool: test osd pool create with erasure type +250b446 pybind: test_ceph_argparse: test 'ceph osd pool create' with pool type +c996f66 mon: OSDMonitor: add optional 'pool type' arg to 'osd pool create' +bdeaa84 osd: OSDMap: add 'get_up_osds()' function +5756c05 ceph_osd: add EC to OSD's supported features used by the messenger +59ad6da osd: OSD: reflect OSDMap EC flag being set by setting on-disk feature +8ac84db mon: OSDMonitor: handle osd features on boot +31743d5 osd: OSDMap: add 'features' bit mask field to osd_xinfo_t +73992d2 osd: OSDMap: check for erasure pools when getting features +178f684 osd: OSD: add binary compat feature for Erasure Codes +bfc86a8 include/ceph_features: add CEPH_FEATURES_OSD_ERASURE_CODES +fe13684 added execute permission to the script +d9e33ea rgw workunit to test bucket quota +c8890ab rgw: fix use-after-free when releasing completion handle +d6a4f6a rgw: don't return data within the librados cb +e6ad4d4 osd: make obc copyfrom blocking generic +8dec2b2 librados, osd: add flags to COPY_FROM +e624e16 crush: silence error messages in unit tests +9414970 ARCH: adding SSE2 flag to arch-test +7e0c84b (origin/wip-crush-2) mon/OSDMonitor: 'osd crush show-tunables' +88365c2 crush: expand info about tunables that we dump +d0f14df mon: warn if crush has non-optimal tunables +d129e09 crush: add set_choose_local_[fallback_]tries steps +30f8aa1 vstart: Update apache conf to run against apache 2.4 +b86d450 upstart: add rbdmap script +e4537d3 ARCH: add variable for sse2 register +0d217cf qa/workunits/cephtool/test.sh: clean up our client.xx.keyring +7e4a800 (origin/wip-7026) osd/ReplicatedPG: fix hit_set_setup() on_activate() +19cff89 (origin/wip-6990) Add backward comptible acting set until all OSDs updated +b153067 erasure-code: tests must use aligned buffers +f5d32a3 mds: drop unused find_ino_dir +c60a364 Fix typo in #undef in ceph-dencoder +9e45655 qa: add ../qa/workunits/cephtool/test.sh to unittests +c1eb55c qa: vstart wrapper helper for unittests +0edbda2 (origin/wip-rbd-coverity) rbd: make coverity happy +d93881f vstart/stop: use pkill instead of killall +ae56cef qa: recursively remove .gcno and .gcda +b082c09 crushtool: reorg test-map-* cli tests +41d5186 crush/CrushWrapper: minor cleanup on tunables helpers +685c695 crush/mapper: generalize descend_once +6f43120 ceph_test_rados_api_tier: fix HitSetTrim vs split, too +c5bccfe ceph_test_rados_api_tier: fix HitSetRead test race with split +7e618c9 (origin/wip-7009) mon: move supported_commands fields, methods into Monitor, and fix leak +deded44 (origin/wip-rgw-standalone-2) mongoose: update submodule +ef10a5c rgw: fix memory leak +824b3d8 (origin/wip-linux-version) FileJournal: use pclose() to close a popen() stream +6696ab6 FileJournal: switch to get_linux_version() +fcf6e98 common: introduce get_linux_version() +a2babe2 configure: break up AC_CHECK_HEADERS into one header-file per line +fae569d Rename filestore_perf_t to objectstore_perf_t +015e981 Move PerfCounter from ObjectStore.h to FileStore.h +4526d13 (origin/wip-mds-cluster2) mds: fix stale session handling for multiple mds +43f7268 mds: properly set dirty flag when journalling import +802df76 mds: properly update mdsdir's authority during recovery +b6d1d8f mds: finish opening sessions even if import aborted +80005f1 mds: fix discover path race +a680ea7 osd/ReplicatedPG: update pg stat fields when they are queried +ebb3ad9 osd/PG: move some pg stat update into a helper +05274f3 osd: include peer_info in pg query +5fdcc56 mds: fix bug in MDCache::open_ino_finish +71d1eb3 mds: add CEPH_FEATURE_EXPORT_PEER and bump the protocal version +d0b744a1 client: handle session flush message +05b192f mds: simplify how to export non-auth caps +9dc52ff mds: send cap import messages to clients after importing subtree succeeds +6a56588 mds: re-send cap exports in resolve message. +4fdeb00 mds: include counterpart's information in cap import/export messages +ef902ee mds: send info of imported caps back to the exporter (rename) +85171fd mds: send info of imported caps back to the exporter (cache rejoin) +ff8b9ac mds: send info of imported caps back to the exporter (export dir) +d00ec79 mds: flush session messages before exporting caps +77515b7 mds: increase cap sequence when sharing max size +6525979 mds: include inode version in auth mds' lock messages +f134c77 mds: avoid allocating MDRequest::More when cleanup request +e6c4d32 mds: waiting for slave reuqest to finish +1536e81 mds: check lock state before eval_gather +e181869 mds: don't request CEPH_CAP_PIN from auth mds +87ca260 mds: fix sending resolve message +b7d7891 mds: keep dentry lock in sync state +d8440c4 mds: avoid leaving bare-bone dirfrags in the cache +b2a1370 mds: re-issue caps after importing inode +3ac0886 mds: avoid issuing caps when inode is frozen +31f5b02 mds: fix rename notify +bd56177 mds: re-send discover if want_xlocked becomes true +913f7fd mds: fix empty directory check +2fea08b mds: merge delayed cache expire +498d5c4 mds: process delayed expire if exporting dir cancelled in warnning state +0aed0d4 mds: handle cache rejoin corner case +5a902a0 mds: unify nonce type +0344d9a mds: rework stale import/export message detection +9471fdc mds: put import/export related states together +ab93aa5 mds: freeze tree deadlock detection. +f192a60 Revert "common/Formatter: add newline to flushed output if m_pretty" +c7b44d6 Revert "common: fix perf_counters unittests for trailing newline in m_pretty" +31507c9 qa: test for error when ceph osd rm is EBUSY +31b60bf rgw: Fix CORS allow-headers validation +4b9a41a qa: make cephtool test imune to pool size +f9cfa24 qa: add function name and line number to cephtool output +cb35248 qa: silence cephtool tests cleanup +15b8616 mon: set ceph osd (down|out|in|rm) error code on failure +6a7edab rgw: Clarify naming of case-change functions +2abacd9 rgw: Look at correct header about headers for CORS +e37467b Add -n option to mount.ceph. Required by autofs when /etc/mtab is a link to /proc/mounts (e.g. Debian Wheezy), otherwise automounting a ceph file system fails. Also useful when /etc is read-only. feature 7006 +aa365e4 mon: typo s/degrated/degraded/ +5741bfe osd: format test_osd_types.cc to 80 columns +07888ef ceph-disk: zap needs at least one device +e57239e common: fix rare race condition in Throttle unit tests +938f22c common: format Throttle test to 80 columns +ba55723 common: fix perf_counters unittests for trailing newline in m_pretty +0dc59af osd/ReplicatedPG: fix promote: set oi.size +697151e osd/osd_types: fix operator<< on copy-get operation +f50389d ceph_test_rados_api_tier: test undirty on non-existent object +f86d6e7 osd/ReplicatedPG: debug: improve maybe_handle_cache() handling +81279e3 osd/ReplicatedPG: rename invalidate_forward +87547bd ceph_test_rados: debug: include exists|dne in update_object_version +d1e63b3 ceph_test_rados: test is_dirty, undirty +14f76cc ceph_test_rados: fix CopyFromOp locking +41be4fe librados: seek during object iteration +330a130 osdc/Objecter: remove honor_cache_redirects global flag +42d6af1 osd/ReplicatedPG: use IGNORE_OVERLAY flag for copy-from +067536c osdc/Objecter: add CEPH_OSD_FLAG_IGNORE_OVERLAY flag +3d9c499 osd: rename IGNORE_OVERLAY -> IGNORE_CACHE +ea088fa osd/osd_types: operator<< for ObjectContext::RWState +c0e4ed3 osd/ReplicatedPG: more verbose heading for process_copy_chunk +90eb1ec osd/ReplicatedPG: set ctx->obc in simple_repop_create +ca86656 osd/ReplicatedPG: use finish_ctx for finish_promote +66263bb osd/ReplicatedPG: use get_next_version() in finish_promote +56ad14e osd/ReplicatedPG: split off finish_ctx from execute_ctx +3ef7310 osd/ReplicatedPG: add SKIPRWLOCKS flag +5e547f8 osd/ReplicatedPG: be consistent about ctx->obs vs ctx->obc->obs +36bbcf8 osd/ReplicatedPG: drop unnecessary temp vars in execute_ctx() +10c9be3 osd/ReplicatedPG: allow osds to issue writes to osds +20d149e osd/ReplcatedPG: maybe_handle_cache style +0b81ff6 osd/ReplicatedPG: skip promote for DELETE +4c014ed osd/ReplicatedPG: implement cache_evict +8b9b713 librados: add an aio_operate that takes a write and flags +8528231 osd/osd_types: introduce helper for osd op flags -> string conversion +181cb8e librados, osd: add IGNORE_OVERLAY flag +387e224 librados: add cache_flush(), cache_try_flus(), cache_evict() methods +78df1c3 osd/ReplicatedPG: set object_info and snapset xattrs on promote +dd079e2 osd/ReplicatedPG: handle is_whiteout in do_osd_ops() +fd8f7d2 osd/ReplicatedPG: clear whiteout when writing into cache tier +fabc6ba osd/ReplicatedPG: set whiteout in cache pool on delete +2aea631 ceph_test_rados_api_tier: verify delete creates whiteouts +e0a4969 osd/ReplicatedPG: ENOENT when deleting a whiteout +0b085b1 osd/ReplicatedPG: create whiteout on promote ENOENT +0b7b16d ceph_test_rados_api_tier: add simple promote-on-read test +be29f47 ceph_test_rados_api_tier: rename tests +66f2e74 osd/ReplicatedPG: use simple_repop_{create,submit} for finish_promote +654d8c3 osd/ReplicatedPG: UNDIRTY is not a user_modify +4a29b22 osd/ReplicatedPG: move r<0 handling into finish_promote() +920c0bf workunits: break down cache pool tests to be more precise; expand some +0caa02c5 workunits: check errors propagate on cache pools in caching_redirects.sh +5fa08fb ReplicatedPG: promote: handle failed promotes +d15aedb ReplicatedPG: promote: add the OpRequest to the Callback +b371dd8 ReplicatedPG: promote: first draft pass at doing object promotion +0699fc5 ReplicatedPG: copy: don't return from finish_copyfrom +325aae3 ReplicatedPG: copy: switch out the CopyCallback interface +a3e50b0 rgw: rework framework configuration +b7946ff doc: Added additional comments on placement targets and default placement. +902f19c doc: Updates to federated config. +29cc722 (origin/wip-hitset) test_ipaddr: add another unit test +026b724 osd/ReplicatedPG: drop unused hit_set_start_stats +3d768d2 osd/ReplicatedPG: maintain stats for the hit_set_* objects +9814b93 osd/ReplicatedPG: set object_info_t, SnapSet on hit_set objects +dabd5d6 vstart.sh: --hitset +5bb0476 test/libcephfs: release resources before umount +897dfc1 (origin/wip-6979) use the new get_command helper in check_call +eae8531 (origin/wip-rbd-single-major) rbd: modprobe with single_major=Y on newer kernels +8a473bc rbd: add support for single-major device number allocation scheme +784cc89 rbd: match against both major and minor on unmap on newer kernels +462b389 rbd: match against whole disks on unmap +a421305 rbd: switch to strict_strtol for major parsing +24a048b Document librados's rados_write's behaviour in reguards to return value. +a865fec osd/ReplicatedPG: debug: improve hit_set func banners +b6871cf osd/ReplicatedPG: do not update current_last_update on activate +bcde200 (origin/wip-vstart-memstore) vstart.sh: add --memstore option +a9334a1 use the absolute path for executables if found +43561f7 remove trailing semicolon +a33c95f radosgw: increase nofiles ulimit on sysvinit machines +71cefc2 doc/release-notes: sort +ee3173d doc/release-notes: fix indentation; sigh +3abc189 doc/release-notes: v0.73 +03429d1 PendingReleaseNotes: note CRUSH and hashpspool default changes +bb50276 Revert "Partial revert "mon: osd pool set syntax relaxed, modify unit tests"" +0cd36e0 mon/OSDMonitor: take 'osd pool set ...' value as a string again +e19e380 replace sgdisk subprocess calls with a helper +4b6d721 (origin/wip-hashpspool) osd: enable HASHPSPOOL by default +fb47d54 (origin/wip-mon-api) mon: if we're the leader, don't validate command matching +2bfd34a mon: by default, warn if some members of the quorum are "classic" +e620057 add apt-get install pkg-config for ubuntu server +b8884e0 MemStore: update for the new ObjectStore interface +8ac1da8 crush: remove crushtool test leftover +ec609ca Elector: use monitor's encoded command sets instead of our own +e223e53 Monitor: encode and expose mon command sets +420a2f1 man: update man/ from doc/man/8 +8d60cd1 man: Ceph is also an object store +faaf546 os/MemStore: do on_apply_sync callback synchronously +d8ad51e (tag: v0.73) v0.73 +990b2b5 ceph_test_rados_api_tier: make HitSetWrite handle pg splits +a6f4d71 Elector: keep a list of classic mons instead of each mon's commands +a888a57 crush: implement --show-bad-mappings for indep +20263dd crush: add unitest for crushtool --show-bad-mappings +fbc4f99 crush: remove scary message string +472f495 crush: document the --test mode of operations +ea86444 Monitor: Elector: share the classic command set if we have a classic mon +f1ccdb41 Elector: share local command set when deferring +ba673be Monitor: import MonCommands.h from original Dumpling and expose it +3cb58f7 Monitor: validate incoming commands against the leader's set too +cb51b1e Monitor: disseminate leader's command set instead of our own +d33df28 Elector: transmit local api on election win, accept leader's on loss +8025fb3 messages: make room for passing supported monitor commands in MMonElection +f932903 Monitor: pull command mapping out of _allowed_command() +b8bdbd9 doc: update erasure code development doc +41152a6 crush: --show-utilization* implies --show-statistics +dcb0a4f Monitor: add a separate leader_supported_commands +4cd5c3b Monitor: expose local monitor commands to other compilation units +dca5383 MonCommand: add operator== and operator!= +ac69a01 MonCommand: support encode/decode +3dcbf46 encoding: fix [encode|decode]_array_nohead +7482d62 crush: add CrushTester accessors +c928f07 crush: output --show-bad-mappings on err +5e0722f crush: fix map->choose_tries boundary test +ef4061f librbd: remove unused private variable +ad3825c TrackedOp: remove unused private variable +3b39a8a librbd: rename howmany to avoid conflict +539fe26 (origin/port/fdatasync) wbthrottle: use feature check for fdatasync +663da61 rados_sync: fix mismatched tag warning +60a2509 rados_sync: remove unused private variable +43c1676 mon: check for sys/vfs.h existence +c99cf26 make: increase maximum template recursion depth +e2be099 (origin/port/compat) compat: define replacement TEMP_FAILURE_RETRY +3b3cbf5 (origin/wip-fix-tunables) crush/CrushCompiler: make current set of tunables 'safe' +8535ced crushtool: remove scary tunables messages +4eb8891 crush/CrushCompiler: start with legacy tunables when compiling +e8fdef2 crush: add indep data set to cli tests +564de6e (origin/wip-fix-3x) osdmaptool: fix cli tests for 3x +6704be6 osd: default to 3x replication +8d0180b (origin/wip-objecter-full-2) objecter: don't take extra throttle budget for resent ops +38647f7 Revert "osd: default to 3x replication" +cbeb1f4 crush: detach_bucket must test item >= 0 not > 0 +2cd73f9 crush: remove obsolete comments from link_bucket +e00324b crush: remove redundant code from move_bucket +8ef80a4 crush: unittest CrushWrapper::move_bucket +a6d66f9 common/bloom_filter: fix copy ctor +638b274 ceph_test_rados_api_tier: add HitSetRead +01cbbfa ceph_test_rados_api_tier: HitSetRead -> HitSetWrite +456daf2 ceph_test_rados_api_tier: add HitSet trim test +3ea9230 osd/HitSet: fix sealed initialization in Params ctor +f0cfd22 ceph_test_rados_api_tier: make HitSetRead test less noisy +bf96a7e osd/HitSet: fix copy ctor +01f3ff7 osd/HitSet: fix dump() of fpp +c941e82 test/encoding/check-generated: test copy ctor, operator= +1c107d3 ceph-dencoder: add 'copy' command to test operator= +c0eb95b mds/Capability: no copying +1d0af14 test: add a HitSet unit test +c365cca osd/HitSet: track BloomHitSet::Params fpp in micros, not as a double +146e6aa osd/ReplicatedPG: archive hit_set if it is old and not full +737533f osd: prevent zero BloomHitSet fpp +a72094d osd/HitSet: take Params as const ref to avoid confusion about ownership +68c44cb mon/OSDMonitor: non-zero default bloom fpp +41e0f97 osd/HitSet: make pg_pool_t and Params operator<< less parenthetical +5da1285 osd/ReplicatedPG: apply log to new HitSet to capture writes after peering +fa76d5e ReplicatedPG: do not seal() HitSets until we're done with them +3c2d2d7 pg_hit_set_info_t: remove unused size, target_size members +1e94e27 ceph_test_rados: hit hit_set_{list,get} rados operations +4a743fb osd/ReplicatedPG: trim old hit_set objects on persist +916313c osd/ReplicatedPG: put hit_set objects in a configurable namespace +a0cfbfd librados: create new ceph_test_rados_api_tier target +0c43b77 librados, osd: list and get HitSets via librados +904859e osd/ReplicatedPG: use vectorized osd_op outdata for pg ops +a97129f osd/ReplicatedPG: add basic HitSet tracking +b92f431 mon/OSDMonitor: set hit_set fields +db3fd11 osd: add hit_set_* parameters to pg_pool_t +e8ef724 osd/osd_types: include pg_hit_set_history_t in pg_info_t +a430525 osd/osd_types: add pg_hit_set_{info,history}_t +b5ea470 common/bloom_filter: fix operator= +c01b183 osd_types: add generic HitSet type with bloom and explicit implementations +0b9874c osd/ReplicatedPG: factor out simple_repop_{create,submit} helpers +9776e97 osd/PG: factor out get_next_version() +0b0d1e8 librados: add wait_for_latest_osdmap() +8285906 librados: expose methods for calculating object hash position +4b5ab3f osdc/Objecter: expose methods for getting object hash position and pg +92879f7 osd: capture hashing of objects to hash positions/pgs in pg_pool_t +76e0b88 osd/OSDMap: use new object_locator_t::hash to place object in a pg +d692da3 osd/osd_types: add explicit hash to object_locator_t +0d4ea9f encoding: allow users to specify a different compatv after encoding +d2963c0 librados: add mon_command to C++ API +468fffa librados: document aio_flush() +bc7ace2 librados: constify inbl command args +a29d4fc osdc/Objecter: constify inbl command args +fb49065 mon/MonClient: constify inbl command args +ef0f255 osdc/Objecter: reimplement list_objects +d2e6cc6 librados: add get_pg_hash_position to determine pg while listing objects +eff932c osdc/Objecter: stick bl inside ListContext +8e5803a osdc/Objecter: factor pg_read out of list_objects code +dd8c939 osdc/Objecter: separate explicit pg target from current target +9381b69 osdc/Objecter: drop redundant condition +bffcca6 osd/osd_types: make pref optional in pg_t constructor +3caf3ef rbd: check write return code during bench-write +e32874f objecter: resend all writes after osdmap loses the full flag +4111729 osd: drop writes when full instead of returning an error +384f01d crush/mapper: dump indep partial progression for debugging +e632a79 PendingReleaseNotes: note change of CRUSH indep mode in release notes +c853019 crush: add feature CRUSH_V2 for new indep mode and SET_*_TRIES rule steps +caa0e22 crush: CHOOSE_LEAF -> CHOOSELEAF throughout +431a13e osd/OSDMap: fix feature calculation for CACHEPOOL +03911b0 crush/CrushCompiler: [de]compile set_choose[leaf]_tries rule step +09ce7a2 crush/CrushWrapper: set chooseleaf_tries to 5 for 'simple' indep rules +d1b9746 crush/mapper: add SET_CHOOSE_TRIES rule step +64aeded crush/mapper: apply chooseleaf_tries to firstn mode too +cb88763 crush/mapper: fix up the indep tests +4e26cc0 crush: unittest CrushWrapper::get_immediate_parent +09938e6 crush: unittest CrushWrapper::update_item +16ac590 crush: unittest s/std::string/string/ +b819018 crush: unittest use const instead of define +dc09521 crush: unittest CrushWrapper::check_item_loc +000c59a crush: unittest remove useless c->create() +7a9a088 (origin/wip-6940) rgw: fix reading bucket policy in RGWBucket::get_policy() +cb26fbd (origin/wip-3x) osd: default to 3x replication +aedbc99 crush: check for invalid names in loc[] +fe03ad2 osd: queue pg deletion after on_removal txn +aa63d67 os/MemStore: implement reference 'memstore' backend +47ee797 (origin/wip-mon-mds-trim) mon: ceph-kvstore-tool: get size of value for prefix/key +c98c104 tools: ceph-kvstore-tool: output value contents to file on 'get' +00048fe mon: Have 'ceph report' print last committed versions +cc64382 mon: MDSMonitor: let PaxosService decide on whether to propose +5823146 os/ObjectStore: make getattrs() pure virtual +11e26ee s/true/1 and s/false/0 +cf09941 mon: MDSMonitor: implement 'get_trim_to()' to let the mon trim mdsmaps +3e845b5 mon: MDSMonitor: print map on encode_pending() iff debug mon = 30+ +62fb475 mon: MDSMonitor: consider 'debug level' parameter on 'print_map()' +032a00b mon: MDSMonitor: remove reference to no-longer-used encode_trim() +ccc6014 crush: CrushWrapper unit tests +b9bff8e crush: remove redundant test in insert_item +8af7596 crush: insert_item returns on error if bucket name is invalid +3b8371a os/ObjectStore: prevent copying +a70200e os/ObjectStore: pass cct to ctor +35011e0 Call --mbrtogpt on journal run of sgdisk should the drive require a GPT table. +cae1083 ObjBencher: add rand_read_bench functions to support rand test in rados-bench +e829859 doc/rados/operations/crush: fix more +7709a10 doc/rados/operations/crush: fix rst +68fdcfa (origin/wip-6922) FileSTore: do not time out threads while they're waiting for op throttle +7ff7cf2 (origin/wip-doc-build-cluster) doc: Partially incorporated comments form Loic Dachary and Aaron Ten Clay. +5e34beb init, upstart: prevent daemons being started by both +c43c893 crush/mapper: new SET_CHOOSE_LEAF_TRIES command +2731d30 crush/mapper: pass parent r value for indep call +1b567ee crush/mapper: clarify numrep vs endpos +d51a219 osd/osd_types: pg_pool_t: fix /// -> ///< comments +1413837 mon, crush: add mode to "osd crush rule create-simple ..." +6dc68f4 osd/OSDMap: do not shift result when removing nonexistent osds +9085286 osd, crush: add 'erasure' pool/pg type +9435099 crush/mapper: strip firstn conditionals out of crush_choose, rename +0b9bb54 crush: add a few unit tests for INDEP mode +4551fee crush/mapper: add note about r in recursive choose +7967ae0 crush/CrushWrapper: add dump_tree() +86e9780 crush: use breadth-first search for indep mode +b1d4dd4 crush: return CRUSH_ITEM_UNDEF for failed placements with indep +1cfe140 crush: eliminate CRUSH_MAX_SET result size limitation +858a21b (origin/wip-filestore-remount) common/WorkQueue: allow start() after stop() +36505e8 os/FileStore: allow mount after umount +cd6be29 common/Finisher: allow finisher to be restarted +941875d doc: Partially incorporated comments from Aaron Ten Clay. +d8ccd73 OSDMonitor: use a different approach to prevent extreme multipliers on PG splits +dc06e23 test/mon/workloadgen: added check of return value for statfs() +0fd3cbf rgw/rgw_op: added check of return value for rgw_unlink_bucket() +9c8df34 os/WBThrottle: added check of return value for posix_fadvise() +de09778 test/filestore: add check of return values in StoreTest::SetUp +2884c81 test/filestore/workloadgen: added check of return value for mkdir +602d5d5 osd: include CPU info +f502530 pybind: syntax check osd metadata +6570197 ceph-disk: blacklist /dev/fd0 +bcb6bfd test/ceph_decoder: add return value check for read_file() +20507b5 (origin/wip-crush-tunables) crush/CrushWrapper: default to the "new" bobtail-era tunables +07978bb crush/CrushWrapper: explicitly set tunables on create, decode +3f1352f doc/rados/operations/crush-map: describe crush locations, hook +396ee0d add script/run-coverity +01ab8e6 OSDMap: use unsigned instead of int for OSD counts +a5eda4f doc: Updated scrub defaults and added note about deep scrubbing. +f11b380 osd: read into correct variable for magic string +f57dad6 OSDMonitor: prevent extreme multipliers on PG splits +26c00c5 OSDMonitor: return EEXIST if users try to do a PG merge +4fdc5d9 workunits: use integers instead of true/false for hashpspool command +c77ce90 doc: Fixed hyperlink to the manual installation section. +648f3bc doc: Added a link to get packages. +16b7576 osd/OSDMap: fix typo and crush types helper +6298a57 (origin/wip-crush-chassis) osd/OSDMap: add region, pdu, pod types while we are at it +3a6707a osd/OSDMap: add 'chassis' to default type hierarchy +5e1fc14 README: update a list of build deps for rpm-based systems +e80ab94 Partial revert "mon: osd pool set syntax relaxed, modify unit tests" +fd175ab (origin/wip-6699) sysvinit, upstart: use df -P when weighting new OSDs +4d140a7 os/ObjectStore: add {read,write}_meta +6bb42a0 osd: move peek_journal_fsid() into ObjectStore (from OSD) +bf5a7b2 os/ObjectStore: generalize the FileStore's target_version +e0f2089 osd: construct ObjectStore outside of OSD +41056e5 osd: use ObjectStore::create() helper to create ObjectStore impl +237d6b8 os/ObjectStore: add static create() method +6d92a8e osd: drop obsolete 'filestore' bool option +2974eb5 osd: include misc osd config info in metadata sent to the mon +ea9dabf mon/OSDMonitor: include osd metadata in 'ceph report' +c4f817f mon/OSDMonitor: move osd metadata dump into a helper +838b6c8 PG: don't query unfound on empty pgs +964c8e9 PG: retry GetLog() each time we get a notify in Incomplete +14cf4ca (origin/wip-6892) rgw: don't error out on empty owner when setting acls +7ec21ed Mark libcls_kvs as a module +e5357c0 test: remove zero-copy read_fd test temporarily +bafb5c3 doc: clarify crush rule create-simple and fix typos +371dc71 doc: fix formatting typo in mon configuration +00ee9a5 doc: improve ceph-mon usage, fix ceph tell examples +4fa8f68 README: add yum command line +b0dce8a (origin/wip-mds-assert) mds: Add assertion to catch object mutation error +09a4c1b (origin/wip-5871) mds: remove superfluous warning of releasing lease +c409e36 mon: osd dump should dump pool snaps as array, not object +03d63c4 buffer: turn off zero-copy reads for now +784d188 mds: Release resource before return +524f666 rbd: Release resource before return +66f51f8 osd: Remove bogus assert(active == acting.size()) +5ccc2ec SubmittingPatches: describe github pull-request process +ab05580 Add missing stuff to clean target +ae46c38 Correctly mark library modules +94ca1cc ceph-object-corpus: revert accidental revert +75d4a72 (origin/wip-zero-copy-bufferlist-last) buffer: enable tracking of calls to c_str() +445fb18 buffer: try to do zero copy in read_fd +be29b34 buffer: attempt to size raw_pipe buffers +3f6fa05 buffer: add methods to read and write using zero copy +5021b43 buffer: create raw pipe-based buffer +eb94b8f buffer: add an exception with an error code +30bc0e2 safe_io: add functions for handling splice +b8518fe buffer: remove unused raw::length() method +ebb261f buffer: abstract raw data related methods +740d406 doc: Clarified description on scrub load threshold. +8a3ed9b doc: Fixed instruction. +fc5789d doc: Added commentary to configure pg defaults. Clarified size commentary. +dceaef4 doc: PG splitting added to docs. +d39676b doc: Took out "future" reference to namespaces. +9a55d89 doc: Clarification of terms. +b35fc1b (origin/wip-6804) rgw: lower some debug message +561e7b0 (origin/wip-6829) rgw: initialize RGWUserAdminOpState::system_specified +b2ee935 (origin/wip-6796) PendingReleaseNotes: mention 6796 and 'ceph osd pool set' behavior change +7c6d43c doc: rados: operations: pools: document 'osd pool set foo hashpspool' +49d2fb7 mon: OSDMonitor: don't crash if formatter is invalid during osd crush dump +337195f mon: OSDMonitor: receive CephInt on 'osd pool set' instead on CephString +7191bb2 mon: OSDMonitor: drop cmdval_get() for unused variable +50868a5 (origin/wip-6705) qa: workunits: mon: ping.py: test 'ceph ping' +6b5aaf3 doc: Minor updates to manual deployment document. +3502d4f init: fix typo s/{$update_crush/${update_crush/ +29178d8 doc: Cleanup of Add/Remove OSDs. +634295d doc: Cleanup on Add/Remove monitor. +de2bcd5 doc: Added a manual deployment doc. +10b4bf6 doc: Added manual deployment section to index. +f753d56 test: use older names for module setup/teardown +72bba1f doc: Added fixes to osd reporting section. +86e4fd4 (origin/wip-flush-5855-review) osd: Backfill peers should not be included in the acting set +19dbf7b osd: Simple dout() fix +82e1e7e PG: remove unused Peering::flushed +9ff0150 PG: don't requeue waiting_for_active unless flushed and active +41272e7 ReplicatedPG/PGBackend: block all ops other than Pull prior to active +6c1aaa4 PG: call start_flush in Active() instead of using do_pending_flush() +e657369 PG,ReplicatedPG: allow multiple flushes to be in progress +da77553 ReplicatedPG,PG: move duplicate FlushedEvt logic info on_flushed() +68e0e06 doc: warn about #6796 in release notes +574cb61 man: re-generate changed man pages +0de0efa RBD Documentation and Example fixes for --image-format +40a76ef (origin/wip-osd-bench-size) osd: fix bench block size +703f9a0 Revert "JounralingObjectStore: journal->committed_thru after replay" +f0c8931 release-notes: clarify that the osd data directory needs to be mounted +ba67b9f doc/release-notes.rst: v0.72.1 release notes +96d7a2e doc: Fix wrong package names on Debian Wheezy for building Ceph +878f354 ceph-filestore-tool: add tool for fixing lost objects +bf7c09a osd_types: fix object_info_t backwards compatibility +1212a21 CephContext: unregister lockdep after stopping service thread +dd9d8b0 ReplicatedPG: test for missing head before find_object_context +d8d27f1 JounralingObjectStore: journal->committed_thru after replay +a7063a1 (origin/wip-6768) Use clearer "local monitor storage" in log messages +dcef9fb (origin/po-pr838) automake: replaced hardcoded '-lboost_program_options' with a macro +125582e autoconf: add check for the boost_program_options library +cfb82a1 (origin/port/fallocate) filejournal: add journal pre-allocate for osx +d39ff4c mon/OSDMonitor: 'osd metadata N' command +ea16435 mon/OSDMonitor: record osd metadata key/value info +6d40e94 osd: send host/kernel metadata to mon on boot +aef3402 doc/release-notes: fix dup +21637cc doc: Updated Emperor reference to 0.72. +8b5719f doc: Added Emperor upgrade. +7f45e72 doc: Added dumpling to the sequence. +efe55b1 doc: Remove redundant command for quick start preflight +fbdfe61 (origin/port/unused-headers) trace: remove unused header +762acec mon: Monitor: make 'quorum enter/exit' available through the admin socket +01f7b46 (origin/port/stat) client: use platform-specific stat time members +2f76ac3 (origin/wip-da-SCA-master) mon/MDSMonitor.cc: remove some unused variables +91627f2 test_seek_read.c: remove unused variable 'off64_t so' +0da5a01 rgw: remove unused variables +6566dfb osd/ReplicatedPG.cc: remove unused variable +ace35f2 Client.cc: remove unused variable from Client::CommandHook::call() +9226a97 rgw/rgw_user.cc: use static_cast<>() instead of C-Style cast +548fc13 rgw/rgw_http_client.cc: use static_cast<>() instead of C-Style cast +fbdfd87 remove unused variable from Objecter::RequestStateHook::call() +d0cf2bf ErasureCodeExample.h: prefer prefix ++operator for non-primitive types +36ae9eb osd/osd_types.cc: use !p.tiers.empty() instead of size() +6b5a96b ErasureCodeJerasure.cc: prefer prefix ++operator for non-primitive types +23f7bfc osd/ErasureCodePlugin.cc: prefer prefix ++operator for non-primitive types +a8e10d3 os/ObjectStore.cc: prefer prefix ++operator for non-primitive types +555e717 mon/OSDMonitor.cc: prefer prefix ++operator for non-primitive types +0803d60 common/buffer.cc: prefer prefix ++operator for non-primitive types +5832e26 (tag: v0.72) v0.72 +84fb1bf rgw: deny writes to a secondary zone by non-system users +d8f0502 doc/release-notes: note crush update timeout on startup change +1ee112f osdmaptool: fix cli tests +082e7c9 Ceph: Fix memory leak in chain_flistxattr() +c7a30b8 ReplicatedPG: don't skip missing if sentries is empty on pgls +5fe3dc6 objecter: clean pause / unpause logic +98ab7d6 (origin/wip-objecter-full) objecter: set op->paused in recalc_op_target(), resend in not paused +afb3566 (origin/port/detect-clang) conf: use better clang detection +ac04481 (origin/port/func-name) assert: choose function-var name on non-gnu +1d030d1 (origin/port/gtest-death-tests) test: Only build death tests on platforms that support them +c6826c1 (origin/wip-6719) PG: fix operator<<,log_wierdness log bound warning +f4648bc PGLog::rewind_divergent_log: log may not contain newhead +25b7349 osd/ErasureCodePlugin: close library before return on error +c3d20f2 osd/erasurecode: free allocated memory before return NULL +bfd5b90 mon/MDSMonitor: remove unnecessary assignment +89d5396 osd/erasurecode: correct one variable name in jerasure_matrix_to_bitmatrix() +2aaed99 Revert "doc: radosgw workaround for OpenStack Horizon bug" +c5c399d objecter: don't resend paused ops +5a44e17 (origin/wip-6677) rgw: add compatibility for MultipartUpload +a3ccd29 RadosModel: use sharedptr_registry for snaps_in_use +c22c84a osdmaptool: don't put progress on stdout +81a3ea1 (origin/port/rgw) rgw: add compat file for name service macros +5dc6419 rgw: avoid sighandler_t in favor of sig_t +e9880cf (origin/port/missing-headers) crush: add mising header for count +a10345a auth: add missing header for list +01a5a83 mon: add missing header for std::find +e71a2f0 auth: add missing header file for std::replace +0209568 (origin/port/utime) utime: use to_timespec for conversion +4c3b6d6 rgw: allow multiple frontends of the same framework +e25d32c rgw: clean up shutdown signaling +6d737ce rgw: clean up front end configuration +abc2177 rgw: more flexible frotnend handler config +bbcddef Add a verbose argument and some verbosity +c4b0431 Verify that radosgw started, return appropriate exit code +0c61091 We should exit 1 if radosgw is not executable +1cc8558 (origin/port/detect-libresolv) autoconf: check for res_nquery explicitly +ea725d3 (origin/port/bootstrap) autogen.sh: use glibtoolize when available +00734ec autogen: set exit on error +154ee0b FileStore::_collection_move_rename: handle missing dst dir on replay +1fe762c rgw: refactor request handling processing +6818795 rgw: support http/1.0 keep-alive response (mongoose) +fc7c196 rgw: update code to handle mongoose v4.1 +e065b71 rgw: add SERVER_PORT to mongoose environment +4779e66 rgw: configurable mongoose port +d0bd7f3 rgw: support for mongoose keepalive +fe6cd9b rgw: rebase mongoose prototype +ed3caf7 mongoose: submodule, v4.1 +2fcaa1f pdatedoc: Added index link to new install doc. Requires merge of wip-doc-install to work. +917dd71 doc: Deleted old manual install doc. +195e861 (origin/wip-doc-install) doc: Mentioned that install procedure is for manual deployments, not ceph-deploy or others. +2aa6cde doc: Changed text for ceph-extras. Made it required. Mentioned newer versions. +d03924c (origin/wip-da-fix-galois-warning) galois.c: fix compiler warning +6821a6e (origin/wip-static-cast) assert: use feature test for static_cast +330a6a7 wbthrottle: use posix_fadvise if available +2bf8ff4 doc: Added DNS and SSL dialog. +cd0d612 OSD: allow project_pg_history to handle a missing map +9ab5133 OSD: don't clear peering_wait_for_split in advance_map() +545135f ReplicatedPG::recover_backfill: adjust last_backfill to HEAD if snapdir +324dd54 (origin/wip-blkdev) test: test helper for get_block_device_size +268785f blkdev: support blkdev size query on osx +75b4b47 doc: Implemented changes suggested from feedback. +41e052d (origin/revert-struct-init) Revert "fix -Wgnu-designator warnings" +96f4607 test/libcephfs: free cmount after tests finishes +c0bcdc3 osd/erasurecode: correct one variable name in jerasure_matrix_to_bitmatrix() +09e1597 (origin/wip-pgmap) mon/PGMap: use const ref, not pass-by-value +fb0f198 rbd: omit 'rw' option during map +2db20d9 qa: don't run racy xfstest 008 +1bb5aad (origin/wip-6698) upstart: fix ceph-crush-location default +c3c962e doc: radosgw workaround for OpenStack Horizon bug +cbc15bf doc: fix typo in openstack radosgw integration +4032501 mon/OSDMonitor: refix warning +9834ab9 (origin/wip-6673b) OSDMonitor: be a little nicer about letting users do pg splitting +59a55fd (origin/wip-pipe) pipe: use pipe2 feature test; check fcntl retval +5d0d0a9 fix -Wmismatched-tags warnings +6efc2b5 fix -Wgnu-designator warnings +382149c OSD: remove unused private var [-Wunused-private-field] +cf29574 CrushTester: remove unused private var [-Wunused-private-field] +cc08a4a auth: remove unused private var [-Wunused-private-field] +306ec71 rgw: don't turn 404 into 400 for the replicalog api +cd30e5f (origin/master-new) common/buffer.cc: fix rebuild_page_aligned typo +ffdd30e test: add gcc compile test for installed headers +12238d0 libcephfs: Fix compilation for C compiler +b3b1650 ceph: Fix compilation with GCC compiler +524aee6 Really use the hostname, otherwise ambiguous +f2622a4 ceph-object-corpus: revert accidental revert +df3af6c docs: Fix a typo in RGW documentation +588ed60 (origin/next-new) Wrap hex_to_num table into class HexTable +148023d [rgw] Set initialized to true after populating table in hex_to_num() +28e4271 sharedptr_registry.hpp: removed ptrs need to not blast contents +4402898 prio-q: initialize cur iterator +353813b PGLog: remove obsolete assert in merge_log +ca4c166 test/osd/RadosModel.h: select and reserve roll_back_to atomically +99c5319 test/rados/list.cc: we might get some objects more than once +4a41d3d os/chain_listxattr: fix leak fix +a8c3373 doc: Updated rewrite rule. +ba153ea doc: Incorporated feedback. +c66beb6 doc: Created new zone sync image. +d6a6cf5 doc: Modified image. +698df04 doc: Removed references to OpenSuse and SLES. +5c9f322 doc: Retitled document. Made example generic. Fixed link. +29dfb79 doc: Retitled document. +5df3024 docs: Fix a typo in RGW documentation +a2090ba doc: Removed the Folsom reference. +c9aa708 doc: Restored show_image_direct and added a link to older versions. +8193bad doc: Removed nova-volume, early Ceph references and Folsom references. +dd14013 doc: Removed install yum priorities. Duplicated where relevant. +c254da5 doc: Added quick ceph object store with links to manual install and config. +16e25cd doc: Restored Object Store Quick Start entry for parallelism. +98603d4 doc: Changed install to ceph-deploy install. +a62d7c0 doc: Added note for ARM support in quantal and raring. +3bc6e52 Removed add repositories, yum priorities, and consolidated index. +f33b118 doc: Added consolidated install of VM/Cloud software. +ea35f79 doc: Removed install qemu. Consolidated to install-vm-cloud. +fba056a doc: Removed install libvirt. Consolidated to install-vm-cloud. +7c4394d doc: Consolidated install object gateway and install Apache/FastCGI +0f87f15 doc: Removed. Consolidated into install-ceph-gateway. +68caa1b doc: Consolidated Add Repositories. +1bdd37f doc: Removed doc. Consolidated with Get Packages. +6b9104d doc/release-notes: formatting +04710b5 doc/release-notes: fix formatting +b605c73 doc/release-notes: fix indentation +1de46d6 (origin/next-fix) os/chain_listxattr: fix leak fix +6efd82c ceph: Release resource before return in BackedObject::download() +e22347d ceph: Fix memory leak in chain_listxattr +905243b Fix memory leak in Backtrace::print() +be12f7f (origin/wip-6683) mon: OSDMonitor: proper error msg on invalid epoch on 'osd getmap/dump' +e5efd88 mon: MonmapMonitor: support 'mon getmap [epoch]' +e11c975 (tag: v0.72-rc1) v0.72-rc1 +a3119bc (origin/wip-crush-hook) upstart, sysvinit: use ceph-crush-location hook +9f6af8b ceph-crush-location: new crush location hook +1e2e429 Revert "ceph-crush-location: new crush location hook" +22ff717 Revert "upstart, sysvinit: use ceph-crush-location hook" +0c18609 (origin/wip-6605) mon: OSDMonitor: fix comparison between signed and unsigned integer warning +e02740a mon: OSDMonitor: only allow an osd to boot iff it has the fsid on record +42c4137 mon: OSDMonitor: fix some annoying whitespace +60264f9 doc: Fixed formatting. Fixed hyperlink. +46d897a doc: fix formatting. +111a37e upstart, sysvinit: use ceph-crush-location hook +fc49065 ceph-crush-location: new crush location hook +df229e5 (origin/wip-6673) mon/PGMonitor: always send pg creations after mapping +2181b4c mon/OSDMonitor: fix signedness warning on poolid +7a06a71 ReplicatedPG::recover_backfill: update last_backfill to max() when backfill is complete +e46d2ca (origin/wip-pr781) fix the bug ctypes.util.find_library to search for librados failed on Centos6.4. Signed-off-by: huangjun +f8fa309 ReplicatedPG: src_obcs can now be empty +3b99cd0 (origin/wip-readdirend) mds: fix readdir end check +6eded8a doc: Fixes to normalize header hierarchy. Tweaked IA slightly. +bd507ef doc: Updated with a verified installation procedure and latest usage. +4e48dd5 (origin/wip-6585) osd/ReplicatedPG: use MIN for backfill_pos +4139e75 ReplicatedPG: recover_backfill: don't prematurely adjust last_backfill +ecddd12 ReplicatedPG: add empty stat when we remove an object in recover_backfill +9ec35d5 ReplicatedPG: replace backfill_pos with last_backfill_started +8774f03 PG::BackfillInfo: introduce trim_to +46dfd91 PG::BackfillInterval: use trim() in pop_front() +0a9a2d7 ReplicatedPG::prepare_transaction: info.last_backfill is inclusive +5939eac (origin/wip-5612) upstart: fail osd start if crush update fails +177e2ab init-ceph: make crush update on osd start time out +b28b64a (origin/wip-scripts) pybind: use find_library for libcephfs and librbd +d5d36d0 (origin/wip-6621) radosgw-admin: accept negative values for quota params +9d136a4 (origin/wip-obc) ReplicatedPG: no need to clear repop->*obc +f58396a doc/release-notes: emperor blurb +8db03ed ReplicatedBackend: don't hold ObjectContexts in pull completion callback +5a416da ReplicatedPG: put repops even in TrimObjects +420182a ReplicatedPG: improved on_flushed error output +ce33892 PG: call on_flushed on FlushEvt +6f975e3 PG,ReplicatedPG: remove the waiting_for_backfill_peer mechanism +3d0d69f ReplicatedPG: have make_writeable adjust backfill_pos +3de32bd ReplicatedBackend: fix failed push error output +807dde4 ReplicatedPG,osd_types: move rw tracking from its own map to ObjectContext +2cadc23 osd_types,OpRequest: move osd_req_id into OpRequest +9b003b3 OpRequest: move method implementations into cc +c4442d7 ReplicatedPG: reset new_obs and new_snapset in execute_ctx +8a62bf1 fix the bug if we set pgp_num=-1 using "ceph osd pool set data|metadata|rbd -1" will set the pgp_num to a hunge number. +c7d975a (origin/wip-ceph-context) ceph_context: use condition variable for wake-up +e5efc29 test: Use a portable syntax for seq(1) +fbabd42 test: Change interpreter from /bin/bash to /bin/sh +0a1579d test: Use portable arguments to /usr/bin/env +b926930 pybind: use find_library to look for librados +19d0160 doc/release-notes: v0.72 draft release notes +bf198e6 fix the bug if we set pgp_num=-1 using "ceph osd pool set data|metadata|rbd -1" will set the pgp_num to a hunge number. +5eb836f ReplicatedPG: take and drop read locks when doing backfill +058c74a PG: switch the start_recovery_ops interface to specify work to do as a param +87daef7 ReplicatedPG: implement the RWTracker mechanisms for backfill read locking +96ed5b8 ReplicatedPG: separate RWTracker's waitlist from getting locks +f0f6750 common: add an hobject_t::is_min() function +fe30ac6 rgw: Use JSONFormatter to use keystone API +5733f9c rgw: Use keystone password to validate token too +bd04a77 rgw: Adds passwd alternative to keystone admin token +8282e24 (origin/wip-6635) mon/OSDMonitor: make racing dup pool rename behave +66a9fbe common: rebuild_page_aligned sometimes rebuilds unaligned +c14c98d mon: OSDMonitor: Make 'osd pool rename' idempotent +284b73b packages: ceph.spec.in is missing make as a build dependency +aea985c Objecter: expose the copy-get()'ed object's category +06b5bf6 osd: add category to object_copy_data_t +61f2e5d OSD: add back CEPH_OSD_OP_COPY_GET, and use it in the Objecter +15c8267 OSD: rename CEPH_OSD_OP_COPY_GET -> CEPH_OSD_OP_COPY_GET_CLASSIC +b75b7ad ReplicatedPG: copy: move the COPY_GET implementation into its own function +80f3696 osd: Add a new object_copy_data_t, and use it in the OSD/Objecter +808fa9a ReplicatedPG: cache: don't handle cache if the obc is blocked +91b589f ReplicatedPG: copy: add a C_KickBlockedObject +ade8f19 ReplicatedPG: add a Context *ondone to RepGathers +b403ca8 ReplicatedPG: copy: rename CopyOp::version -> user_version +4e139fc ReplicatedPG: copy: do not let start_copy() return error codes +178f9a2 ObjectStore: add a bufferlist-based getattrs() function +e17ff19 osd/osd_types: init SnapSet::seq in ctor +d2b661d os/FileStore: fix getattr return value when using omap +3a469bb os/ObjectStore: fix RMATTRS encoding +847ea60 PGLog::read_log: don't add items past backfill line to missing +3c0042c (origin/wip-rbd-parent-info) rbd.py: increase parent name size limit +87d3f88 PGMap::dirty_all should be asserting about osd_epochs, not in.osd_epochs +0388b71 Update init-rbdmap +0d326c3 ceph: tolerate commands without any child args +cfe8451 rgw: eliminate one unnecessary case statement +80384a1 Update init-rbdmap +f9a6d71 (origin/wip-rgw-sync-next) radosgw-admin: remove unused function escape_str() +ec45b3b rgw: escape bucket and object names in StreamReadRequests +dd308cd rgw: move url escaping to a common place +e0e8fb1 rgw: update metadata log list to match data log list +c275912 rgw: include marker and truncated flag in data log list api +e74776f cls_log: always return final marker from log_list +ea816c1 rgw: skip read_policy checks for system_users +1d7c204 Add a configurable to allow bucket perms to be checked before key perms through rgw_defer_to_bucket_acls config option. This configurable defaults to an empty string. Option values include: +0e8182e (origin/wip-6620) mds: MDSMap: adjust buffer size for uint64 values with more than 5 chars +af1dee5 doc: clarify that mons must have qurorum during deploy +4c8be79 rename test_arch.c --> test_arch.cc to avoid undefined reference to `__gxx_personality_v0' error. Signed-off-by: huangjun +7ba4bc4 (origin/wip-monc-ping) cli: ceph: add support to ping monitors +400cb18 pybind: rados: ping a monitor via librados +1a2e0eb pybind: rados: support ETIMEDOUT on make_ex() +2d7ccab librados: support pinging a monitor without auth via RadosClient +6a4b196 mon: MonClient: allow pinging a monitor without authenticating first +c521ba7 mon: MonClient: adjust whitespaces +5e4652e mon: Monitor: reply to ping messages, letting them know we're alive +4ca1407 mon: Monitor: do not flush formatter at end of _mon_status() +b8d54cd doc: Fixed typo, clarified example. +53486af doc: Updated docs for OSD Daemon RAM requirements. +828537c doc: Added ARM. Added Calxeda hardware example. +105fb61 doc: Added install for libvirt. +6c88d40 doc: Added install for QEMU. +fe6520b doc: Added install for ceph-deploy. +df4adef doc: Added install for Apache with 100-continue support. +1bf413e doc: Added install for storage cluster. +5a6412e doc: Added a consolidated build document. Prerequisites, build, build packages. +b88267b doc: Added guide for getting packages. Still needs work. +90487e3 doc: Added new guide for adding repositories. +dcbaec5 doc: Created new stepwise manual install section. +4e6a9a5 doc: Modified cloning source to include git steps. Consolidation. +314fd2c doc: Updated OS recommendations with an Emperor entry. +6369d96 doc: Updated Quick Block Device for kernel versions, and linked OS Recommendations. +df9315c doc: Removed RGW from quick start, since it is not ceph-deploy enabled. +8a36503 doc: Moved CPU Profiler docs to dev. +06ec0f6 doc: Removed Calxeda reference since it is now the same as normal install. +b422d4a doc: Removed old files. Consolidated contents into new IA. +1821ad7 (origin/wip-6242-b) pybind/rados: create InterruptedOrTimeoutError exception +1230886 ceph: move timeout +8baeac0 ceph: catch exceptions thrown during the rados handle init +d60e532 ceph: show basic help before initializing cluster connection +b33c315 ceph: default 5 second timeout for -h +15de2c4 ceph: add --connect-timeout option +e922475 ceph: print basic options before connecting +445e8c9 ceph: fixup do_help() function connection check +32a23c5 ceph.in: add emacs modeline +771b0c5 (origin/wip-6606) rgw: don't bother to call c_str() on strings passed to dump_string() +dff41cd (origin/wip-test-librbd) ceph_test_librbd: fix heap overrun +eb5dd55 test_ceph_argparse.py: No assert_not_in and assert_in in nose.tools Signed-off-by: huangjun +ccaab2a rgw: init src_bucket_name, src_object in the S3 handler +db7eb77 rgw: get rid of req_state.bucket_name +cbf8f9a rgw: turn swift COPY into PUT +1f6b8b2 librbd: parse args to ceph_test_librbd +ad4553a librbd: fix build error +bd2eeb7 ceph-mon: add debug to ip selection +a107030 (origin/wip-5668-b) librbd: wire up flush counter +715d2ab (origin/wip-6603) common/BackTrace: fix memory leak +687ecd8 common/cmdparse: fix memory leak +9fa357d (origin/wip-backtrace) mds: update backtrace when old format inode is touched +34d0941 (origin/wip-6599) client: fix invalid iterator dereference in Client::trim_caps() +4f299ca autoconf: fix typo on AM_COMMON_CFLAGS +94080de common: get_command_descriptions use cout instead of dout +8586c75 (origin/wip-6582) ReplicatedPG: copy: conditionally requeue copy ops when cancelled +6dff926 PG: add a requeue_op() function to complement requeue_ops(). +45d1846 doc: Removed references to Chef. +89995ef doc/release-notes: missed mds snaps +5905227 doc/release-notes: v0.71 +5d2cf46 Update ceph-authtool.rst +7bcfe09 ceph.spec.in: Add erasure-code related files. Signed-off-by: huangjun +533626c Add Redhat init script option +3cfe9f6 (origin/wip-cache-crc) common/buffer: invalidate crc on zero, copy_in +8ec3aed common/buffer: fix crc_map types +394ec17 common/buffer: drop unused fields +2edc04c (origin/wip-6475-gl) ceph.spec.in: Need to cread radosgw log directory. +1f291f5 qa/workunits/rest/test.py: fix mds {add,remove}_data_pool test +11fc80d doc/release-notes: link ot the changelog +eb0a3b7 doc/release-notes: v0.61.9 +d3f0c0b Makefile: fix /sbin vs /usr/sbin behavior +15ec533 OSD: check for splitting when processing recover/backfill reservations +08177f2 ceph: Remove unavailable option with clang +e509cb1 (tag: v0.71) v0.71 +10b466e (origin/wip-6475) radosgw: create /var/log/radosgw in package, not init script +5c280a2 .gitignore: ceph-kvstore-tool +14e91bf debian, specfile: fix ceph-kvstore-tool packaging +fd6e2b8 (origin/wip-kvstore-tool) ceph-kvstore-tool: copy one leveldb store to some other place +85914b2 ceph-kvstore-tool: calc store crc +da69fa0 tools: move 'test_store_tool' to 'tools/ceph-kvstore-tool' +eafdc92 common/buffer: behave when cached crc stats don't start at 0 +c5cdf4e crc32c: expand unit test +0620eea sctp_crc32c: fix crc calculation in the NULL buffer case +b96ee5c crc32c: add a special case crc32c NULL buffer handling +d9e3077 common/buffer: pass NULL buffer instead of a zero-filled one +9626aaf common/crc32c: document interface +36e18ae common/crc32c_intel_baseline: accept null data buffer +c545fc2 common/sctp_crc32: accept NULL buffer pointer +a3e9344 common/buffer: explicitly init zbuf to zeros +88ae8f6 common/buffer: add crc caching performance test +6464516 common/buffer: instrument utilization of cached crcs +0c23a56 common/buffer: cache crcs in buffer::raw +8757775 include: add Spinlock +72ce2ef (origin/wip-4047) cls_rbd: do not make noise in osd log on rbd removal +e550e3d test_ceph_argparse: fix typo +dbd6d97 test_ceph_argparse: fix mds {add,remove}_data_pool tests +5838c09 common: fix non-daemon init +1d4f501 test/filestore/run_seed_to.sh: avoid obsolete --filestore-xattr-use-omap +982511e MonCommands: note that pg dump options don't work in plaintext +c7acc2a (origin/wip-5716) rgw: gracefully handle bad root pool names +488678f ceph_test_rados: fix snap remove vs rollback fix +2701231 os/LevelDBStore: handle deletion race when checking store size +92ea0d1 test/librados/cmd: fix compile error +c69e76c (origin/wip-6059) ReplicatedPG: remove the other backfill related flushes +3469dd8 RadosModel: send racing read on write +0246d47 ReplicatedPG: block reads on an object until the write is committed +c658258 OSD: ping tphandle during pg removal +4f403c2 (origin/wip-6334) common: don't do special things for unprivileged daemons +5aa237e mon, osd: send leveldb log to /dev/null by default +ab8f9b1 doc: Update from user feedback. Needed to enable S3/Keystone. +4bb2a4b doc: Updated to ensure that socket name isn't static. +bd7a7dd os/FileStore: fix fiemap double-free(s) +26228ed ceph-dencoder: select_generated() should properly validate its input +8b43d72 vstart.sh: create dev/ automatically +8d7dbf8 rgw: change default log level +70cc681 mon/PGMonitor: set floor below which we do not warn about objects/pg +bebbd6c (origin/wip-6553) rgw: fix authenticated users acl group check +08327fe mon: osd pool set syntax relaxed, modify unit tests +02b5eb2 ceph.spec.in: do not list ceph-rest-api twice; add missing cls_hello files +dd33c98 osd/osd_types: generalize pg_pool_t::get_flags_string() +5abe5c2 (origin/wip-6147) mon: OSDMonitor: add 'osd pool stats' command +2cd5320 mon: PGMap: rework client IO rate calc and output +e3ba8e8 mon: PGMap: reuse existing summary functions to output pool stats +82e3317 mon: PGMap: keep track of per-pool stats deltas +e2602c5 (origin/wip-pool) mon: make 'mon {add,remove}_data_pool ...' take pool name or id +d6146b0 (origin/wip-formatter-newlines) common/Formatter: add newline to flushed output if m_pretty +f2645e1 rgw: swift update obj metadata also add generic attrs +6641273 SignalHandler: fix infinite loop on BSD systems +2cc5805 doc: Removed underscore for consistency. +4b8eb4f (origin/wip-rgw-quota) radosgw-admin: add --quota-scope param to usage +f568501 (origin/wip-5025) mds: flock: fix F_GETLK +3c6710b qa/workunits/misc/dirfrag: make it work on ubuntu +b0f49e0 ReplicatedPG.h: while there cannot be a read in progress, there may be a read blocked +bf82ba9 doc: disable cephx requires auth_supported = none +0f73f0a rgw: switch out param to a pointer instead of reference +8aa7f65 test: update cli test for radosgw-admin +91f0c82 radosgw-admin: clarify --max-size param +ad409f8 formatter: dump_bool dumps unquoted strings +c1acf9a rgw_quoa.{h,cc}: add copyright notice +8d8ae58 doc: Created new index to incorporate side-by-side deb/rpm installs. +bc50dbb doc: Created installation doc for Yum priorities. Ceph-specific packages need it. +05b2e44 doc: Created new QEMU install for RPMs with provision for Ceph-specific packages. +f37c75b doc: Created new QEMU install for debian. +869b721 doc: Added new libvirt install for RPM. +d466874 doc: Created new libvirt install for debian/ubuntu. +99fe31e doc: Removed Gatway from Ceph Object Storage. Added Yum repo information. +cdd851b doc: Moved installation portion to the installation section. +1dff92b doc: Moved installation portion to the installation section. +a182535 librados: add some clarifying comments +7ef5eb0 librados: drop reference to completion in container destructor +f13cc68 doc: Fixed hyperlinks. Cleanup of old references to Chef. +70250e8 (origin/wip-mon-pool-set) osd: osd_types: Output pool's flag names during dump +7113186 (origin/wip-objecter-errors) osdc/Objecter: clean up completion handlers that set *prval=0 +82e9330 osdc/Objecter: only make handlers set *prval if EIO +1c28869 mon: OSDMonitor: allow (un)setting 'hashpspool' flag via 'osd pool set' +2fe0d0d mon: OSDMonitor: split 'osd pool set' out of 'prepare_command' +6bbb772 test/filestore/run_seed_to_range.sh: fix -d syntax +4e2ff53 (origin/wip-truncate2) mds: avoid leaking objects when purging file. +eb381ff (origin/wip-filerecover) mds: don't decrease file size when recovering file +1803f3b radosgw-admin: limit user bucket-level quota +18a271d mds: optimize map element dereference +d8faa82 ReplicatedPG: remove unused RWTracker::ObjState::clear +89d3f47 radosgw-admin: can set user's bucket quota +cb9ebd6 doc: Minor correction. +14eabd4 rgw: bucket quota threshold +34d0526 rgw: configurable bucket quota size +fc35807 rgw: protect against concurrent async quota updates +2e4ecc2 rgw: async quota update +5bc6327 doc: Merge cleanup. +c0c332c doc: minor clean up. +007f06e (origin/wip-4405) mds: fix infinite loop of MDCache::populate_mydir(). +1f50750 (origin/wip-5992-3) ReplicatedPG: remove the other backfill related flushes +db6623f RadosModel: send racing read on write +2b216c3 ReplicatedPG: block reads on an object until the write is committed +e8a2992 rgw: rearrange includes +6ff9570 Go back to $PWD in fsstress.sh if compiling from source. +8e493ef Go back to $PWD in fsstress.sh if compiling from source. +768fb0a doc: fix openstack rbd installation command +e21e573 os: stronger assert on FileStore::lfn_open +0f323bc common: unintended use of the wrong bloom_filter prototype +4b911cf (origin/wip-rval) ReplicatedPG: copy: use aggregate return code instead of individual Op return +6da4b91 os/FileStore: fix ENOENT error code for getattrs() +71ee6d7 mon: allow MMonGetMap without authentication +f279641 mon: do not put() unhandle message +0cae3a1 common/bloom_filter: add a few assertions and checks for bit_table_ == NULL +cf34adb common/bloom_filter: simplify compressible_bloom_filter encode/decode/dump +f45c3b9 common/bloom_filter: fix compress; improve argument +055dc4c common/bloom_filter: fix estimated element count for compressed filters +16dec28 ceph.spec.in: Always depend on junit4 (fixes bug #6216) +82f6ec5 doc/release-notes: v0.70 +aaabc65 common/bloom_filter: methods for density, approx unique element counts +04091f8 common/bloom_filter: remember original target size +d07f5f3 common/bloom_filter: drop raw_table_size_ member +ea2378e common/bloom_filter: make compressible_bloom_filter encodable +92a60a0 mon/PGMap: make generated test instances obey new invariant +e0be61e qa/workunits: Add large number of files in a directory test script +f82aefa mds: reduce verbosity of dir fragment logging +488ddad mds: fix bloom filter leaks +1d14d11 mds: stop propagating rstat if freezing/frozen dirfrag is encountered. +576da8e mds: don't scatter gather update bare-bones dirfrags +c7db090 fragtree_t: fix get_leaves_under() +c40c5dc client: handle dirfrag mismatch when processing readdir reply +4054651 client: use dir_result_t::END as flag +5074464 mds: handle dirfrag mismatch when processing readdir request +fe99882 mds: fix CInode::get_dirfrags_under() +473635a mds: fix MDCache::merge_dir() +a242201 mds: don't fragmentate stray directories +2eb863d mds: properly update rstat/fragstat when fragmentating directory +f989396 mds: properly store fragmenting dirfrags +7515335 mds: trim log segment after finishing uncommitted fragments +4014ba2 mds: delete orphan dirfrags during MDS recovers +a881c1d mds: journal original dirfrags for rollback +e927941 doc/release-notes: v0.67.4 +3fc6cfb (origin/wip-optracker) Makefile: add include/histogram.h to noinst_HEADERS +bb9b9c8 (origin/wip-6143) common, os: Perform xattr handling based on detected fs type +b87bc23 (origin/wip-5992-2) ReplicatedPG: lock snapdir obc during write +0c2769d PGLog: on split, leave log head alone +391a885 FileStore: make _setattrs not return -ENOENT most of the time +0c1e251 ReplicatedPG: add debugging in recover_replicas for objects added for backfill +2ae9ece ReplicatedPG,PG: use PGBackend methods for getattr +8a919fb ReplicatedPG,PG: adapt collection_list* users to PGBackend interface +ff17e45 PG,ReplicatedPG: expose PGBackend to PG +9a10a80 PG.cc: remove leading empty space +4df481c PGBackend,ReplicatedBackend: add interfaces for scanning the pg +664b589 ReplicatedPG: don't rescan the local collection if we can avoid it +e73ec48 common/hobject: add is_degenerate method +c8a4411 PGMap: calc_min_last_epoch_clean() will now also use osd_epochs +091809b PGMap,PGMonitor: maintain mapping of osd to recent stat epoch +e3bb065 (tag: v0.70, tag: mark-v0.70-wip) v0.70 +806725a (origin/wip-start-copy) ReplicatedPG: copy: add op progression output +639ff9f ReplicatedPG: copy: don't leak a ctx on failed copy ops +469d471 ReplicatedPG: assert that we have succeeded in do_osd_ops on copyfrom repeats +f3733a2 ReplicatedPG: copy: switch CopyCallback to use a GenContext +dc0dfb9 common,os: Remove filestore_xattr_use_omap option +10a1e9b rgw: update cache atomically +6ce762f lru_map: add find_and_update() +4634d3c mds: delete orphan dirfrags after fragmentating directory +cd4cd3f mds: start internal MDS request for fragmentating directory +55d279b ceph_test_rados: do not let rollback race with snap delete +b09a1ef ceph_test_rados: stop on read error! +03ba740 osd/ReplicatedPG: fix null deref on rollback_to whiteout check +aacd67e PendingReleaseNotes: fix typo +fea1e0e PendingReleaseNotes: make a note about K vs k +d6a1799 TrackedOp: specify queue sizes and warnings on a per-tracker basis +ea831e0 TrackedOp: give people an _event_marked() notifier instead of a virtual mark_event() +1033588 qa: fix rbd cli tests checking size +c19935c doc: Fixed typo. +0ce1046 doc: Added clarifying comments. +afb4d83 librados: drop #include of int_types.h from installed headers +f1e2393 mon: Monitor: reuse 'src_is_mon' bool on dispatch +29cf2ff mon: Monitor: only handle paxos msgs from a mon && if session has exec caps +b8a1488 mon: Monitor: dissociate msg handling from session & connection logic +d0d61b4 mon: Monitor: drop client msg if no session exists and msg is not MAuth +ed1a54e mon: Monitor: assert on absense of connection during dispatch +dce3d26 (origin/wip-5896) mon: MonmapMonitor: make 'ceph mon add' idempotent +8cfeb83 common/bloom_filter: note that uint32_t interface requires well-mixed values +9299f50 common/bloom_filter: speed up unit tests a bit +4b23b65 common/bloom_filter: test binning fpp behavior +0a69bae common/bloom_filter: disable sequential tests +0122ee9 common/bloom_filter: insert/contains methods for uint32_t +22f8325 Make fsid comparison case-insensitive +41a1345 TrackedOp: rework dump interface a little +80659cc rgw: init RGWBucketStats +29009b2 doc: Updated diagram for added clarity. +2c88910 rgw: handle negative quota as non-assigned values +07bb72a radosgw-admin: quota control api +69180d5 rgw: dump quota params even if disabled +a8761a5 TrackedOp: just make CephContext member public +2723a09 TrackedOp: template OpTracker on only T[::Ref] (ie, OpRequest[::Ref]) +ebae077 rgw: bucket stats also dump quota info +7973d44 OpTracker: give TrackedOp a default dump() function +baf1d40 rgw: init quota +721f170 (origin/wip-fuse) client: remove requests from closed MetaSession +63f5814 ceph: Update FUSE_USE_VERSION from 26 to 30. +f8a947d client: trim deleted inode +563517d rgw: update quota stats when needed +65ae9b8 COPYING: fix URL +11461cb debian/copyright: sync up with COPYING +1a56fe9 COPYING: add Packaging: section +e70ea84 COPYING: add debian-style headers +fea12e2 COPYING: fix formatting +a2e175b COPYING: make note of common/bloom_filer.hpp (boost) license +f31d691 common/bloom_filter: fix whitespace +fdb8b0d common/bloom_filter: test behavior of sequences of bloom filters +f1584fb common/bloom_filter: unit tests +8835ef8 common, os, osd: Use common functions for safe file reading and writing +c0cbd9a osd: In read_meta() leave an extra byte in buffer to nul terminate +238a303 ErasureCode: update PGBackend description +ff48873 ErasureCode: doc updates +d1c1f3e common: document ghobject sort order rationale +16fbdcd common: ghobject get_filestore_key* use hobject counterpart +2d7dced mon/PGMap.cc: don't output header for pg dump_stuck if nothing stuck +d29be45 ReplicatedPG: rename finish_copy -> finish_copyfrom +a96b12f ReplicatedPG: copy: use CopyCallback instead of CopyOp in OpContext +d2cb2bf mds: return -EAGAIN if standby replay falls behind +fbeabcc os/FileStore: report errors from _crc_load_... and _crc_save +dfea81e ceph_test_store_tool: add 'set prefix key' feature +398249a test: test_store_tool: optionally output value crc when listing keys +18fcd91 test: test_store_tool: add 'crc ' command +84c0286 rados: add 'tmap-to-omap' command +20974dc rados: make 'tmap dump' gracefully handle non-tmap data +a9e5323 osd: remove magical tmap -> omap conversion +0d61092 osd: add ISDIRTY, UNDIRTY rados operations +da1b9b6 ReplicatedPG: copy: implement CopyFromCallback::finish, remove CopyOp::ctx +613841a ReplicatedPG: copy: add CopyCallback pointer to CopyOp, and set it up +0b47276 ReplicatedPG: copy: start defining CopyCallback structures +dcd475d osdc/Objecter: fix return value for copy_get +1784ef9 ReplicatedPG: copy: split up the transaction generation from the PG management +010ff37 ReplicatedPG: copy: specify the temp_oid in the caller +1ae8ef2 ReplicatedPG: copy: take an ObjectContextRef in start_copy and use that +3257bb4 doc: Incorporated some feedback. +7e3084e osd/ReplicatedPG: mark objects dirty in make_writeable() +d42d2b9 osd/osd_types: object_info_t::get_flag_string() +a0ed9c2 osd/osd_types: add object_info_t::FLAG_DIRTY +9b7a2ae crush: invalidate rmap on create (and thus decode) +482938a doc: Fixed a few typos. +011bff3 osd/osd_types: bump encoding from 11 -> 12 +62cc398 rbd: be helpful with invalid command +8e33d33 rados: do not dump usage on invalid command +0d2a2c9 doc: Minor caps change. +584a6d2 doc: Updated text for more specific region/zone example. +d421b66 osd/osd_types: convert object_info_t::uses_tmap to a flag +1aa6067 osd/ReplicatedPG: update all find_object_context() users to handle whiteouts +ea65b5a osd/osd_types: add WHITEOUT flag to object_info_t +a1b82f2 osd/osd_types: replace bool lost with a flags field +5bebf1a doc: Updated diagram. +6fcea1a rgw: also check quota before starting write +76284fa rgw: check quota before completing write op +81aa478 rgw: fix qutoa check +6ed8b7a ReplicatedPG: copy: add an ObjectContextRef to CopyOp +5307703 ReplicatedPG: follow the same finish path for failed copy ops +6658f3c ReplicatedPG: copy: remove most references to OpContext from process_copy_chunk +4f5b317 ReplicatedPG: copy: do not use an OpContext in _copy_some +dbfd478 ReplicatedPG: update pg stats correctly when doing a copy +1bdc3f7 Add unit_to_bytesize test for 'k' on input; continues fix for #4612 +334f655 ReplicatedPG: don't bless C_OSD_SendMessageOnConn +a9df335 msgr: debug delay_thread join +bc98013 rgw: higher level quota check functionality +b43bc1a Use 'k' when printing 'kilo'; accept either 'K' or 'k' as input +3d062c2 rbd: fix cli test +cce990e osdc/ObjectCacher: limit writeback IOs generated while holding lock +055e313 rgw: quiet down warning message +75b94ba osd/ReplicatedPG: fix iterator corruption in cancel_copy_ops() +3452aad ceph_argparse.py: clean up error reporting when required param missing +409aba6 rbd.cc: add readonly option for "rbd map" +b032931 PendingReleaseNotes: update regarding librados change +b245ca1 os/FileStore: add sloppy crc tracking +8912462 rgw: drop async pool create completion reference +4605792 librados: pool async create / delete does not delete completion handle +7d1dc55 (origin/wip-doc-quickstart) doc: Diagram update and clarification on ceph-deploy admin results. +b23718a doc: Diagram update from feedback. +245296a doc: Diagram updates from feedback. +71ba833 doc: Updated block device quick start to use ceph-deploy. OS neutral. +b9000b3 Invoke python with /usr/bin/env python instead of directly +c8054ac ReplicatedPG: remove unused CopyOp::waiting member, rename function for accuracy +7bf8cb7 ReplicatedPG: remove useless pcop param from start_copy +7f3165b ReplicatedPG: use our already-found iterator instead of going back into map +8dd7ea3 rgw: fix leak in RGWMetadataManager::remove() +3923874 common/SloppyCRCMap: add type to sloppily track crcs +481fbbf doc: Added Dumpling to OS Recommendations. +94478e0 OSD: unset_honor_cache_redirects() on Objecter +35cdd89 Objecter: add "honor_cache_redirects" flag covering cache settings +1fc24ff rbd.cc: propagate some errors to user-space when they're available +b6f278c ceph.in: fix missing exception variable in failure to open -o file +1e9e34b rgw: don't append NULL char before json parsing +793d9d2 ceph_json: use different string constructor for parser buffer +c821da9 rgw: more quota implementation +434ad76 rgw: add bucket quota config to entities +4fe01b1 doc: changed journal aio default to true. +a3aa005 qa: workunits: mon: test snaps ops using rbd. +28949d5 Formatter: add dump_bool() +efc6b5e ceph_test_rados: remove useless snapc setup +37d7220 ceph_test_rados: update for copy_from in begin, not finish +b06c189 common/crc32c_intel_fast: avoid reading partial trailing word +e5fa6d1 rgw: more quota utility stuff +e6e8cb8 pybind: update osd blacklist tests for nonce +0bfda47 test/common/get_command_descriptions: null terminate c string +c5831fa ceph_test_rados: improve debug output +eec315f ceph_test_rados: fix update_object_full +1ba7e47 ceph_argparse.py, cephtool/test.sh: fix blacklist with no nonce +97f462b Revert "ceph: parse CEPH_ARGS environment variable" +30abe32 Add CEPH_ARGS at the end of sys.argv +cbf0ba2 qa/run_xfstests.sh: use old xfstests until we adapt to new org +bab72ed os: Simplify collection_list* funcs by removing dynamic_cast +db5bbdd rgw: quota utility class +9750965 os: Make write_version_stamp() private +55f4aa1 osd: Remove code for reading ancient unsupported logs +4a757eb os/ObjectStore: Interim collection_list* functions in ObjectStore +222f5aa osd: Cleanup init()/read_superblock() +aba6efd common, os, osd, test, tools: FileStore must work with ghobjects rather than hobjects +793ba9f include, test: Add CompatSet::merge() operation +c6b8318 os, osd, tools: Add backportable compatibility checking for sharded objects +bb195c2 osd: read_superblock() not outputing unsupported features when incompatible +4bc8f09 test: Adding unittest for CompatSet +acc47d2 include: Bug fixes for CompatSet +98b3cd3 os: Fix version_stamp_is_valid() and write_version_stamp() error return +a1f6b14 ReplicatedPG: take obc read lock prior to recovering an object to replicas +b29ac2a ReplicatedBackend::handle_pull_response: use list +07905af ReplicatedPG: remove noop C_OSD_CompletedPull +2bc1e38 ReplicatedPG: assert build_push_op succeeds on primary +aeadecd ReplicatedPG.h: remove temp_coll stub +3290065 OSD,ReplicatedPG: queue pushes in a op_tp workqueue +039da62 ReplicatedPG: don't proceed to backfill until recovering is empty +02e5c1f ReplicatedPG: correctly handle backfill +b06dce3 ReplicatedPG/Backend: fix up recalc_subsets +6cccef2 ReplicatedBackend: wire in start_pushes +a287167 ReplicatedBackend: handle stats properly +656d084 ReplicatedBackend: track object contexts in Push/PullInfo +e7a0b23 ReplicatedBackend: remove priority from Pull/PushInfo +9e8c3c3 ReplicatedPG/Backend: move prep_push and friends to ReplicatedBackend +3d6eb6e ReplicatedPG: remove pushing/pulling +31c6042 ReplicatedPG/Backend: handle down pull sources +4bc0eab ReplicatedPG/Backend: split recover_missing out of prepare_pull +273ac2b ReplicatedPG/Backend: shuffle over submit_push_*/build_push_op +fea30f5 ReplicatedPG/Backend: move over send_pushes/send_pulls/prep_push_op_blank +c1c2deb ReplicatedPG/Backend: move over _failed_push +f981079 ReplicatedPG/Backend: move handle_* +666a316 ReplicatedPG/Backend: shuffle do_pull/do_push_reply +3e73472 ReplicatedPG/Backend: move _do_push,_do_pull_response,do_push +8daaeba ReplicatedPG/Backend: convert sub_op_pull +0e16230 ReplicatedPG: make log_subop_stats static +d53fc89 ReplicatedPG/Backend: shuffle sub_op_push_reply +8d447be ReplicatedPG/Backend: shuffle sub_op_push over to ReplicatedBackend +087f708 osd/: allow dout for ReplicatedBackend methods to work in ReplicatedPG.cc +7da308b ReplicatedPG: extract PGBackend::Listener recovery callbacks +3148b12 PG,ReplicatedPG: handle do_request in ReplicatedPG,PGBackend +30ac934 ReplicatedPG: pass on dump_recovery_info to PGBackend +138ccbe OSD,ReplicatedPG: let PGBackend handle the temp collection +62a1eb6 osd/: add PGBackend interfaces and stubs +f94e6a3 ReplicatedPG: Allow get_object_context caller to provide attributes +5b7fa62 ReplicatedPG: send_push is unused +de4cc87 FileStore: ping tphandle between each operation within a transaction +5f44a94 WorkQueue: add a workqueue which simply runs queued GenContexts +179001b osd/ReplicatedPG: fix bl resize on write vs truncate race +bd0f29a mon: OSDMonitor: do not write full_latest during trim +6b435f5 mon: don't list "--yes-i-really-mean-it" options as required +9d5b724 do not quote the variable to loop over +f45675c msg/msg_types: use proper NI_MAXSERV when formatting an IP address +5584b37 reverse the order of the mons in the init script when stopping +ca97fae qa: update snaps workunits for allow_new_snaps flag +9771b1d MDS: lock out snapshots until after a flag has been set in the MDSMap +b144170 mds: properly return log replay error +1d67aeb common/crc32c_intel_fast: fix compile-time #ifdef +a65a867 autoconf: fix build out of tree +fde0f86 Context: add GenContext templated on the callback argument +3cffff2 mds/Server: fix LOOKUPSNAP +12aa53c common/bloom_filter: move header from include/ +9df9155 common/bloom_filter: make bloom_filter encodable +8dcdeb2 common/bloom_filter: make optimal parameter calculation static +eda807e common/bloom_filter: make mode match formatting +4d8f78b mon/PGMonitor: fix segfault when osdmap and pgmap stats are out of sync +4799368 Makefile: don't use srcdir in TESTS +7bbadf1 mailmap: add Matthew Roy, Matthew Wodrich +c8cae87 qa/workunits/mon/crush_ops.sh: fix test +812234c ErasureCode: get rid of extra copy when encoding +2422b2a autoconf: remove get_command_descriptions dependency to gtest +04c7207 git: consolidate mails in commit logs +ac0faaa doc: Removed service ops language and added reference to operations. +3de3256 mon/OSDMonitor: fix 'ceph osd crush reweight ...' +073732c doc: Refactored diagram and text. +99c10bc doc: Updated diagrams, refactored text. +1c12eef osd/ReplicatedPG: fix leak of RepGather on watch timeout +1d67e15 osd/ReplicatedPG: fix leak of RepGather on large-object COPY_FROM +afa2468 ceph_test_rados: order racing read wrt to the COPY_FROM +3faf08f librados: add OPERATION_ORDER_READS_WRITES flag +9322305 osd/ReplicatedPG: respect RWORDERED rados flag +f6510c7 osd: change warn_interval_multiplier to uint32_t +84e1f09 arch/intel: fix old comment +366b608 arch/intel: use intel probe instructions for x86_64 only +1bce1f0 osd: change warn_interval_multiplier to uint32_t +4bc1818 ErasureCode: fix plugin loading threaded test +e50343e rgw: fix rgw test to reflect usage change +abb88d7 osd: revert 'osd max xattr size' limit +73289b3 mds: be more careful about decoding LogEvents +c32c51a ErasureCode: optimize padding calculation +60e9e85 vstart: set 'mon pg min per osd' +befdcfd mon/PGMonitor: health warn if pool has relatively high objects/pg +a684ac8 mon/PGMonitor: health warn if pg_num != pgp_num +dc7114e mon: warn if pg to osd ratio is too low +97471e3 ErasureCode: coding style conformance +bfd4db2 ceph_argparse: unit tests for validate_command config-key +fa396d9 ceph_argparse: unit tests for validate_command osd +c09d01c ceph_argparse: unit tests for validate_command mon +0ff0030 ceph_argparse: unit tests for validate_command mds +00d1504 ceph_argparse: unit tests for misc validate_command +253e53f ceph_argparse: unit tests for validate_command auth +d3bf39e ceph_argparse: unit tests for validate_command pg +1d54754 pybind: ceph_argparse unit tests foundations +f9c7bc6 pybind: catch EntityAddress missing / +ccf2200 mon: validate mon dump epoch as a positive integer +8f0bb2f pybind: unit tests for ceph_argparse::parse_json_funcsigs +96067e0 .gitignore gtags(1) generated files +c16b54f mon: get_command_descriptions support program +e0b5697 mon: convenience function to convert commands to json +9c9d7e6 autotools: set noinst_PROGRAMS +ee33ff8 autotools: group test scripts in check_SCRIPTS +ed73e0a doc: Adding context to the federated configuration guide. +157754b common/config: include --cluster in default usage message +362dba1 os, ceph_osd: Rename on_disk_version to target_version +7b7e004 os: Prior version bump should have updated this +27fb44b (origin/automake-fix-common) make: build common/secret only on linux +8407669 os: Code conformance of os/LFNIndex.cc +0d47bf8 os: Fix typo in comment +c4bcb46 common: Fix get_namespace() definition in hobject_t +1c0aecb osd: Add assert() on collection_getattr() failure instead of later decode crash +0655cc1 tools: Fix ceph_filestore_dump usage again +991139b doc: When bootstrapping mon set the correct caps for client.admin +9dfac9e ErasureCode: minimum_to_decode unit tests and optimization +9442cfa os: fix TestLFNIndex test warnings +945eb3c mds: remove dirfrags when purging stray directory +7be9b92 mds: avoid fetching backtrace when purging stray +67386e4 mds: don't trim stray inode from the cache. +0f3ba29 mds: remove unnecessary MDCache::maybe_eval_stray() calls +cbf1f3c mds: evaluate stray when releasing inode/dentry's reference +0a43974 (origin/automake-flags) automake: add per-target AM_CPPFLAGS +11d8d75 makefile-env: separate cppflags and cflags usage +2b75abb ceph_test_rados: fix COPY_FROM completion +935eb22 ceph_test_rados: fix seq_num, improve error output +4d0ee0b ceph_test_rados: limit max_in_flight to objects/2 +303bc68 ceph_test_rados: do not COPY_FROM self +59ee51a osd/ReplicatedPG: handle COPY_FROM self +5cb7b29 mon: fix wrong arg to "instructed to" status message +9e98620 rgw: destroy get_obj handle in copy_obj() +c28dd12 note that ceph-deploy should not be called with sudo on certain situations +2ade5b6 doc: Updated graphic. Removed bullet points. Cleaned up RPM/YUM example. +c55d7ac doc: Updated graphic to use same name as command line examples. +1075443 doc: Added Recommendations and Get Involved to Intro. +5eb4db1 doc: Removed Get Involved from Quick Start. +af7ad1d doc: Changed title, and removed recommendations sections. +dc19d24 doc: Moved recommendations sections to Intro. +b1eeadd (origin/wip-6361) qa: workunits: cephtool: check if 'heap' commands are parseable +296f2d0 osd: OSD: add 'heap' command to known osd commands array +238fe27 mds: MDS: pass only heap profiler commands instead of the whole cmd vector +c98b910 perfglue/heap_profiler.cc: expect args as first element on cmd vector +e112a83 FileStore: only remove the omap entries if nlink == 1 +7c1d2de lru_map: don't use list::size() +532e41a common/lru_map: rename tokens to entries +ca984e3 bufferlist: don't use list::size() +0681971 Makefile: add extra cls DENCODER_DEPS in the cls makefile, not rgw +9e0b5ea OpTracker: get rid of TrackedOp::received_time for the Message +a2d633b OpTracker: demand that a TrackedOp gets to own its Message for life. +f7f3005 OpTracker: provide a default implementation of TrackedOp::state_string +e9bcd4c osd: use TrackedOp::get_req() instead of direct access to the request. +ef1d62b OpTracker: include a destructor for the TrackedOp base class. +c293465 osd: change how we work around an interface limitation. +06e1bca OpTracker: move OpTracker pointer and some init code into TrackedOp +a8bbb81 OpTracker: remove the references to "osd" in config variables +3cb6abe OpTracker: move the OpTracker and OpHistory into common/TrackedOp.[h|cc] +5fdaccd OpTracker: add an init_from_message() to the TrackedOp interface +24c3389 OpTracker: start making the OpTracker into a generic +0678dcd OpRequest: remove obsolete comment about ref-counting (use OpRequestRef!) +53e17c2 osd: move pow2_hist_t out of osd_types and into include/ +16ebb25 mon: fix wrong arg to "instructed to" status message +5c46fc4 doc: Made some changes and incorporated a draft diagram. +5bb7417 doc: Added draft of region/zone diagram. +bcc1680 mon: fix inverted test in osd pool create +f3718c2 (origin/prctl-getname-test) code_env: use feature test for PR_GET_NAME support +08fe028 rgw: use bufferlist::append() instead of bufferlist::push_back() +fd6646f Makefile: fix unittest_arch +5421d6d Makefile: fix unittest_crc32c +4c9497f ErasureCode: complete plugin loader unit tests +7324931 ErasureCode: plugin loading in progress flag +def05f0 ErasureCode: improve API implementation example +d8b5583 ErasureCode: proofread abstract API documentation +c63b4ed mds: allow delay in evaluating stray +298c39f mds: touch dentry bottom recursively +e303b96 mds: re-integrate stray when link count >= 1 +862e0f1 mds: fix MDCache::truncate_inode_finish() journal +9601092 os/FileStore: fix uninitialized var +b66ac77 osdc/ObjectCacher: finish contexts after dropping object reference +ce723b5 doc/release-notes: v0.69 +6ca6f2f (tag: v0.69) v0.69 +5541a1d doc: Updated link to Storage Cluster Quick Start. +6af8e3c doc: Updated link to Storage Cluster Quick Start. +b1d58fa doc: Updated link to Storage Cluster Quick Start. +a39de7b doc: Made sysvinit and service sections parallel to upstart for clarity. +0fed6ab doc: Updated for 3-node deployment. Leaner discussion. More use cases. +3a3ef33 doc: Removed introductory material. Renamed the page. +c054469 doc: Updated for 3-node deployment and multiple Linux distributions. +31fff93 doc: Added Intro to Ceph to Index. +fcd749f doc: Excised content from "Getting Started" and created Intro to Ceph. +a80f831 ceph_test_rados: identify write seq_num in output +3a00187 librados: test copy_from without src_version specified +045b902 osd: allow a copy_from without knowing the src_version +83f12e4 ceph_test_rados: submit a racing read with every COPY_FROM +d050596 ceph_test_rados: use get_version64() throughout +cdc637f osd: block requests on object during COPY_FROM +f97277c osd: add infrastructure to block io on an obc +df7c36a osd/ReplicatedPG: factor some bits into finish_copy +5921703 ceph_test_rados: more readable output +4e29e36 osd/ReplicatedPG: stage object chunks to replicas during COPY_FROM +1f80d63 doc: Replaced code-block with inline literal to fix auto numbering. +7d5dfa2 doc: Made s3gw.fcgi paths consistent. +0d20cae mon: OSDMonitor: multiple rebuilt full maps per transaction +59147be osd: compute full ratio from kb_avail +89e8b8b ErasureCode: improve API implementation example +3966e6e ErasureCode: proofread abstract API documentation +971bf60 (origin/wip-buck-centos-core) Remove unneeded junit4 check +e38bd8d Removing extraneous code +cd6f4bc Use a loop for testing jdk paths +3cef755 fix some comments +ae7912f doc: Added conf example. +e55d59f doc: Updated usage. +0be2c87 doc: Removed --fs-type option and text. +874186b doc: Updated the usage scenario and made a few syntax edits. +abd2fcd ErasureCode: fix uninitialized variable warning +81983ba mon: OSDMonitor: update latest_full while rebuilding full maps +4ac1570 mon: OSDMonitor: smaller transactions when rebuilding full versions +4216eac rgw: try to create log pool if doesn't exist +b86c068 hadoop: remove hadoop shim +e7f7483 rgw: NULL terminate buffer before parsing it +3f8c969 (origin/fix-no-tcmalloc-build) make: add tmalloc lib dep in tcmalloc guard +daf417f osd/ReplicatedPG.cc: Verify that recovery is truly complete +139a714 osd/OSD.cc: Use MIN() so that we don't exceed osd_recovery_max_active +4633729 mon/OSDMonitor: make busy creating pgs message more explicit +40613b7 mon/MDSMonitor: don't reset incarnation when creating newfs +31e3a51 rgw: don't call list::size() in ObjectCache +91375d0 common: fix Mutex, Cond no-copy declarations +626669a rgw: drain pending requests before completing write +25a608c osd/ReplicatedPG: allow RepGathers with no version +155cdd2 osd: flag new/old temp objects in MOSDSubOp +c4260fa osd/ReplicatedPG: drop unused issue_repop() arguments +27ca5d2 osd/ReplicatedPG: drop dead code from parallelexec issue_repop +c9885e7 osd/ReplicatedPG: generate one-off unique temp object names +6cecd0d osd/osd_types: move coll_t::META_COLL definition +17c5d76 os/FileStore: implement collection_move_rename +ef7cffc os/ObjectStore: add collection_move_rename +288bef3 rgw-admin: Adds --metadata-key option to help Signed-off-by: Christophe Courtaut +0499948 rgw: when failing read from client, return correct error +558d9fc osd: bind objecter messenger to cluster address +1d1bf41 osd: name the objecter's messenger "ms_objecter" instead of "hbclient" +14c71ea Objecter: rename cancel_op -> cancel_linger_op +ab2506d test: update cache test since OSDs support redirects +76c343b osd: implement basic caching policies in ReplicatedPG +fbbe3ad Objecter: follow redirect replies from the OSD +29133fd Objecter: write a helper function to clean up ops that need to be retried +ac1c921 MOSDOpReply: add a redirect member +a45612c Objecter: add an Op::target_oid, and use it when submitting Ops +79f02d6 Objecter: rename Op::oid -> Op::base_oid +aeec0c6 osd: create a new request_redirect_t +c24e170 mon: fix syntax error in osd pool create args +780954e autoconf: use $(UNITTEST_CXXFLAGS) in tests +647188c ErasureCodeJerasure: plugin +e9e5391 ErasureCodeJerasure: define technique Liber8tion +63867e9 ErasureCodeJerasure: define technique BlaumRoth +9a82010 ErasureCodeJerasure: define technique Liberation +530fb8a ErasureCodeJerasure: define techniques CauchyOrig and CauchyGood +b70cb93 ErasureCodeJerasure: define technique ReedSolomonRAID6 +65f1970 ErasureCodeJerasure: define technique ReedSolomonVandermonde +c8def86 ErasureCodeJerasure: unit test common to all techniques +454c116 mon: add key[=value] ... to osd pool create +a786ad7 ceph-disk: make initial journal files 0 bytes +8c76f3a crushtool: do not dump core with non-unique bucket IDs +bde2772 doc/release-notes: v0.67.3 +c56e039 buffer: uninline, constify crc32c() +397b4c2 osd: add empty() function to object_locator_t +0b24be2 MOSDOpReply: more const-correctness +82e40a7 ReplicatedPG: do not meaninglessly fill in the reqid on make_writeable() cloning +e435468 ErasureCodeJerasure: base class for jerasure ErasureCodeInterface +9b4048a ErasureCodeJerasure: fix jerasure compilation +8ab29e9 ErasureCodeJerasure: import jerasure-1.2A +661b377 os/FileStore: pass old + new object name to lfn_link +deea63f osd: expose bytes used/avail via perf / asok +3bc618b qa: workunits: mon: crush_ops: test 'ceph osd crush move' +7d3799f (origin/wip-6230) mon: MonCommands: expect a CephString as 1st arg for 'osd crush move' +132e403 autoconf: use $(LIBOSD) $(LIBCOMMON) instead of libosd.a libcommon.la +4c5b3c7 doc: Syntax fix to suppress gitbuilder errors. +8bf858f doc: Removed mkcephfs reference. +494aff6 doc: Syntax fixes to suppress gitbuilder warnings. +95c0c6c doc: Syntax fixes to suppress gitbuilder warnings. +1e54d83 doc: Syntax fixes to suppress gitbuilder warnings. +68659a6 doc: Syntax fixes to suppress gitbuilder warnings. +1bb7225 doc: Syntax fixes to suppress gitbuilder warnings. +a6a7140 doc: Syntax fixes to suppress gitbuilder warnings. +ac609a4 doc: Syntax fixes to remove gitbuilder errors. +3921794 ErasureCodePlugin: plugin registry tests and example +916901f ErasureCodePlugin: plugin registry +b61369c ErasureCodePlugin: plugin interface +640f2f2 ErasureCode: example implementation : K=2 M=1 +95d61c1 Fix usage to include export and import --type options +dde21bd ErasureCode: abstract interface +ff9beb2 doc: Syntax fixes to stop gitbuilder warnings. +9c09701 doc: Syntax fixes to stop gitbuilder warnings. +5900b43 doc: Syntax fixes to stop gitbuilder warnings. +99c42e1 make sure we use a version of sphinx that we can handle +726fe73 rados: fix typo +6949d22 automake cleanup: implementing non-recursive make +99c6be2 automake cleanup: renaming buildtest +417f1f2 automake cleanup: moving rados tool to tools subdir +3daf6ea automake cleanup: moving misc tools to tools subdir +0b267b3 automake cleanup: moving tests to test subdir +bf6341f automake cleanup: moving code away from include to common +bb312b6 automake cleanup: moving hobject from os to common +09b42c0 automake cleanup: renamed inttypes.h +7845115 automake cleanup: adding vta support to configure +c17d134 fix: build tests need libcrc.la +b5137ba init-radosgw*: fix status return value if radosgw isn't running +55a5271 cleanup: state_name in NamedState init list +1387278 rgw: fix get cors, delete cors +39c89dc common/crc32c_intel_fast: avoid reading partial trailing word +c3529ed cleanup: passing context to NamedState for ceph_clock +159693d cleanup: globals from libosd +258396d doc: Added entry for federated configuration to the index. +da5ccf7 doc: Added draft of configuration guide for federated gateways. +8d0a1db cleanup: reduced number of pointer indirection in osd +5dd0a83 cleanup: removing globals from common/obj_bencher +cf93c83 cleanup: removing refs to globals from libosd +9c4e626 cleanup: removed last references to globals from client +dfcee0c osd/ReplicatedPG: set reply versions for pg ops (PGLS) +c4414a3 osd/ReplicatedPG: set reply versions on dup op ACK +9a55129 rgw: flush pending data when completing multipart part upload +16b24f1 librados: make note of which calls steal the bufferlist contents +c8ec532 rgw: check object name after rebuilding it in S3 POST +6af5a53 rgw: fix certain return status cases in CORS +6ae4049 rgw: add COPY method to be handled by CORS +8203b9b rgw: fix CORS rule check +b564db8 rgw: don't handle CORS if rule not found (is NULL) +c540798 rgw: tie CORS header response to all relevant operations +83eb5d6 rgw: add a generic CORS response handling +df4f712 rgw: OPTIONS request doesn't need to read object info +77c2a33 rgw: remove use of s->bucket_cors +3e90c2a common: unit test for crc32c +3233336 common/crc32c_intel_fast: fix compile-time #ifdef +cfb07f1 arch: add NEON cpu feature detection +83a4848 doc: Updated usage for --infile syntax. Added zone name for zone syntax. +df11247 mon/OSDMonitor: fix POOL_OP_DELETE_SNAP early return +e95e707 doc: Organized into sections. Added zone/region and pool details. +9f44de5 doc/release-notes: v0.68 +b05f7ea osd/ReplicatedPG: set reply versions for pg ops (PGLS) +5148aac osd/ReplicatedPG: set reply versions on dup op ACK +f566102 doc: remove 'Unexpected indentation' from versions doc. +a9a516a Correct syntax for generate swift key +ab69d99 mon: fix typo and remove redundant sentence +7c09ede mon: fix typo in comment +3c9f849 doc: erasure code ghobject is made of gen_t + shard_t +b4cf0f2 (tag: v0.68) v0.68 +dcbdeaf doc: Fix repo URL for Ceph cloning (dev/generatedocs) +996af2d ceph_test_rados: test COPY_FROM +ed68079 osd: initial COPY_FROM (not viable for large objects) +3a8adf5 objecter, librados: add COPY_FROM operation +746e78c doc: Updated manual install to include sync agent, ARM packages, and DNS configuration. +c367d6f ceph_test_rados: add missing kick for rollback +1d1f7f1 rgw: change watch init ordering, don't distribute if can't +087800e osd: provide better version bounds for cls_current_version and ENOENT replies +6019558 rgw: Allow wildcard in supported keystone roles. +f79b379 osd/ReplicatedPG: set user_version in waiting_for_commit replies +e8506b5 osd/ReplicatedPG: do not set ctx->user_at_version unless ctx->user_modify +99793d9 osd/ReplicatedPG: do not log a user_version on the snapdir object +72c6c30 osd/ReplicatedPG: log previous user_version on clone +cc8e901 osd/ReplicatedPG: do not log user_version on deletion events +7d72e55 osd/PG: only raise PG's last_user_version if entry is > +1610768 osd: debug user_versions a bit +1c5e58a osdc/Objecter: fix dereference of NULL pg_pool_t +a200e18 Validate S3 tokens against Keystone +e48d6cb mon: fix uninitialized Op field +a5d815d automake cleanup: uninitialized version_t +4f6c6b2 osd/ReplicatedPG: do not requeue if not primary +b0a30a5 osd: COPY_GET operation +8d74f41 osd/ReplicatedPG: factor {execute,reply}_ctx() out of do_op() +bc99437 osd: feed OSDMaps to the Objecter +3470944 osd: add an Objecter instance +a6b04c5 osd: discriminate based on connection messenger, not peer type +20b25c6 ceph-osd: rename msgr vars +a1dd98d osd: add a separate messenger for the Objecter +ea61aba osd/ReplicatedPG: add whitespace +0712d95 osd: less whitespace +36d6e6f osdc/Objecter: allow ops to be canceled +42b3d55 osdc/Objecter: only request map on startup if epoch == 0 +c6d0b10 osd, objecter: clean up assert_ver() +8ba50c0 osd/ReplicatedPG: drop src_obc.clear() calls +6473060 os/ObjectStore: add bufferlist variant of setattrs +7ec0b4f unittest_lfnindex testing older HASH_INDEX_TAG +8a65ae8 doc/rados/operations/pools: remove experimental note about pg splitting +13aac48 workunits: add a test for caching redirects +3516996 mon/OSDMonitor: 'osd tier {set,remove}-overlay [tierpool]' +dae9a34 osd_types: note that write_tier wins if read_tier is different +efb7ab2 qa/workunits/cephtool/test.sh: test osd tier CLI +e3fb912 Objecter: respect read_tier & write_tier for initial op submission +4e43985 mon/OSDMonitor: 'osd tier cache-mode ' +b76953c Objecter: be careful about precalculated pgids +665acc1 Objecter: add an Op::target_oloc and use it instead of base_oloc in send_op() +e2fcad0 Objecter: rename Op::oloc -> Op::base_oloc +64774e5 os: LevelDBStore: ignore ENOENT files when estimating store size +e60d4e0 ceph-post-file: use mktemp instead of tempfile +96aaa5e ceph_test_rados: rollback bumps user_version +42d65b0 PGLog: initialize writeout_from in PGLog constructor +af0a0cd mon/OSDMonitor: 'osd pool tier ' +5e2c86a osd/OSDMonitor: avoid polluting pending_inc on error for 'osd pool set ...' +ed62c45 osd_types: add pg_pool_t cache-related fields +4f7fce5 osd/ReplicatedPG: drop dout from object_context_destructor_callback +00b6a94 osd/ReplicatedPG: remove debug lines from snapset_context get/put +7a7361d rgw: Fix S3 auth when using response-* query string params +91616ce ceph.spec.in: remove trailing paren in previous commit +b03f241 ceph.spec.in: Don't invoke debug_package macro on centos. +e20d1f8 ceph_test_rados: validate user_version +c8dcd2e osd/ReplicatedPG: set version, user_version correctly on reads +9374dc8 messages/MOSDOpReply: fix user_version in reply (add missing braces) +985a140 librados: add get_version64() +7e72224 rbd.cc: propagate some errors to user-space when they're available +b2b0f20 qa: workunits: mon: test snaps ops using rbd. +0e85074 mon: OSDMonitor: return earlier on no-ops over currently committed state +274b4b9 mon: OSDMonitor: don't propose on prepare_pool_op() +fab7954 mon: OSDMonitor: check if pool is on unmanaged snaps mode on mk/rmsnap +f808c20 PGLog: maintain writeout_from and trimmed +fd3fd59 doc/release-notes: v0.56.6 and .7 bobtail +c240285 mon: discover mon addrs, names during election state too +61b40f4 doc/dev/cache-pool: document cache pool management interface +b91c1c5 add CEPH_FEATURE_OSD_CACHEPOOL +1c0d75d PGLog: don't maintain log_keys_debug if the config is disabled +fe68b15 PGLog: move the log size check after the early return +6c432f1 doc: update to describe new OSD version support as it actually exists +c119afa ReplicatedPG: add OpContext::user_at_version +7db71fc MOSDOpReply: stop filling in replay_version from the MOSDOp to begin with +2c05b4f MOSDOpReply: switch to comprehensive instead of individual version setters +de20997 MOSDOpReply: add enough fields to be backwards compatible. +dc9d3fc osd: actually fill in user_version in pg_log_entry_t +cc1c4a7 osd: add last_user_version to pg_info_t +69280e2 ReplicatedPG: remove OpContext::reply_user_version +2e764a8 osd: switch object_info_t::user_version to be a version_t +57e346b ReplicatedPG: Fill in the MOSDOpReply's user_version +9b998a9 ReplicatedPG: set the replay version based on the at_version +e42ef0c Objecter: expose MOSDOp's new user_version instead of the replay_version +ff1a573 Objecter: librados: mass switch from eversion_t to version_t +931bf7e Objecter: rename Op::version to Op::replay_version +17e32f9 MOSDOpReply: add user_version field +295a84b doc: include plan for new user_version support +1f608bd ReplicatedPG: do not do a redundant set of ctx->new_obs.oi.version +37bba41 ReplicatedPG: remove long-dead branch +f400816 MOSDOpReply: rename *_version() -> *_replay_version() +7a7ae60 MOSDOpReply: rename reassert_version -> replay_version +b5ea74c docs: document how the current OSD PG/object versions work +37850e1 ceph.in: add to $PATH if needed regardless of LD_LIBRARY_PATH state +3266862 doc: Updated to accurately reflect that upstart applies to a single node. +8df504c ceph.spec.in: radosgw package doesn't require mod_fcgi +a10ca4b librbd: fix debug print in aio_write +228510f cleanup: removed last references to g_conf from auth +ea2fc85 SharedPtrRegistry: get_next must not delete while holding the lock +14c31dd doc : erasure code developer notes updates +af5281e common: move SharedPtrRegistry test after t.join +c5b5ce1 osd: install admin socket commands after signals +76a38c3 mon/DataHealthService: preserve compat of data stats dump +f0805cb (origin/wip-6122) test/librados/cmd.cc: tolerate thrashing on pg_command tests +d571825 WBThrottle: use fdatasync instead of fsync +3528100 FileStore: add config option to disable the wbthrottle +ed712c1 fix nss lib name +378728e update the README with required RPM packages +c6a7377 Improve warning message when there are unfound objects, but probing hasn't finished yet. +96621bd mon: DataHealthService: monitor backing store's size and report it +46fb86a mon: mon_types: DataStats: add 'dump(Formatter*)' method +9a1badf mon: MonitorDBStore: rely on backing store to provide estimated store size +41149c4 test: ceph_test_store_tool: output estimated store size on 'get-size' +51fe5da rados-config: do not load ceph.conf +cc3249b osd/ReplicatedPG: require write payload match length +14a1e6e osd/ReplicatedPG: verify we have enough data for WRITE and WRITEFULL +2031f39 ceph_rest_api.py: create own default for log_file +83c8588 ReplicatedPG: mark stats invalid when marking unfound lost +60abe08 ReplicatedPG: make watch timeout configurable +7929228 osd/OSDCap: allow . for unquoted strings +1f573c8 mon/MonCap: allow . in unquoted string +e48ef9e librados: make safe and complete callback arguments separate +476e490 mds: remove waiting lock before merging with neighbours +a816060 doc: Fixed broken link by adding Transitioning to ceph-deploy to this doc. +99a2ff7 os: make readdir_r buffers larger +2df66d9 os: fix readdir_r buffer size +7a091d3 os: KeyValueDB: expose interface to obtain estimated store size +fe50103 mon/Paxos: fix another uncommitted value corner case +0373d74 rgw: bucket meta remove don't overwrite entry point first +f040020 ceph-disk: specify the filetype when mounting +f404023 doc/release-notes: v0.67.2 +3a4f1ce rgw: Adds --system option help to radosgw-admin +5637516 osd: add 'osd heartbeat min healthy ratio' tunable +40f43a0 QA: Compile fsstress if missing on machine. +4b97fcb QA: Compile fsstress if missing on machine. +ab4e85d PGMonitor: pg dump_stuck should respect --format (plain works fine) +a0f3c64 init-ceph: behave if incompletely installed +309569a mon/MonClient: release pending outgoing messages on shutdown +226059e MOSDOpReply: set reassert_version for very old clients +98583b5 yasm-wrapper: more futzing to behave on fedora 19 +3d55534 rgw: fix crash when creating new zone on init +5c5980b ceph.spec.in: remove trailing paren in previous commit +9b667ce ceph.spec.in: Don't invoke debug_package macro on centos. +02e14c7 Makefile: move all crc code into libcrc.la +e55809a crc32c: add intel optimized crc32c implementation +f008ac4 arch: add cpu probing +841a695 yasm-wrapper: hide libtool insanity from yasm +55fa2e8 mon: Monitor: remove lingering debug message from f087d84b +157f222 doc: fix erasure code formatting warnings and errors +d70fd35 mon/Paxos: ignore do_refresh() return value +617dc36 enable mds rejoin with active inodes' old parent xattrs +b419924 init-rbdmap: fix error on stop rbdmap +9242d01 ceph-monstore-tool: shut up coverity +123f79b store: fix issues reported by coverity +d980f58 ReplicatedPG: create ObjectContext with SharedPtrRegistry +bd9f73d ReplicatedPG: replace object_contexts.find with object_contexts.lookup +95349c0 ReplicatedPG: add Context to cleanup the PG after an ObjectContext deletion +833a225 ReplicatedPG: replace map iterators with SharedPtrRegistry::get_next +8c74594 ReplicatedPG: remove lookup_object_context method +13f6807 ReplicatedPG: remove reference counting logic +ff70e76 ReplicatedPG: ObjectContext * becomes ObjectContextRef +7e85c63 ReplicatedPG: ObjectContext is made compatible with SharedPtrRegistry +1688fb4 ReplicatedPG: add Mutex to protect snapset_contexts +e1be37a PG: remove unused PG::_cond +be04918 sharedptr_registry: add a variant of get_next() and the empty() method +8784564 objecter: fix keys of dump_linger_ops +38a0ca6 objecter: resend unfinished lingers when osdmap is no longer paused +d26ba3a rgw: change cache / watch-notify init sequence +576dce0 doc: Clarified quorum requirements. +deb43d9 doc: Fixed typo. +bebba3c doc: fix erasure code formatting warnings and errors +8437304 build-depend on yasm +33783e5 crc32c: note intel crc code copyrights +6ee1591 crc32c: add intel baseline algorithm +552bfe5 vstart.sh: Adds more ENV variables to configure dev cluster +2af59d5 ceph-disk: partprobe after creating journal partition +edf2c34 .gitignore: ignore test-driver +9833e9d fuse: fix warning when compiled against old fuse versions +6abae35 json_spirit: remove unused typedef +c9cdd19 gtest: add build-aux/test-driver to .gitignore +e8e50f6 crc32c: remove old intel implementation +a286090 common/crc32c: refactor a bit +981eda9 mon/Paxos: always refresh after any store_state +7e0848d mon/Paxos: return whether store_state stored anything +b9dee22 mon/Paxos: cleanup: use do_refresh from handle_commit +6ef1970 pybind: fix Rados.conf_parse_env test +eca53bb mon/PGMap: OSD byte counts 4x too large (conversion to bytes overzealous) +3a83129 erasure code : plugin, interface and glossary documentation updates +8e53301 Do not use some compilation flag invalid for clang +1f851cb PG: remove old log when we upgrade log version +6eee73c ceph-fuse: fallocate appears in fuse 2.9.1, not 2.9 +1019274 client: do not mark_caps_dirty for generic fallocate +c339456 client: guard fallocate with #ifdefs +35b00c8 Ceph-fuse: Fallocate and punch hole support +c2548a5 mon: add 'pg dump delta' to get just the rate info +00080d7 PGLog: add a config to disable PGLog::check() +2398c1b doc: Title change. +220f7d6 osd/ReplicatedPG: remove broken AccessMode logic +823435c examples: add a librados/hello_world program +67a95b9 ceph: parse CEPH_ARGS environment variable +eef7cac rados pybind: add conf_parse_env() +9dda1cc doc/release-notes: v0.61.8 +090e4c4 filestore-config-ref.rst: mark some filestore keys as deprecated +4e86be9 librados: synchronous commands should return on commit instead of ack +f5636be mon: make MonMap error message about unspecified monitors less specific. +a846294 auth-config-ref.rst: fix signature keys +4677041 objclass: move cls_log into class_api.cc +70790ab doc/dev/filestore-filesystem-compatibliity: remove outdated xattr notes +2f221fe doc: Updated upgrade doc to include dumpling and incorporate ceph-deploy. +060a463 Makefile: move objclass/*.cc to libosd.la +8ac1af8 doc/changelog: add missing file +d0a6ff9 os/FileStore: initialize blk_size on _detect_fs() +ed4fe32 doc/release-notes: v0.67.1 +4fd34be mds: create only one ESubtreeMap during fs creation +6bb7c62 doc: quickstart: be more explicit that node == mon node +3cbf6a7 rgw: drain requests before exiting +d08e05e ceph-post-file: single command to upload a file to cephdrop +50cc2ef doc: Removed old mkcephfs references. +fa10c41 doc: Removed mkcephfs references. +31c1501 doc: Updated script for dumpling. +16f4bd5 doc: Updated APT script for dumpling. +e97100d doc: Removed mkcephfs references. Did a bit of clean-up work. +211aada ReplicatedPG: add osd_recover_clone_overlap_limit to limit clones +6f0a498 config_opts: add two ceph-rest-api-only variables for convenience +aee053c mon: MonitorDBStore: output to derr instead of std::cout +1c50c44 osdc/ObjectCacher: do not merge rx buffers +b59f930 osdc/ObjectCacher: match reads with their original rx buffers +93d8be2 osd: Add perf tracking for all states in RecoveryState +895d531 cls/hello: hello, world rados class +359850b osd: enforce RD, WR flags for class methods +f61698d cls_rbd: remove old assign_bid method +93ac92d librbd: remove mostly-useless assign_bid helper +610dc01 osd: do not return data payload for successful writes +681436a common/Preforker: shut up warning +266460e ceph.in: --admin-daemon was not returning EINVAL on bad command +12b012a PendingReleaseNotes: reflect 'osd crush set' behavior change +249c7f2 vstart.sh: s/osd crush set/osd crush add/ as it's supposed to be +9c624fb mon: OSDMonitor: don't expose uncommitted state on 'osd crush add/set' +995a316 mon: OSDMonitor: document 'prepare_command' wrt expected behavior of no-ops +88464a6 mon: OSDMonitor: don't expose uncommitted state on 'osd crush link' +97c3a9a mon: clarify 'osd crush add' vs 'osd crush set' +ed6233e mon/MonCap: remove useless 'osd crush add' perm from profile bootstrap-osd +0380475 mon: AuthMonitor: fix some >80 columns debug strings +737fe1f mon: AuthMonitor: fix whitespaces +cf189cf mon: AuthMonitor: remove dead code +35565ee mon: use str_join instead of std::copy +fc23cfe config: fix stringification of config values +ce3a094 common: add str_join helper +e7836e6 mon/PGMap: fix typo +3ba4dc3 Revert "config: fix stringification of config values" +fefe0c6 config: fix stringification of config values +9f1ad4d Document unstable nature of CephFS +3d7a949 Renamed filestore_backend test +5a15369 store: Add (experimental) ZFS parallel journal support +a25d73e store: Abstract the underlying filesystem functionality +24ec320 Ceph-qa: change the fsx.sh to support hole punching test +086abe4 doc: Fixed typo. +4422f21 rados.py: fix Rados() unicode checking +34da9cb rados.py: fix Rados() backwards compatibility +2cfcb77 mon/PGMap: degraded what? +49ddecd mon: status: client io, recovery io prefixes +94c3f29 OSDMonitor: add 'osd perf' command to dump recent osd perf information +ebde89d ObjectStore: add ObjectStore::get_cur_stats and impl in FileStore +16ed0b9 librados: fix async aio completion wakeup +7a52e2f librados: fix locking for AioCompletionImpl refcounting +4f31756 doc: Added dumpling to RPM installation. +d38a041 doc: Minor tweaks to debian install. +456a394 doc: Added dumpling installation for Debian/Ubuntu. +dfd5854 remove racy test assertions +90ccd26 qa/workunits/fs/multiclient_sync_read_eof.py +95f3353 osd_types: add osd_perf_stat_t type +d1a8165 client: add enclosing object for asok dumps +0c23633 pybind/ceph_argparse: GPL -> LGPL2 +2206f55 rbd.cc: relicense as LGPL2 +fbc65ea mon/PGMap: make pg state indentation cleaner +6d8d726 mon: status: only include mdsmap if epoch > 1 +a9033eb mon: move recovery rate to a separate line +c926d08 mon: move mdsmap up +eeed33a mon/PGMap: make si modifiers look prettier +ef9c991 mon: make pg info in 'status' more informative and visually parseable +9b94f90 types: pretty_si_t +1860ed9 mon/PGMap: break out print_oneline_summary +054fd88 mon: expand osd summary (flags on separate line) +f417b10 osdmap: move oneliner summary to separate function +6f5d803 librados: fix MWatchNotify leak +810c52d rgw: do not leak handler in get_handler() error path +e3b7bc5 (tag: v0.67) v0.67 +977b7f5 doc/release-notes: fix rst +f501ec7 doc/release-notes: upgrade sequence +de7bbdb doc/release-notes: roll-up of upgrade/compat notes from cuttlefish to dumpling +6df75da init-rbdmap: minor fix no rbd exist +d9cb2ea init-rbdmap: fix for recursive umount +c927f89 rgw: rgw-admin throw an error when invalid flag is passed +b9a5664 Makefile.am: fix libglobal.la races +c81edf1 tools: ceph-monstore-tool: allow copying store contents to a new location +2632846 rgw: fix multi delete +c566c03 doc: complete S3 features status from existing doc page +ef91c69 mon: mon_cluster_log_file_level +cb50b5a ceph-disk: fix mount options passed to move_mount +b66a3d6 config_opts.h: reduce osd_recovery_max_active and osd_recovery_max_single_start +b221a42 doc/release-notes: adjust whitespace +bec6f09 doc/release-notes: v0.67 release notes +44b093c ceph: retry new-style mon command if we get EINVAL from the old-style command +7ed6de9 common: pick_addresses: fix bug with observer class that triggered #5205 +8bf3971 rearrange the documentation to be inserted and maintained in master +068baae rgw: return 423 Locked response when failing to lock object +9029555 rgw: make RGWHTTPClient callback methods pure virtual +71177fe rgw: rename read_header() to receive_header() where needed +1563613 rgw: rename data receive callbacks in swift token revocation +eade36d PendingReleaseNotes: note 'ceph daemon ...' argument behavior change +e1666d0 Fix compilation -Wmismatched-tags warnings +5082fec doc: Add a page about rgw S3 API compliance +fd06261 ant is missing from the list of packages to install +980a073 document the write / read path for erasure encoding +0aacd10 RadosClient: shutdown monclient after dropping lock +ca3987f mds: notify clients about deleted inode +b2515b9 buffer: change #include order +6cbe0f0 make sure we are using the mount options +34831d0 make sure we are using the mount options +fd19235 ceph.in: return EINVAL on daemon command error +0be1475 ceph.in: Re-enable ceph interactive mode (missing its output). +2e28087 mon: fix 'osd crush rule rm ...' dup arg +0c1fd62 qa/workunits/cephtool/test.sh: test set/unset of all osd flags +298e7d8 mon/MonCommands: fix typo nobackfile -> nobackfill +afa21e8 Add back the mistakenly removed "ceph osd set noscrub/nodeep-scrub" +6820390 OSD: suspend timeout on process_peering_events pg lock +da69756 test: mon: moncap: add 'allow command foo with arg="bar.baz"' tests +258135b qa: workunits: mon: workunit to stress the monitor's caps +5c6dc1c mon: AuthMonitor: change 'auth add' behaviour +94002c4 mon: drop old _allowed_command() +612444a mon: services: no longer needed to enforce caps on a per-service basis +2071af2 mon: Monitor: purge old permission checking format on handle_command() +f087d84 mon: Monitor: check caps considering command's requirements +944f3b7 OSD: only start osd_recovery_max_single_start at once +8b53a14 ReplicatedPG: ping tphandle between pushes +d0cbdde ReplicatedPG: ping TPHandle during scan_range +95b3604 OSD: also suspend timeout while grabbing recovery_tp lock +321f57d OpRequest: don't warn as quickly for slow recovery ops +0017010 mon, osd: Clean up "flush(stringstream)" continued +e904018 mon, osd: Clean up "flush(stringstream); bl.append(stringstream.str()) +2e9c25f doc: fixing reported bug in CRUSH map example. +cafccfa doc: Added many new fields to config reference. +a5d8605 doc: Added trouble shooting entry. Fixed formatting. +e3d59a2 doc: Nomenclature update. +1db0f25 doc: Nomenclature update. +a38ab07 doc: Nomenclature update. +0f56e3e doc: Nomenclature update. +ea80532 doc: Nomenclature update. Added topic for monitor key caps. Added default pool steps. +db27c3f qa/workunits/cephtool/test.sh: add tests for 'pg dump ...' +42582f0 mon/PGMonitor: add 'pg dump pgs_brief' subcommand +a092995 mds: fix locking, use-after-free/race in handle_accept +9e88b1b rgw: only log (as in ops logging) certain operations +b165d33 rgw_admin: flush replicalog entries +6dd4ff8 cephtool/test.sh, rest/test.py: add tell command tests +28d58eb ceph.in, ceph_rest_api.py: import only used syms from ceph_argparse.py +55095d5 cephtool/test.sh: add a few tests for invalid command args +71ff794 ceph_argparse.py: add stderr note if nonrequired param is invalid +9466a0b Fix "too few args validate" +1cd6e2e fix invalid cluster naming in example +0304dfb Add links to OSD internals related tracker items. +0d1040d Add links to scrub related tracker items. +349e7900 Add links to peering related tracker items. +4236147 Add links to recovery related tracker items. +1286288 Add links to backfill related tracker items. +160fa71 fix typo +ac6f3b7 M+K means M data + K parity and implies M chunks necessary to recover +0c22dad mds: don't issue caps while session is stale +8f67adf mds: change LOCK_SCAN to unstable state +f86828d mds: handle "state == LOCK_LOCK_XLOCK" when cancelling xlock +63a21b4 mds: remove "type != CEPH_LOCK_DN" check in Locker::cancel_locking() +3c3b2ce mds: revoke GSHARED cap when finishing xlock +7555819 mds: fix cap revoke confirmation +e5d9ac6 qa/workunits/cephtool/test_daemon.sh: we should error on bad command +9e7d6d5 PG: set !flushed in Reset() +826478c dev/osd_internals,src/osd: add erasure_coding.rst and PGBackend.h +ae15381 rgw: only fetch cors info when needed +b139a7c rgw: don't read cors attrs if there's no bucket in operation +43c2712 rgw: rename sync-type to update-type +bbac69c rgw: only check version if meta object exists +6256d68 Add the definition of PG temp to the glossary +caaaf2c ceph.spec.in: merge back JUnit handling from SUSE spec +cbf3a11 ceph.spec.in: move junit BuildRequires to the cephfs-java subpackage +4a95796 ceph.spec.in: use snappy-devel only on RHEL derivatives +17b460c ceph.spec.in: add missing buildrequires for Fedora +ef20542 Fix for Swift key command +c70e59e mon/MDSMonitor: don't call all EINVALs "unrecognized command" +c9e8ff2 rest/test.py: retry mds setmap in case epoch has changed +dc1d95d rest/test.py: expect_nofail() to allow examination of reason +4a6eff8 Verify that deleting op never in check_latest_map_ops map +600e6ac osdc: op left in check_lastest_map_ops +175feb9 rgw_rados.cc: fix invalid iterator comparison +b4ed4e2 qa/workunits/cephtool/test_daemon.sh: sudo +d651658 osdc: Add asserts that client_lock is held +5bd061c test: Fix valgrind found "Mismatched free() / delete / delete []" +c48644d qa: Add workunit that hangs for manual thrasher testing +00dc634 ceph: developer mode: set PATH, too +e70e08c cephtool/test.sh: add tests for mon daemon command +47d0d64 Make all AdminSocket commands use argparse/cmdmap. +736d6a1 rgw: fix set_buckets_enabled(), set_bucket_owner() +0e125e0 Objecter: set c->session to NULL if acting is empty +16adb91 (tag: v0.67-rc3) v0.67-rc3 +e747fa8 Revert "Use dh_installinit to install upstart job files" +ebab04e mon: add missing state name +b8af38b mon: allow others to sync from us across bootstrap calls +634dcf3 mon: drop useless sync_reset() calls +f7d1902 mon/Paxos: be more vocal about calling elections +eb6e6da rgw: keep a region connection map +f10c2e7 rgw: cors subresource needs to be in canonical auth header +b5e7448 rgw: set bucket attrs are a bucket instance meta operation +68730d8 rgw: track bucket instance oid +acd16d1 rgw: read / write bucket attributes from bucket instance +f3eda63 mon/PGMonitor: fix 'pg dump_[pools_]json' +099ac51 mon: fix xml element name +ee9f04c check_new_interval must compare old acting with old osdmap +1f13d8a OSD: suspend tp timeout while taking pg lock in OpWQ +f1bd4e5 WorkQueue: fix bracing on reset_tp_timeout +a6cd9fe osd: get initial full map after a map gap +e24b502 osd: fix off-by-one in map gap logic +251a6a4 Use dh_installinit to install upstart job files +b62845e doc/changelog/v0.61.7 +a46f60a doc/dev/repo-lab-access: notes +12c1f11 ceph_test_rados: print version banner on startup +74c1bec ceph-authtool: fix cli tests +7b683f7 test/system/*: parse CEPH_ARGS environment +347b5a2 ceph-authtool.8: add missing commands to man page +86b2632 ceph_authtool.cc: update help/usage text +4b6c569 mon/DataHealthService: do not name xml key after mon +6881ab3 debian, rpm: make python-ceph depend on python-requests +2ec480b replace in_method_t with a counter +6b16cd1 unit tests for sharedptr_registry +09ee092 pybind/rbd.py: remove unused import of 'pointer' +2460118 cephfs.py: remove unused imports +865d5e9 rados.py: fix bad indentation +6eadb87 ceph_argparse.py: add missing spaces after comma +da4d23e ceph_argparse.py: remove unnecessary semicolons +a48b391 ceph_rest_api.py: fix bad indentation +2594831 rgw: fix leak of RGWDataChangesLog::renew_thread +a313563 rgw: free resolver on shutdown +59b13ce rgw: fix up signal handling +bd0e35f test/admin_socket: fix admin_socket unit tests +9486536 rgw: fix RGWFormatter_Plain +535d870 common/admin_socket: do not populate empty help strings +b4bde3c common/perf_counters: fix unit tests +2aa9afa common/perf_counters: fix missing decimal in time, quoting +a8c1a2a common/Formatter: add dump_format_unquoted() +0041e9f rados.py: missing parameter to make_ex() +8af4775 ceph-rest-api: clean up options/environment +629326a qa/fs/.gitignore +803a1fd ceph_test_admin_socket: fix unit test +a419354 message: Fix asserts that dont' trigger +a9ca623 librados: EINVAL on a negative osd id +3f93691 ceph.in: make osdids() (and mon, mds) work on old mons +4b73900 osd: humor coverity +323bdaa mon/MonCap: mds needs to subscribe to the osdmap +14a3e2d remove unused fiemap code +6faf8b6 PendingReleaseNotes: note on 'ceph tell ...' +aa00ace ceph_rest_api.py: cleanup, more docstrings, unused vars +d75b6ea ceph_argparse.py: make find_cmd_target handle tell +8985e1c ceph_argparse, mon: make "tell " work (duplicating "pg ") +7b42dee ceph_rest_api.py: obtain and handle tell commands +6ac8aed mon/PGMonitor: reset in-core PGMap if on-disk format changes +de51aac rgw/rgw_metadata.cc: delete md_log (RGWMetadataLog) in destructor +a45e296 rgw/rgw_rest_log.cc: free 'handle' to prevent memory leak +94cefc7 test_cls_log.cc: fix resource leak, delete 'rop' +87f8e8f test_cls_log.cc: remove empty lines +44f43ff test_cls_statelog.cc: fix memory leak, delete 'rop' +143b843 test_cls_version.cc: close some memory leaks +a90a2b4 upstart: stop ceph-create-keys when the monitor stops +6f99622 osd: make open classes on start optional +c24e652 osd: load all classes on startup +bcbb807 PG: add formatted output to pg query, list_missing +6e6ceff OSD: "tell " version, bench, dump_pg_recovery_stats: formatted +c9fcda8 OSD: provide newer command descs with module/perm/avail +cd16d73 ceph.in: clean up help, fix partial matching on all help +cb38762 ceph.in: admin_socket() now validates command and passes format +67eb7de ceph_argparse.py, ceph.in: validate_command: stop handling format +ba6ca58 In general, flush in caller of dump worker rather than worker +c562b72 FileStore: fix fd leak in _check_global_replay_guard +1e991ed add condrestart to the sysvinit script +c7c4c23 Formatter, admin_socket: make default formatter be json-pretty +3f598e8 AdminSocket users: use generic formatting +4aeb73a ceph_rest_api.py: reversed test for failed request +47d0937 rest/test.py: earlier versions of requests.py don't quote ' ' in params +6951d23 OSD: tolerate holes in stored maps +fbf74d9 ceph_rest_api.py: return error in nonformatted mode +8b3d7a1 ceph_rest_api.py: actually remove the trailing / on baseurl +dfabc61 mon/MonCap: match param for entity (not name) +ca8ac95 mon: translate caps=[k1,v1,k2,v2] into [caps_k1=v1, caps_k2=v2] +05b6c7e mon/Paxos: share uncommitted value when leader is/was behind +063c71f rgw: expose the version of synced items to the poster +81b62b5 rgw: return the update status on sync requests +8ffc4ca rgw: add sync state parsing code and REST interface +18eabd3 rgw: pass the sync mode into the RGWMetadataManager::put() calls. +4f9855e rgw: add preliminary support for sync update policies on metadata sync +176aa39 remove old push_to_kclient.pl +ebb9ace ceph-disk: use new dumpling-style osd caps if we can, or fall back to old-style ones +b46fb62 osd: Don't put functional code inside of an assert +27a0b86 ceph_argparse.py: wrong variable used if valid() fails for Ceph{Osd}Name +f653aa5 config_opts.h: increase xfs,btrfs wbthrottle defaults +78214af doc/release-notes: v0.61.7 +870c474 FileStore::_collection_rename: fix global replay guard +0dc3efd HashIndex: reset attr upon split or merge completion +37a4c4a test/filestore/store_test: add test for 5723 +cb3ee1e rgw/rgw_metadata.h: init prefix in initialization list +6bc0d04 test_rgw_admin_log.cc: remove unused variable 'creds' +dda1014 test_rgw_admin_log.cc: use static_cast<>() instead of C-Style cast +8f45a73 test_rgw_admin_opstate.cc: remove unused variable 'creds' +e4dfe8a test_rgw_admin_meta.cc: remove unused variable 'creds' +9d4c42f test_rgw_admin_opstate.cc: use static_cast<>() instead of C-Style cast +4c778e2 test_rgw_admin_meta.cc: use static_cast<>() instead of C-Style cast +a8b70f0 doc/release-notes: v0.67-rc2 +41930b5 ceph.spec.in, debian/control: python-ceph depends on python-flask +0018b45 (tag: v0.67-rc2) v0.67-rc2 +fe2019c rest/test.py: cope with older requests.py versions +fd1fd66 ceph-disk: use new get_dev_path helper for list +0b8cad1 ceph_rest_api.py: allow config section fallback +d7df620 global/signal_handler: poll on the control pipe, too +085f129 ceph.in: remove dead code +1579c34 rest/test.py: osd lspools should be a 'GET' +e839420 MonCommands.h: osd pool delete "rw" perms, osd pool set no longer exp +9285506 ceph.in/ceph_argparse.py: move find_cmd_target() to ceph_argparse.py +c2131d4 mon/OSDMonitor: search for latest full osdmap if record version is missing +a055988 rgw/rgw_metadata.h: init cur_shard in LogListCtx with 0 +ebff1eb rgw/rgw_metadata.cc: fix possible null dereferencing +6e6ef01 os/ObjectStore.cc: don't fallthrough after OP_OMAP_RMKEYRANGE +27e38e4 mon/Monitor.cc: init scrub_version with 0 in constructor +a7a7d3f test: test_store_tool: global init before using LevelDBStore +76cd7ac mon: OSDMonitor: fix a bug introduced on 97462a32 +1cdb3ec configure.ac: Remove -rc suffix from the configure version number. +c8d66b7 Remove fuse-utils from Recommends in debian/control +b7c40ec configure.ac: Set version number to match git describe. +4444c94 doc/release-notes: v0.61.6 +8e4a78f global/signal_handler: use poll(2) instead of select(2) +4183b74 mon/MonmapMonitor: make 'mon remove ...' idempotent +2338a32 client: signal mds sessions with Contexts instead of Conds +3207542 client: add Context*-based wait_on_list/signal_context_list helpers +612a9b3 mon: add quorum_names to quorum_status command output +9a7a055 ceph-fuse: disable getgroups_cb +2c87d9f mon: PGMap dump shouldn't use strings containing '+' as tags +96551f9 mon: "status" is missing a close_section for the overall output +3dcfe38 mon: "osd stat" needs a flush now that osdmap.print_summary() doesn't +e4d0eee mon: "mds stat" must open/close section around dump_info +3a69fd0 ceph.spec.in: obsolete ceph-libs only on the affected distro +e807770 mon/OSDMonitor: fix base case for 7fb3804fb workaround +e536d66 ceph.spec.in: obsolete ceph-libs only on the affected distro +8814265 Enable libs3 support for debian packages +97462a3 mon: OSDMonitor: work around a full version bug introduced in 7fb3804fb +bc8d62f mon: OSDMonitor: get rid of encode_full() as we don't use it. +a815547 mon: OSDMonitor: update the osdmap's latest_full with the new full version +f46e8b9 doc/release-notes: v0.67-rc1 +7b3b989 qa/workunits/suites/fsync-tester.sh: lsof at end +3f31540 qa/workunits/rest/test: cluster_down/up are now idempotent +88f4a96 log: remove unused lock +093182b osd/ReplicatedPG: drop repop refs in ~SnapTrimmer +6582b31 FileStore: disable fd cacher and wbthrottle during replay +2fd4421 PGLog::merge_log, unidex() only works from tail, we index() below anyway +6957dbc PGLog::rewind_divergent_log: unindex only works from tail, index() instead +046d5cb src/test/osd/TestPGLog.cc: check that the object remains in log.objects +1ecdb14 rgw: swift, in create bucket set location_constraints +8a2eb18 rgw: translate swift request to s3 when forwarding +165b0d0 PendingReleaseNotes: update about new rgw copy obj response +9f05db6 rgw: add some comments +c5025d4 rgw: dump progress through swift object copy +6094685 rgw: send data back when copying object +cfe1395 mon/Paxos: add failure injection points +20baf66 mon/Paxos: fix pn for uncommitted value during collect/last phase +19b2978 mon/Paxos: debug ignored uncommitted values +b3253a4 mon/Paxos: only learn uncommitted value if it is in the future +b26b7f6 mon/Paxos: only share uncommitted value if it is next +99e6054 mon/Paxos: accepted_pn_from has no semantic meaning +a61635e ceph-monstore-tool: dump paxos transactions +e60d14d ceph.in: reject --admin-daemon so it can't do harm +835dd97 (tag: v0.67-rc1) v0.67-rc1 +58c78db FileJournal: fix posix_fallocate error handling +0897d3a OSD::_make_pg: use createmap, not osdmap +2dbb273 src/*: make Context::finish private and switch all users to use complete +d28c18d OSD::RemoveWQ: do not apply_transaction while blocking _try_resurrect_pg +6c4cd22 FileStore: use complete() instead of finish() and delete +9f591a6 Finisher: use complete() not finish() and delete +8536ff9 common/Cond.h: add a simpler C_SaferCond Context +20bc09c rgw: read attributes when reading bucket entry point +eabf2f6 ceph.spec.in: Obsolete ceph-libs +db2850c test_cls_statelog.cc: fix resource leak, delete 'rop' at end of function +5f4f87b test_cls_statelog.cc: fix resource leak, delete op at end of function +fc1c1c6 test_cls_statelog.cc: fix resource leak, delete rop at end of function +8e8596d test_cls_version.cc: fix resource leak, delete before new() +3e94393 test_cls_version.cc: fix resource leak, delete before new() +d3782d8 test_cls_version.cc: fix another ressource leak +c35eeae test_cls_version.cc: fix ressource leak +637e106 cls/rgw/cls_rgw.cc: init start_key_added with false +3846bf2 fuse: fix fuse_getgroups detection +6402e46 doc: Fixed formatting errors. +eb03e9d doc: Updated RPM documentation with additional details. +617b3f7 cls_replica_log_types.h: pass const std::list<> by reference +6319823 mon/PGMonitor.cc: reduce scope of local 'num_slow_osds' variable +cf29d17 rgw/rgw_bucket.cc: use static_cast<>() instead of C-Style cast +d181aaa test_cls_version.cc: don't free object twice, free the right one +11c51e8 rgw/rgw_metadata.cc: use static_cast<>() instead of C-Style cast +e910421 rgw: change RGWOp::name() to return string instead of char* +c3acc25 mon, mds, osd: add early SIGTERM injection +7e25fec mds: put g_ceph_context on shutdown +1fd01e3 mon: shutdown: remove sessions under mon->lock +ba5e357 mds: reorder suicide/shutdown a bit +318f3df mds: install signal handlers after init +868b486 mon: install signal handlers after init +b084a38 osd: do not assume we have an osdmap in prepare_to_stop +61a298c osd: install async signal handlers after init() +3dec530 qa/workunits/mon/caps.sh: clean up users; rename +675d783 mon/MonCap: simplify rwx match logic +f79d965 mon: fix command caps check +fb21504 qa: workunits: mon: test mon caps permissions +0356eeb mon/PaxosService: update on_active() docs to clarify calling rules +6d326b8 mon/OSDMonitor: discard failure waiters, info on shutdown +8371680 mon: OSDMonitor: only thrash and propose if we are the leader +e4f2e3e mon/OSDMonitor: do not wait for readable in send_latest() +6edec51 Revert "mon/OSDMonitor: send_to_waiting() in on_active()" +2795eb1 Revert "mon: OSDMonitor: only thrash and propose if we are the leader" +0a99649 Revert "mon/OSDMonitor: fix typo" +8c5e1db ceph_rest_api.py: remove unused imports +ce46961 ceph.in: better error message when daemon command returns nothing +06ae53e mon: improve osdmap subscription debug output +934ad88 rgw: grab the old mtime when doing a user metadata put +f4675dc test: switch the cls_replica_log tests to use a test fixture +da8584f rgw: remove extra unused param from RGWRados::get_attr() +d44082e cls_rgw: quiet down verbose log message +4e05786 rgw: replace logic that compares regions +e4d2787 rgw-admin: link / unlink should report errors +0024e5a rgw: fix time parsing in replica log +7cd0bd8 rgw: bucket entry point object ver fixes +89ecba2 rgw: remove s->objv_tracker +85f3f09 rgw: forward delete bucket request to master after removal +989a4d9 rgw: adjust error for bucket removal on secondary region +2e51823 rgw: forward x_amz_meta headers when forwarding a request +4f4bdbd rgw: fix bucket re-creation on secondary region +0de7085 mon/MonClient: fix small leak +d1b83be msgr: mark addr-based [lazy_]send_message and get_connection deprecated +11c47cc client: mark_down by con +000d4d3 mon: mark_down session by con, not addr +30de040 mon: break con <-> session ref cycle in mon even if shutting down +564075c msg/SimpleMessenger: remove duplicated interface docs +27868ca msgr: update docs for mark_down, mark_down_all semantics +8dcf0b1 msgr: generate reset event on mark_down to addr (not con) +bfadcd2 osd/ReplicatedPG: fix obc leak on invalid LIST_SNAPS op +561ac0b osd: break con <-> session cycle when marking down old peers +41c67e0 osd: make ms_handle_reset debug more useful +6ebb486 doc: Update syntax for rbd children +8574b3c mon/PGMap: don't mangle stamp_delta in clear_delta() +99fa208 osd: log PG state changes at level 5 +c549e62 mon/PGMap: avoid negative pg stats when calculating rates +9292c18 mon/PGMap: use signed values for calculated rates +47516d9 ReplicatedPG: track temp collection contents, clear during on_change +9f56a7b PG, ReplicatedPG: pass a transaction down to ReplicatedPG::on_change +2e09b6e osd: add floor() method to pg/osd stat structs +b4db588 osd: make pool_stat_t *log_size fields signed +4bf4d92 doc: radosgw needs 'mon = allow rw' to create its own pools +d3e53cd mon/MonClient: better debugging on version requests +c4d4f34 doc/release-notes: fix typo +053659d msg/Pipe: work around incorrect features reported by earlier versions +f0feabe Message,OSD,PG: make Connection::features private +d1b47f4 test: update cli test for radosgw-admin +76040d9 rgw: Adds --rgw-zone --rgw-region help text. +1b8d50e doc/release-notes: amend 0.61.5 release notes +c9ba933 mon/MonClient: fix small leak +4ed7942 init-ceph: don't activate-all for vstart clusters +f9e9f9c mon/PGMonitor: fix 'pg map' output key names +9ab539e PG: add perf counter for peering latency +fd53d53 msgr: mark addr-based [lazy_]send_message and get_connection deprecated +8ff7d53 client: mark_down by con +e0067a8 mon: mark_down session by con, not addr +3c81475 mon: break con <-> session ref cycle in mon even if shutting down +f7d0403 msg/SimpleMessenger: remove duplicated interface docs +5e72417 msgr: update docs for mark_down, mark_down_all semantics +e1e0d50 msgr: generate reset event on mark_down to addr (not con) +c522634 osd/ReplicatedPG: fix obc leak on invalid LIST_SNAPS op +d3748b2 osd: break con <-> session cycle when marking down old peers +2428bfd osd: make ms_handle_reset debug more useful +921a4aa cls_lock: fix duration test +dd0246d mds: tracedn should be NULL for LOOKUPINO/LOOKUPHASH reply +f3f92fe FileStore: add global replay guard for split, collection_rename +723d691 msg/Pipe: do not hold pipe_lock for verify_authorizer() +a59493e doc/release-notes: add/fix changelog links +d21d39e doc/release-notes: v0.61.5 +29c0252 mon: fix off-by-one in check for when sync falls behind +07dfb6f rgw: drop unused assignment +aa460c4 mon: make 'health' warn about slow requests +82722ef osd: include op queue age histogram in osd_stat_t +2e216b5 qa/workunits/cephtool/test.sh: test 'osd create ' +b41f1ba PG: start flush on primary only after we process the master log +278c7b5 ReplicatedPG: replace clean_up_local with a debug check +1a84411 msgr: fix a typo/goto-cross from dd4addef2d +57bd6fd osd: make 'from dead osd' message more informative +16568d9 msg/Pipe: a bit of additional debug output +ecab4bb msg/Pipe: hold pipe_lock during important parts of accept() +687fe88 msgr: close accepting_pipes from mark_down_all() +dd4adde msgr: maintain list of accepting pipes +994e2bf msgr: adjust nonce on rebind() +07a0860 msgr: mark_down_all() after, not before, rebind +ad548e7 msg/Pipe: unlock msgr->lock earlier in accept() +9f1c272 msg/Pipe: avoid creating empty out_q entry +579d858 msg/Pipe: assert lock is held in various helpers +0ebf23c ceph_mon: obtain backup monmap if store is marked with 'force_sync' +d150193 mon/OSDMonitor: make 'osd pool mksnap ...' not expose uncommitted state +56c5b83 qa/workunits/cephtest/test.sh: put 'osd ls' before any 'osd create' tests +ad9a104 mon: MonCommands: remove obsolete 'sync status' command +884fa2f OSD::_try_resurrect_pg: fix cur/pgid confusion +7e16b72 mon/AuthMonitor: make 'auth del ...' idempotent +f129d17 qa/workunits/cephtool/test.sh: mds cluster_down/up are idempotent +f2fa01e ceph: send successful commands twice with CEPH_CLI_TEST_DUP_COMMAND +d45429b mon/MDSMonitor: make 'mds cluster_{up,down}' idempotent +9c4a030 osdmaptool: fix cli tests +2ea8fac ceph-disk: use /sys/block to determine partition device names +5b031e1 ceph-disk: reimplement is_partition() using /sys/block +3359aae ceph-disk: use get_dev_name() helper throughout +35d3f2d ceph-disk: refactor list_[all_]partitions +e040159 ceph-disk: add get_dev_name, path helpers +d656aed mon/OSDMonitor: fix typo +d90683f osd/OSDMonitor: make 'osd pool rmsnap ...' not racy/crashy +1999fa2 ObjectStore: add omap_rmkeyrange to dump +44c3917 OSD: add perfcounter tracking messages delayed pending a map +d9e0e78 FileStore: add a perf counter for time spent acquiring op queue throttle +4d9d0ff mon/OSDMonitor: return error if we can't set the new bucket's name +466d0f5 crush: return EINVAL on invalid name from {insert,update,create_or_move}_item, set_item_name +93fc07c crush: add is_valid_crush_name() helper +5eac387 mon: OSDMonitor: only thrash and propose if we are the leader +b19ec57 mon/MDSMonitor: make 'ceph mds remove_data_pool ...' idempotent +ba28c7c mon/OSDMonitor: clean up waiting_for_map messages on shutdown +f06a124 mon/OSDMonitor: send_to_waiting() in on_active() +72d4351 rgw: quiet down ECANCELED on put_obj_meta() +acbc2f0 osd: do not enable HASHPSPOOL pool feature by default +64379e7 ceph-disk: rely on /dev/disk/by-partuuid instead of special-casing journal symlinks +3706dbb PendingReleaseNotes: formatted ceph CLI output and ceph-rest-api +ad1392f mon: Monitor: StoreConverter: clearer debug message on 'needs_conversion()' +e752c40 mon: Monitor: StoreConverter: sanitize 'store' pointer on init +036e673 mon: Monitor: do not reopen MonitorDBStore during conversion +d873c29 rgw/rgw_rest_s3.cc: fix dereferencing after deallocation +e45a9bb rgw/rgw_op.cc: reduce scope of local 'ret' integer variable +c484150 rgw/rgw_rados.cc: use static_cast instead of C-Style cast +cc49d3f rgw/rgw_rest.cc: fix malloc memory leak +7a2e8a6 rgw/rgw_bucket.cc: return result of function calls +7769b01 rgw_bucket.cc: don't return bool if return value is int +64b512c rgw/rgw_bucket.cc: remove unused local variable +a937a12 rgw_admin.cc: fix same expression on both sides of '||' +5ea4c5e cls_rgw_client.cc: reduce scope of local variable +408014e rgw: handle ENOENT when listing bucket metadata entries +eef4458 rgw: fix bucket placement assignment +39e5a2a OSD: add config option for peering_wq batch size +b46930c mon: make report pure json +daf7672 ceph: drop --threshold hack for 'pg dump_stuck' +4282971 msg/Pipe: be a bit more explicit about encoding outgoing messages +314cf04 messages/MClientReconnect: clear data when encoding +34f76bd mon: set forwarded message recv stamp +eac559f mon: drop win_election() _reset() kludge and strengthen assertions +c67d50b mon: set peon state to electing if other mons call an election +3ea984c mon: once sync full is chosen, make sure we don't change our mind +1fc85ac mon/PaxosService: consolidate resetting in restart() +7666c33 mon/PaxosService: assert not proposing in propose_pending +c711203 mon/Paxos: separate proposal commit from the end of the round +5c31010 mon/Paxos: make all handle_accept paths go via out label +f1ce8d7 mon: fix scrub vs paxos race: refresh on commit, not round completion +a722fb7 rgw: fix bucket instance json encoding +346d9f4 rgw_admin: fix gc list encoding +55ff523 doc: Fixed link in Calxeda repo instruction. +aa60f94 mon: once sync full is chosen, make sure we don't change our mind +6d3e13f rgw: fix more warnings +1dfd06d test_rgw: fix a number of unsigned/signed comparison warnings +01ec4f1 rgw: Fix typo in rgw_user.cc +fe13f88 doc: Modifies keyring path in radosgw config page. +cf9571c test_rgw_admin_meta: fix warnings +bc3088c cls_rgw: fix warning +6ef48c7 doc: update Hadoop docs with plugin download +a805958 doc: document new hadoop config options +9baa668 Makefile: cls_rgw needs cls_rgw_types linked in now too +6b7d9f2 mon: include some (basic) auth info in report +56c36fa mon: include paxos info in report +bf7c402 mon: move quorum out of monmap +89ced1c mon: include service first_committed in report +629a9d7 Use mon_host instead of mon_addr in ceph_conf +9ca4733 hypertable recent version prototyping includes bool verify in length and read functions +df45b16 Makefile: build cls_rgw even if we're not building radosgw +35ef873 Makefile: fix cls_rgw linkage +cda17fd Makefile: fix cls_refcount linkage +8d9165a qa/workunits/rbd/simple_big: fix unmap +15e3c9a qa/workunits/fs/test_o_trunc.sh: fix path +efe5b67 mon/Paxos: bootstrap peon too if monmap updates +d4876c5 mon/PaxosService: do not prepare new pending if still proposing +f37c36e mon/PaxosService: remove redundant check +bf4f802 mon/PaxosService: fix trim completion +0d66c9e MonCommands.h: use new validation for crush names (CephString goodchars) +741757a ceph_argparse.py: allow valid char RE arg to CephString +089dfe8 ceph_argparse: ignore prefix mismatches, but quit if non-prefix +da4c749 ceph_argparse.py: validate's 3rd arg is not verbose, it's partial +cc10988 ceph-rest-api: separate into module and front-end for WSGI deploy +495ee10 msg/Pipe: fix RECONNECT_SEQ behavior +48a2959 mon: make ancestor arg for 'osd crush rm|remove ' optional +c0845a9 mon: AuthMonitor: don't try to auth import a null buffer +60a19e7 PendingReleaseNotes: ceph -s --format=json output change +5dd1d4b test: idempotent filestore test failure +c70216a Revert "test_filestore_idempotent: use obj name from source coll add" +0a3c902 Revert "test_filestore_idempotent: make newly created objects globally unique" +eccbdaa ceph-object-corpus: added cuttlefish objects +97efc72 rgw: fix a typo +a44854c qa/workunits/cls: remove new rgw tests +b7c549d msgr: add 'ms die on old message' to help catch reconnect seq issues +9f5cae4 mon: structure 'ceph status' json output +2dcab51 mon: fix copy/paste error +cf9d1e1 mon: clean up check_fsid() a bit +2dc8688 mon: stash latest state when flagging force_sync +96c4883 mon: factor out stashing latest monmap +0c83b5f cls_rgw: add missing type tests +d0bee5d cls_refcount: add type tests +a04525b mon: fix sync_start doc +e019dd0 mon: fix off-by-one: no need to reapply previous last_committed after sync +e213b1b mon: fix recent paxos sync from 0 when first_committed == 1 +b8fad05 doc/dev: add corpus.rst +4a3241c osd: reenable pg_query_t test +8579d80 mon: add encoding tests for newish MMonSync, MMonScrub +5139d0c mds: add encoding test for inode_backtrace_t; note incompat in corpus +0800ea1 osd: add encoding tests for PushOp, PullOp, PushReplyOp +17c2995 mon: add encoding tests for MonitorDBStore data types +afb814f ceph-object-corpus: new objects for almost-dumpling +3e4a291 osd/OSDmap: fix OSDMap::Incremental::dump() for new pool names +6379f37 test_rgw_admin_meta.cc: prefer prefix ++operator for non-trivial iterator +329e467 cls/rgw/cls_rgw.cc: use empty() instead of checking for size() == 0 +734c824 test_rgw_admin_log.cc: prefer prefix ++operator for non-trivial iterator +88ba651 test_rgw_admin_opstate.cc: prefer prefix ++operator for non-trivial iterator +028f643 test_rgw_admin_meta.cc: prefer prefix ++operator for non-trivial iterator +cccc09a rgw/rgw_rest_opstate.cc: prefer prefix ++operator for non-trivial iterator +22e0dbb rgw/rgw_rados.cc: use empty() instead of checking for size() > 0 +ea0fcfa cmdparse.cc: catch exception by reference +1f8fe70 ceph-rest-api: Missing packaging (binary in .spec, manpage in both) +3d25f46 ceph-rest-api: make main program be "shell" around WSGI guts +cb0f831 ceph.in: output even a blank status line in compat mode +93b3e63 msg/Message: use old footer for encoded message dump +cf8f16d rgw: handle bucket removal by system user on master region +3b110db ceph_argparse.py: define some self.* in __init__ +60c9ca6 ceph_argparse.py: fix dangerous default value [] as arg +a049e29 ceph_argparse.py: remove unnecessary semicolon +a28d5d6 ceph_argparse.py: fix some ArgumentValid() commands +3c4ae83 ceph_argparse.py: add missing spaces after comma +c2a6334 ceph_argparse.py: add missing spaces around operator +3278295 ceph_argparse.py: fix bad indentation +707c39d ceph.in: add missing spaces around operator +f714c01 ceph.in: add missing spaces after comma +b82473a ceph.in: remove unnecessary semicolons +5a6251c ceph-rest-api: connect to cluster with configured client name +e4d063b ceph-rest-api manpage +07590ae cephtool/test.sh: sync status no longer supported +e66d011 cephtool/test.sh cleanup +6cafb0e ceph-rest-api tests +4cb0e06 Add 'ceph-rest-api' +45dc573 OSDMonitor: return failure for 'osd lost' without safety switch +c87f55b CompatSet, MDSMap: formatted dumps must avoid numeric tags +e75db71 mon: OSDMonitor: formatter output on 'osd map' +17595f3 mon: OSDMonitor: osd pool get: move to preproc, add formatted output +a15d932 mon: formatted output for 'fsid' +04fbc52 mon: Monitor: 'health detail --format=json' should only output JSON +300f42b mon: Monitor: support multiple formatters on some status functions +c6d1dba test/encoding/import-genearted: fix +3cf8ae0 mds: make rename_rollback::drec not assert on unexpected d_type +846382b mds: fix rename_rollback::drec cctor +db68975 cls/rgw: init op in rgw_cls_obj_complete_op ctor +db71a38 mon: add formatted output for several commands: +f8ee4a7 auth: cephx: KeyServer: list secrets to formatter or plaintext +e76b05b mon: AuthMonitor: improve error reporting for import +b18554a mon: AuthMonitor: formatted output to 'auth get-or-create[-key]' +7da0320 mon: AuthMonitor: dump formatted and plaintext key on 'get-key' +7049efc mon: AuthMonitor: early out on bad entity name +83bcde3 mon,auth: AuthMonitor, KeyRing: add Formatter-dumps of auth info +92d5eb0 auth: Crypto: add encode_formatted/plaintext() functions +2e2bc6d ceph_argparse.py cleanup: simplify some code, error on unused args +a562162 ceph CLI: valid() no longer returns bool, but just exception +0f2ebc6 ceph.in, ceph_argparse.py: move descsort() to ceph_argparse +bfa2284 MonCommands: add new fields: modulename, perms, availability +c9b54d7 common: Formatter: add flush to bufferlist +989be66 rados.py: allow long-form names of 'warn' and 'err' as watch levels +1ad2127 PGMonitor: fix stat comparison in prepare_pg_stats +180c7b4 Get device-by-path by looking for it instead of assuming 3rd entry. +836e35f Get device-by-path by looking for it instead of assuming 3rd entry. +a120d81 Makefile.am: fix ceph_sbindir +dcb42ca test_rados: don't use assert_greater +d8fe439 Python Ioctx.get_xattrs does not take xattr_name +bc291d3 osd: fix warning +653e04a osd: limit number of inc osdmaps send to peers, clients +5c8a563 mon: do not populate MMonCommand paxos version field +b36338b messages/MPGStats: do not set paxos version to osdmap epoch +997c6f4 rgw-admin: add some of the newer flags and specify their use +2ea6c4c rgw-admin: use 'get' instead of 'show' or info for geo stuff +d36ec78 qa/workunits/cls/test_cls_rgw: add new rgw class tests +2e79f73 ceph.spec.in: add missing %{_libdir}/rados-classes/libcls_* files +ff5f25e debian/ceph-test.install: add missing files +640d138 ceph.spec.in: add some more ceph_test_cls_rgw_* files +dfe3c21 src/Makefile.am: rename cls_test_rgw_* +78bae33 ceph.spec.in: add some ceph_test_cls_* files +dc99a23 Makefile.am: fix build, use $(CRYPTO_LIBS) +00ae543 mon: do not scrub if scrub is in progress +8638fb6 unittest_pglog: fix unittest +c487014 librados/misc.cc: reverse offset and length on write call +bad317b osd: Add namespace to dump_watchers output +f03cdf5 osd: Clean-up redundant use of object_locator_t +8c50165 osd: Add the ability to set capabilities on namespaces +7129564 osd: Prepare for nspace match with simpler is_match_all() +6eb88a1 test: Add namespace list test cases to librados test +fddfdeb test: Add namespace test cases to librados tests +94ccfac rados: Add namespace arg (--namespace, -N) to rados command +69af60d librados: Add operate()/operate_read() log messages +e761e4e librados, os, osd, osdc, test: Add support for client specified namespaces +8e07514 osd: change pg_stat_t::reported from eversion_t to a pair of fields +cc0006d mon: be smarter about calculating last_epoch_clean lower bound +da81228 osd: report pg stats to mon at least every N (=500) epochs +449283f mon/OSDMonitor: allow osdmap trimming to be forced via a config option +18a624f mon/OSDMonitor: make 'osd crush rm ...' slightly more idempotent +c5157dd doc/release-notes: v0.66 +8799872 mon/PaxosService: update docs a bit +44db2ac mon/PaxosService: inline trim() +cab8eee mon/PaxosService: move paxos_service_trim_max into caller, clean up +d97f314 mon/PaxosService: simplify paxos_service_trim_min check +da248a9 mon: make service trim_to stateless +886b637 mon/PaxosService: pass trim target into encode_trim() +8b866d2 mon: preserve last_committed_floor across sync +1f5e6c2 mon: no need to reset sync state on restart +bbfb5b4 mon: drop single-use is_sync_on_going() check +a4d0ccf mon: rev the internal mon protocol +9fc4e4f mon/MonitorDBStore: drop unused single prefix synchronizer +45907dc mon: add --force-sync startup option +af3b49f mon/Paxos: move consistent check into Paxos::init() +ccceeee mon/Paxos: remove unnecessary trim enable/disable +aa33bc8 mon/Paxos: config min paxos txns to keep separately +da0aff2 mon: implement a simpler sync +f326c4d mon/PGMonitor: cleanup: use const strings for pgmap prefixes +5faa4ac rgw: warn on the lack of curl_multi_wait() +76e7926 rgw: fix args parsing +3c89a19 os: Add missing pool to hobject_t:::dump() and hobject_t::decode() +b1b188a os: Remove unused hobject_t::set_filestore_key() +72c27a3 librados, osdc: Refactor IoCtxImpl to use operate()/operate_read() +9dd60a6 TestRados: Output error for improper usage instead of Floating Point Exception +30c951c osd: Fix object_locator_t::get_pool() return type +7efbf5d librados: Fix lock names +3931bfa psim.cc: Fix comment on how to create .ceph_osdmap +313b7a1 os: Code conformance in LFNIndex.cc +395262c rgw: call appropriate curl calls for waiting on sockets +73c2a3d configure.ac: detect whether libcurl supports curl_multi_wait() +d08b6d6 mon/PaxosService: prevent reads until initial service commit is done +63fe863 mon/PaxosService: unwind should_trim() +d600dc9 mon/PaxosService: unwind service_should_trim() helper +6aa0230 mon/MDSMonitor: remove unnecessary service_should_trim() +b71a009 mon/OSDMonitor: remove dup service_should_trim() implementation +39b71c5 mon/PaxosService: trim periodically instead of via propose_pending +2f8ff2d mon/PaxosService: reorder definitions +50ffe32 mon/PaxosService: uninline should_trim() +5edc1ff doc: Added Ceph Object Storage installation instructions for CentOS/RHEL 6. +ca54efd mon: sync all service prefixes, including pgmap_* +b536935 mon/MonitorDBStore: expose get_chunk_tx() +43fa7aa mon/OSDMonitor: fix base case for loading full osdmap +ad65de4 ReplicatedPG: send compound messages to enlightened peers +ae1b2e9 ReplicatedPG: add handlers for MOSDPG(Push|Pull|PushReply) +c0bd831 OSD: add handlers for MOSDPG(Push|PushReply|Pull) +264dbf3 messages/,osd_types: add messages for Push, PushReply, Pull +c56f16d ReplicatedPG: split handle_pull out of sub_op_pull +175c077 ReplicatedPG: split handle_push_reply out of sub_op_push_reply +54e5f64 ReplicatedPG: send pulls en masse in recover_primary +c41d4dc ReplicatedPG: send pushes en mass in recover_replicas, recover_backfill +eec86b8 OSD: convert handle_push to use PushOp +a498432 ReplicatedPG: pass a PushOp into handle_pull_response +82cb922 ReplicatedPG: split send_push into build_push_op and send_push_op +31e19a6 ReplicatedPG: _committed_pushed_object don't pass op +0f51b60 ReplicatedPG: submit_push_data must take recovery_info as non-const +b6b48db (tag: v0.66) v0.66 +a990664 mon: implement simple 'scrub' command +afd6c7d mon: fix osdmap stash, trim to retain complete history of full maps +dd1e6d4 Revert "Makefile: fix ceph_sbindir" +f07d216 rgw: fix bucket link +eec903a doc: Fix env variables in vstart.sh documentation +69a5544 osd/osd_types: fix pg_stat_t::dump for last_epoch_clean +94afedf client: remove O_LAZY +e9d19b3 common/crc32c: skip cpu detection incantation on not x86_64 +956fafc qa/workunits/rbd/simple_big.sh: don't ENOSPC every time +d423cf8 qa/workunits/rbd/kernel.sh: move modprobe up +672f51b qa/workunits/fs/test_o_trunc.sh: fix .sh to match new bin location +7b7f752 unit tests for ObjectContext read/write locks +6f1653a rgw: Add --help support to radosgw +85a1d6c mon: remove bad assert about monmap version +3f5a962 qa: write a somewhat <1tb image +54aa797 qa/workunits/rbd/kernel.sh: modprobe rbd +83f3089 qa: move test_o_trunc.sh into fs dir +507a4ec qa: move fs test binary into workunits dir so teuthology can build it +a84e6d1 mds/MDSTable: gracefully suicide on EBLACKLIST +8b4cb8f rgw: Add explicit messages in radosgw init script +d09ce3d rgw: fix rgw_remove_bucket() +972d22e Adding new Wireshark dissector. This is loosely based on the original dissector, it has been re-worked to bring into line with Wireshark coding guidelines that aim to ensure portability. It currently only decodes a handful of messages as test cases, it needs more work to make it useful. See README.txt for a bit more background. +a793e20 doc: Add a page to document vstart.sh script +c14847c .gitignore: cls_test_* +22227cd qa: add O_TRUNC test +46b7fc2 radosgw-admin: fix cli test +a0b1be9 rgw: fix type encoding +71ebfe7 mon/Paxos: make 'paxos trim disabled max versions' much much larger +ab93696 mon: be less chatty about discarding messages +e8b42a6 osd/OSDMap: handle case where some new osds have hb_front and others don't +81343f1 osd: clear hb_front if it was previously non-NULL and is now NULL +e0da832 doc: Added write caps. Required for auto-creating pools. +01d3e09 osd: fix race when queuing recovery ops +d87ae0a osd_types: add PushOp, PushReplyOp PullOp +194e858 osd: do not use temp_coll for single-step pushes +b0e339c ObjectStore: only register non-null contexts +daee9db ObjectStore,Context: add register_on_complete +a825ae7 rgw: remove a few warnings +3564e30 Elector.h: features are 64 bit +4255b5c ceph_features.h: declare all features as ULL +bc3e2f0 Pipe: use uint64_t not unsigned when setting features +dc29c7a rgw: renamed a few unit tests +db63965 ceph.spec.in: Fix file name typo +c2873c1 rgw: make rgw_cls_complete_op backward compatible +08dd35d common: autoselect crc32c based on cpu features +7c59288 Initial Intel SSE4 crc32c implementation. +20e3abc rgw: make rgw_bucket_dir_entry backward compatible +4fb782c mds: fix O_TRUNC locking +cd44a62 Makefile: include rbdmap in dist tarball +352f362 Makefile: fix ceph_sbindir +9941171 rgw: keep max_marker on bucket index +0da7da8 unitests: fix compilation +9942efd mon: dead code removal +5c053b1 rgw: handle new rest operations +fcc423d rgw: RESTful api for shards info +19828cb cls_log: store info in header, new op to retrieve it +b3f6423 rgw: replica log RESTful api uses bucket instance id +e10005c rgw: rework replica log + RESTful api +288088d cls_replica_log: implement decode_json for the types +7db133d ceph_json: add a utime_t decoder +87c98e9 sysvinit, upstart: handle symlinks to dirs in /var/lib/ceph/* +cb97338 ceph-disk: handle /dev/foo/bar devices throughout +e082f12 ceph-disk: make is_held() smarter about full disks +a4805ef osdc/Objecter: resend command map version checks on reconnect +653bc2d common: move parse_time into utime_t header +370d175 rgw: remove get_bound_info from RGWReplicaLogger +b6c8366 key_value_store: fixup errno handling +fc7d622 RESTful implementation to dump regionmap implementation +641bd2f RESTful API implementation for replica_log +da1fb93 mds: man page: Fixed cut & paste error +a4cd631 set object_info_t pool of an ObjectContext if it is undefined or bad +0efcccd Move rbdmap file to /etc/ceph +ffe7045 install rules for init-rbdmap +6ff2b16 rgw-admin: Adds option --shard-id to help.t +3a20b06 rgw: admin: Add --shard-id option to help +49ff63b rgw: add RGWFormatter_Plain allocation to sidestep cranky strlen() +94742d4 doc: Minor fix. +2ad4ff6 rgw: metadata, data logs can be turned on / off +935c278 mon: Paxos: update first_committed on first paxos proposal +847465f librados: fix test warning on 32-bit platforms +6d90dad os/FileStore: automatically enable 'filestore xattr use omap' as needed +1b578a8 librados: add test for large and many xattrs +8694d29 osd/PGLog: populate log_keys_debug from read_old_log() +cfc1f2e rgw: modify RGWBucketInfo::creation_time encoding / decoding +4089001 rgw: Fix return value for swift user not found +c73a24b rgw: end-marker serves as last value, not as upperbound +c414030 rgw: relax marker requirements for log apis +b21a41a rgw: update log APIs to use markers +ce7d816 rgw: cls_log_entry has id field +064e92f Makefile.am: some more makefile rules fixes +c2a56e5 rgw: date string parsing also parses seconds fraction +a6bbc91 Makefile.am: some more makefile rules fixes +26423b9 rgw: date string parsing also parses seconds fraction +0335905 rgw: fix cli test +5314e3f Makefile.am: add missing rule +09e374f osd: set maximum object attr size +e56ef07 rgw: initialize sent_header in RGWOp_Opstate_List +e235958 mds: log before respawning when standby-replay falls behind +e75057f rgw-admin: restructure replicalog commands +87217e1 client: send all request put's through put_request() +9af3b86 client: fix remaining Inode::put() caller, and make method psuedo-private +2e857a4 librados: fix cmd OSDCommand test +72ac281 rgw: don't remove bucket index when removing a bucket +10a2b60 rgw: bilog list by bucket instance (RESTful api) +81bee64 client: use put_inode on MetaRequest inode refs +977df77 ceph_json: reset values +674bbab rgw: user param in access key is not manadatory +9d702e5 rgw: advance ptr when sending data +13f9c18 doc: Created an install page for Calxeda development packages. +9e604ee ceph-disk: s/else if/elif/ +b4ee7ca changes to accomodate review comments on previous version +8f1da8f rgw: fix regionmap json decoding +cd7510f qa/workunits/misc/multiple_rsync: put tee output in /tmp +e1f9fe5 rgw: fix radosgw-admin buckets list +fe66331 Handle non-existent front interface in maps from older MONs +867ead9 qa/workunits/rbd/simple_1tb: add simple rbd read/write test on large image +8a17f33 ceph-disk: do not mount over an osd directly in /var/lib/ceph/osd/$cluster-$id +986185c mon/PGMonitor: avoid duplicating map_pg_create() effort on same maps +ca55c34 cephtool/test.sh: add case for auth add with no caps +bfed2d6 MonCommands.h: auth add doesn't require caps (it can use -i ) +71f3e56 Makefile.am: fix libglobal.la race with ceph_test_cors +e635c47 mon/PGMonitor: use post_paxos_update, not init, to refresh from osdmap +1316869 mon/PaxosService: add post_paxos_update() hook +ea1f316 mon: do not reopen MonitorDBStore during startup +516445b mon/Paxos: simplify trim() +b8d04a2 mon/PaxosService: rename scrub +ac63b2e mon/Paxos: clean up removal of pre-conversion paxos states +d2f3811 mon/Paxos: update first_committed only from paxos +290ccde mon/Paxos: set first_committed on first commit +5511daf doc: public network statement needed on new monitors. +af00f73 rgw: automatic pool creation for placement pools +fe36533 mon/Paxos: never write first_committed except during trim +e93730b mon: enable leveldb cache by default +ad9c294 mon/Paxos: assert that the store gives us back what we just wrote +11e0325 mon/Paxos: drop unnecessary last_committed loads +d31ed95 mon/PaxosService: allow paxos service writes while paxos is updating +2d2aa00 mon/PGMonitor: store PGMap directly in store, bypassing PaxosService stash_full +7a2566c rgw: remove test placement info +224130c rgw (test): remove some warnings +1b162ce rgw: initialize user system flag +7681c58 (origin/wip-rgw-geo-bucketinstance) rgw: log in the same shard for bucket entry point and instance +d4e39a7 rgw: unlink/link don't always update entry point +5680fa1 doc/release-notes: v0.65 +6673b2d rgw: tie metadata put to bucket link/unlink +5c3df08 cls_rgw: cleanup +82db84b rgw: some more internal api cleanups +c4be5a7 rgw: unlink bucket from user on metadata rm bucket:< bucket> +86c73c9 rgw: fixes to object versioning tracking +8bd31d4 rgw: filter read xattrs +422bb6d rgw: add str_startswith() +8db289f cls_ver: rename version xattr, add some more logging +c8f7936 mon/AuthMonitor: start at format 1 (latest) for new clusters +950c0f3 mon/PaxosService: move upgrade_format() machinery into PaxosService +0d73eb4 mon/PGMonitor: drop some dead code +0fd776d mon/PGMap: make int type explicit +29e14ba mon/PaxosService: s/get_version()/get_last_committed()/ +c2d517e (tag: v0.65) v0.65 +3016f46 get_xattr() can return more than 4KB +6e320a1 skip TEST(EXT4StoreTest, _detect_fs) if DISK or MOUNTPOINT are undefined +63e81af rgw: multiple fixes related to metadata, bucket creation +a4ddf70 Add rc script for rbd map/unmap +b28bd78 mon/PaxosService: drop unused last_accepted_name +6060268 mon/PaxosService: some whitespace +7c9dee0 mon/PaxosService: drop unused {get,set,put}_version(prefix, a, bl) +1d913d2 mon/OSDMOnitor: use provided get_version_full() +872f4d5 mon/PaxosService: simplify full helpers, drop single-use helper +83c49be mon/PaxosService: remove mkfs helpers +c47f271 mon: fix mkfs monmap cleanup +78fefe6 mon: make PaxosService::get_value() int return type 64-bit +78b7ec7 mon/PaxosService: drop unused helpers +6721122 mon/MonmapMonitor: avoid exists_version() helper +6429cb1 mon/PaxosService: remove unused exists_version() variant +9ae0ec8 mon/Elector: cancel election timer if we bootstrap +03d3be3 mon: cancel probe timeout on reset +521fdc2 mon/AuthMonitor: ensure initial rotating keys get encoded when create_initial called 2x +3791a1e osd: tolerate racing threads starting recovery ops +31d6062 init-radosgw.sysv: remove -x debug mode +7e41c10 rgw: bucket entry point contains owner, other fix +eb86eeb common/pick_addresses: behave even after internal_safe_to_start_threads +cad8cf5 Add python-argparse to dependencies (for pre-2.7 systems) +046e3b7 debian, rpm: remove python-lockfile dependency +f046dab mds: do not assume segment list is non-empty in standby_trim_segments +ab6ccbe test/librados/cmd.cc: use static_cast instead of C-Style cast +626d9ee opstate RESTful API implementation with unit test application +79b5a48 osdc/Objecter.cc: use static_cast instead of C-Style cast +e7602a1 mon/MonClient.cc: use static_cast instead of C-Style cast +de4a764 common/cmdparse.cc: reduce scope of local variable 'pos' +b485a3e common/cmdparse.cc: remove unused variable +a92a720 osd/OSD.cc: prefer prefix ++operator for non-trivial iterator +835315b OSDMonitor.cc: prefer prefix ++operator for non-trivial iterator +c700db0 mon/MonCap.cc: use empty() instead of if(size()) +4ab5bf6 common/cmdparse.cc: prefer prefix ++operator for non-trivial iterator +1e3161a rgw: add a system request param to select op bucket instance +76228ca rgw: data log contains bucket instance info in key +5dd137a rgw: format bucket.instance meta entries nicely +4e90c5e rgw: use new instance handler for bucket operations +71869c4 rgw: create meta handler for bucket instance +00973df rgw: put_bucket_info() uses objv_tracker in bucket info +dab57ef rgw: keep objv_tracker on bucket info +57dc736 msgr: clear_pipe+queue reset when replacing lossy connections +e053d17 rgw: refactor policy reading +9586305 msgr: reaper: make sure pipe has been cleared (under pipe_lock) +ec612a5 msg/Pipe: goto fail_unlocked on early failures in accept() +afafb87 msgr: clear con->pipe inside pipe_lock on mark_down +5fc1dab msgr: clear_pipe inside pipe_lock on mark_down_all +d74cdad rgw: fix policy read +ad64067 rgw: init member variable +b09d799 rgw: encode bucket info only after setting a flag +cd98eb0 mon/AuthMonitor: make initial auth include rotating keys +9b2dfb7 mon: do not leak no_reply messages +ad12b0d mon: fix leak of MOSDFailure messages +c3260b2 rgw: initial work to separate bucket name and instance +c103031 rgw: initialize system flag in RGWUserInfo +7e3493f rgw: various object put processor fixes +5f43fa8 rgw: fix broken obj put +1aca370 debian: ceph-common requires matching version of python-ceph +d7af5e1 rgw: handle bucket creation with specified placement pool +94eada4 Add header comments and Inktank copyrights to ceph.in/ceph_argparse.py +67a3c1e ceph.in: rip out reusable code to pybind/ceph_argparse.py +2fcbf2b rgw: user configuration for bucket placement +e5e924c rgw: data structures for new data/index placement rules +c4272a1 ceph: even shinier +34ef2f2 ceph: do not busy-loop on ceph -w +27912e5 librados: make cmd test tolerate NXIO for osd commands +abd0ff6 mds: do not assume segment list is non-empty in standby_trim_segments +241ad07 rgw: make replica log object name configurable +469900e RGWReplicaBucketLogger: store bucket replica logs in the .logs pool +3bebbc0 mds: rev protocol +ded2e84 mds: kill Server::handle_client_lookup_hash() +2147c4e mds: use "open-by-ino" helper to handle LOOKUPINO request +24e59b4 rgw: buffer atomic put handler +02de43a rgw: tie opstate into intra-region copy operations +31d221c ceph.in: remove some TAB chars +69e1a91 ceph.in: fix ^C handling in watch (trap exception in while, too) +29f6f27 ceph: --version as well as -v +6d6dc42 fixup "radosgw-admin: new commands to look at and clean up replica logs" +59bfdd0 radosgw-admin: new commands to look at and clean up replica logs +ab79ba4 cls_replica_log: integrate with RGWRados +3651473 cls_replica_log: add tests. +29df88a cls_replica_log: add client with user documentation +e4ef5c6 cls_replica_log: add the actual class +22a02e9 cls_replica_log: add ops for new class +d1c9594 cls_replica_log: add types for new class +0deb6d4 (origin/wip-rgw-geo-enovance) rgw: lock related modifications +3b4c11b rgw: add max-entries, marker for log operations +714f212 osdc: re-calculate truncate_size for strip objects +ebb46c4 qa/workunits/misc/multiple_rsync.sh: wtf +fd769c0 qa/workunits/cephtool/test.sh: fix and cleanup several tests +f420e5c mon: drop deprecated 'stop_cluster' +4977b88 mds: make 'mds compat rm_*compat' idempotent +4a038d6 mon: make 'log ...' command wait for commit before reply +008bdc5 radosgw_admin: fixup cli test +483aa74 test: update cli test +7b5ec74 cls_rgw: skip namespaced entries when listing bucket +5de54f6 a/workunits/cephtool/test.sh: --no-log-to-stderr when examining stderr +d60534b mon: more fix dout use in sync_requester_abort() +8a4ed58 mon: fix raw use of *_dout in sync_requester_abort() +c8af85d doc/release-notes: v0.61.4 +c39b99c FileStore: handle observers in constructor/destructor +0211583 init-radosgw: use radosgw --show-config-value to get config values +88f73c5 ceph: fix ceph-conf call to get admin socket path for 'daemon ...' +716fc35 ceph-conf: make --show-config-value reflect daemon defaults +cf3bc25 FileStore: apply changes after disabling m_filestore_replica_fadvise +ed8b0e6 FileStore: apply changes after disabling m_filestore_replica_fadvise +2a4953b ceph-disk: use unix lock instead of lockfile class +8c0daaf ceph-disk: make list_partition behave with unusual device names +8a5d989 FileStore: get_index prior to taking fdcache_lock in lfn_unlink +09e869a PGLog::rewind_divergent_log must not call mark_dirty_from on end() +4d77443 unit tests for PGLog::proc_replica_log +e11cc1c add constness to PGLog::proc_replica_log +392a8e2 mon/PaxosService: not active during paxos UPDATING_PREVIOUS +ee34a21 mon: simplify states +ec2ea86 mon/Paxos: not readable when LOCKED +7b7ea8e mon/Paxos: cleanup: drop unused PREPARING state bit +f985de2 mon/PaxosService: simplify is_writeable +3aa61a0 mon/PaxosService: simplify readable check +a9e9c58 mon/MonmapMonitor: remove some dead code +7229da8 mon/MonmapMonitor: fix typo in check to remove mkfs info +e565802 mon: fix whitespace +439e799 mon: debug proposal timers +e832e76 mon: simplify Monitor::init_paxos() +e68b1bd mon/Paxos: go active *after* refreshing +dc83430 mon: safely signal bootstrap from MonmapMonitor::update_from_paxos() +a42d758 mon/Paxos: do paxos refresh in finish_proposal; and refactor +2fccb30 mon/PaxosService: cache {first,last}_committed +d941363 mon: no need to refresh from _active +03014a4 mon: remove unnecessary update_from_paxos calls +cc339c0 mon: explicitly refresh_from_paxos() when leveldb state changes +95bd048 os/FileStore: disable fadvise on XFS +fd83bc3 client: fix warning +b2f1a1a mds: fix remote wrlock rejoin +15a5d37 mds: fix race between scatter gather and dirfrag export +ded0a5f Revert "client: fix warning" +96c9493 radosgw-admin: interface to control ops state +8b1524b rgw: OpState internal api +258edfc rgw: fix check_state call +5e6dc4e mon: Monitor: make sure we backup a monmap during sync start +6284fdc mon: Monitor: obtain latest monmap on sync store init +af5a986 mon: Monitor: don't remove 'mon_sync' when clearing the store during abort +d628109f rgw: specialized obj zone copy state for statelog +13e0302 rgw: internal api for statelog objclass +0b932bf cls_statelog: pass in timestamp +2574903 AuthMonitor: auth export's status message to ss, not ds +75b6c82 doc: Fixed OpenStack Keystone instruction. +cba4de1 cls_statelog: improve unitest +b89f47c cls_statelog: fix a few issues +64ee014 ceph.spec: create /var/run on package install +97f1322 doc: Updated deployment preflight. +bb799e6 test_rados.py: add some tests for mon_command +64b4e4a rados.py: wrap target in c_char_p() +54f7432 rados.py: return error strings even if ret != 0 +81e73c7 ceph.in: pass parsed conffile to Rados constructor +2fc8d86 ceph.in: global var dontsplit should be capitalized +38a595b FileStore: optionally compact leveldb on mount +4a3127f client: fix warning +efcf626 FileStore::lfn_open: don't call get_index under fdcache_lock +bfe4bf9 rgw: handle racing default region creation +ce7b5ea common/Preforker: fix warning +8bd936f client: fix warning +6b52acc config.h: ensure U64 option defaults are computed as 64 bits +e2af5fb test: test for cls_statelog +1ecec3a cls_statelog: fixes +8d5fc70 cls_statelog: add client api functions +fbe816a cls_statelog: fixes and changes to api +7669662 cls_statelog: introducing new objclass to handle state tracking +df8a3e5 client: handle reset during initial mds session open +2e27f69 rgw: move a couple of unitests to a different Makefile rule +f5f8314 rgw: object mtime the same for both object and bucket index +7f63baa rgw: fix inter-region copy (ofs wasn't correct) +92997a4 mon: fix 'osd dump ' +8c6b24e ceph-disk: add some notes on wth we are up to +94b3700 rgw: intra-region copy, preserve mtime +29eb333 (origin/wip-log-rewrite-sam) test/osd/TestPGLog: %s/dirty()/is_dirty() +f164a32 PGLog: check for dirty_to != eversion_t() and dirty_from != eversion_t::max() +c6dd60d PGLog: rename dirty() to is_dirty() +2ad319b PGLog: only iterate over dirty portions of the log +962b64a PGLog,PG: use normal log dirtying and writing for append and trim +9b6cb63 PGLog: add debug check on written keys, verify on write +abac4ea test/osd/TestPGLog: fix pglog unittests for dirty_log and ondisklog +6dd95c8 PG,PGLog: remove dirty_log arguments +b16fdf2 PGLog: replace dirty_log with mark_dirty_* +f35bc02 PG: move instances of log dirtying in PG into PGLog +d77c4ff PGLog: track dirty_to and dirty_from for log +fb88873 osd_types: move code for pg_log_entry_t::get_key_name into eversion_t +b73aa30 PGLog: remove OndiskLog +ca1637f PGLog: remove other ondisklog references +a9a41bc PGLog: pass only divergent_priors, not ondisklog +7bc4305 PG: remove ondisklog usages from PG +53e1fda FileStore: add rmkeyrange +3924531 PGLog: clear missing on backfill reset +4c89a2b rgw: system user get obj returns JSON encoded metadata +47ce702 *: always include rados.h using types.h +d46e6c3 OSD: we need to check pg ?.0 for resurrection +5bf08cd libcephfs: add a couple multiclient tests +ee40c21 client: fix sync read zeroing at EOF +e538829 ceph-disk: clear TERM to avoid libreadline hijinx +d7f7d61 ceph-disk-udev: set up by-partuuid, -typeuuid symlinks on ancient udev +c907437 ceph-disk: do not stop activate-all on first failure +253069e ceph.spec: include partuuid rules in package +00656da rgw: add 'delete' to signed subresources list +7c72933 test: update cli test +b8d2ba1 rgw: set default region as master +d582ee2 rgw: escape prefix correctly when listing objects +b7143c2 client: fix ancient typo in caps revocation path +cc9b83a ceph.spec: install/uninstall init script +1368097 sysvinit, upstart: ceph-disk activate-all on start +5c7a236 ceph-disk: add 'activate-all' +d512dc9 udev: /dev/disk/by-parttypeuuid/$type-$uuid +7f5d6e5 mds: don't journal bare dirfrag +1d86f77 mds: fix cross-authorty rename race +aa3e512 mds: try purging stray inode after storing backtrace +f11ec5c mds: handle undefined dirfrags when opening inode +29e6597 mds: fix frozen check in Server::try_open_auth_dirfrag() +18b9e63 mds: don't update migrate_seq when importing non-auth cap +f179dc1 mon: make mark_me_down asserts match check +2fe4d29 ceph: remove space when prefix is blank +8d9eef2 ceph: fix return code for multi-target commands +84d1847 ceph: error out properly when failing to get commands +8d9272e test/admin_socket/objecter_requests: fix test +efebdba ceph: do not print status to output file when talking to old mons +80c2d5a osd/ReplicatedPG: length 0 writes are allowed +1113ff0 rgw: get / set user & bucket meta mtime +7e7ff75 common/Preforker: fix broken recursion on exit(3) +f25f212 osd/OSDMap: fix is_blacklisted() +21e85f9 qa/workunits/misc/multiple_rsync.sh: wtf +a2cf14f rgw: preserve bucket creation time across different zones / regions +8eae1b8 rgw: show mtime for metadata entries +8fa4394 rgw: fixes for intra-zone object copy +5df39aa rgw: set bucket marker and bucket obj version from master +622f500 rgw: multiple changes for intra-zone object copy +17d6571 rgw: when setting bucket metadata key, don't override placement +d5679d0 rgw: forward amz headers of copy request to remote rgw +5ff2059 rgw: cleanup, move init_meta_info() into req_info +9253cd8 ceph: pass --format=foo to old monitors +c35c98d ceph: add newline when using old monitors +0d3517b doc: Added index tags. +fb07f9d doc: Added index tags. +fd423fc doc: Added index tags. +8a5b276 doc: Added index tag. +d5dbc2f doc: Updated usage and index tags. +ceba953 doc: Updated usage and index tags. +81d4f9d doc: Added introductory section. Updated usage. Index tags. +0b604fb doc: Index tags. +f851c5d doc: Update for usage and index tags. +4a79fab doc: Update for usage. Index tags. +20e68b7 doc: Updated for glossary usage. Index tags. +44bf35a doc: Updated index tags. +a529882 doc: Updated index tags. +bb5fae4 ceph.in: zero-arg invocation was broken (check array length) +8f8fd7a doc: Updated index tags. +2be1670 doc: Minor updates. +b3a143d doc: Minor updates for usage. +10c0ae9 rgw: remove unused variable +3474fa8 rules: Don't disable tcmalloc on ARM (and other non-intel) +37cc85e rgw: bucket marker contains zone name +bcfd2f3 udev: drop useless --mount argument to ceph-disk +b139152 ceph-disk-udev: activate-journal +e5ffe0d ceph-disk: do not use mount --move (or --bind) +f3234c1 ceph.spec: include by-partuuid udev workaround rules +1aa7f59 ceph.spec: add missing ceph_test_rados_api_cmd to package +b1293ee ceph: flush stderr, stdout for sane output; add prefix +82ff72f ceph-disk: work around buggy rhel/centos parted +92b8300 mon: OSDMonitor: don't ignore apply_incremental()'s return on UfP [1] +7e08ed1 upstart: start ceph-all on runlevel [2345] +7503db9 ceph: fix mon.* +a2b2f39 librados: add tests for too-large objects +4a1eb3c osd: fix types for size checks +2be3c8d remove RELEASE_CHECKLIST +f1b6bd7 osd: EINVAL from truncate causes osd to crash +bcfbd0a ceph_test_rados: add --pool arg +7ec64db rgw: pass original object attrs through extra request data +02599c4 ceph-fuse: fix uninitialized variable +a2a78e8 ceph-disk: implement 'activate-journal' +8b3b59e ceph-disk: call partprobe outside of the prepare lock; drop udevadm settle +10ba60c ceph-disk: add 'zap' command +06f0b72 ceph.in: allow args with -h to limit help to cmds that match partially +6ebfd3c ceph.in: better global description of tool +821b203 ceph.in: less verbosity on error +99bd5c8 librados: add missing #include +93505bb librados: wait for osdmap for commands that need it +f6a864d rules: Don't disable tcmalloc on ARM (and other non-intel) +5fb0444 Update adminops.rst add capabilities +2bda9db osdc/Objecter: dump command ops +6e73d99 osdc/Objecter: ping osds for which we have pending commands +e4f9dce ceph.in: refuse 'ceph tell' commands; suggest 'ceph tell ' +a6876ad ceph.in: argparsing cleanup: suppress --completion, add help +68a9199 osdc/Objecter: kick command ops on osd con resets +db7d121 osdc/Objecter: add perfcounters for commands +9a7ed0b mon: fix idempotency of 'osd crush add' +7e1cf87 librados: do not wait for osdmap on start +51dae8a doc: Updated with glossary terms. +35ea163 mon/MonmapMonitor: remove unused label +987f175 mon/MonCap: bootstrap-* need to subscribe to osdmap, monmap +0193f88 mon/MonClient: mark_down during get_monmap_privately() shutdown +962d118 mon/MonClient: mark_down connection on shutdown +597e439 msgr: queue reset when marking down pipes on shutdown +ea6880f msg/DispatchQueue: do not discard queued events on stop +de64bc5 msgr: queue reset exactly once on any connection +26e16c0 msg/Pipe: include con reef in debug prestring +eea73ab msg/Pipe: reset replaced pipes +e96c0ce msgr: use ConnectionRef throughout +77db175 mon/MonClient: tear down version requests on shutdown +2818a44 mon/PaxosService: discard messages during shutdown +c112fc8 mon: add is_shutdown() state helper/accessor +652c599 mon: shut down Paxos on shutdown +6630462 osd: break con <-> session cycle on reset +99172c3 osd: do not leak HeartbeatSession on shutdown +449bcd6 osd: close classes on shutdown +b56c965 osd: do not leak MOSDPings on shutdown +d172c33 osd/ReplicatedPG: don't leak Session refs in do_osd_op_effects() +cd1c289 messages/MMonSync: initialize crc in ctor +991d07a vstart.sh: put exports at top +a3fe2dc PendingReleaseNotes: notes on CLI changes +314d9c3 PendingReleaseNotes: cli changes, and ceph tell ... +cb57c41 doc/release-notes: add missed notes for 0.63 and 0.64 +6160e50 mon: remove support for 'mon tell ...' and 'osd tell ...' +8adf88a ceph: add support for 'tell mon.X ...' +420e02e librados: new rados_mon_command_target to talk to a specific monitor +cdd11ea rgw: a few fixes to copy object across region +169c5de add apt-get update to installation instructions +165926b rgw: move most of object put processors implementation +0b491e9 rgw: separate req_state from object put processors +bcdd475 rgw: organize get_obj handling for copy a bit different +5fa45f4 Update README dependency lists +f86b4e7 ceph-disk: extra dash in error message +ff280b6 Clean up CrushWrapper methods that take string: no c_str() necessary +c618cf9 OSDMonitor: osd id when id already exists needs to come to stdout too +a376701 ceph, mon/OSDMonitor: fix up osd crush commands for or +e9689ac config: fix run_dir typo +d1b83ff mon/MonClient: send commands to a specific monitor +d0e6575 ceph: implement 'ceph tell osd.* ...' +6a6025f rgw: generate read request if source rgw is remote +3e707da vstart.sh: set run_dir to out +b0b5b1b rbd image_read.sh: wait for rbd sysfs files to appear +8808ca5 osdc/Objecter: fix handling for osd_command dne/down cases +1154b2a init-ceph: look to ceph.conf instead of hard-coding /var/run/ceph +6542991 global: create /var/run/ceph on daemon startup +11d5c7a ceph: only use readline when in interactive mode +862148d mon: fix read of format_version out of leveldb +1c77be0 doc/release-notes: v0.63 and v0.64 notes +b3b0f03 ceph: filter out empty lines from osdids() +edba986 ceph: accept osd.* as a valid name +e5184ea ceph: make life easier on developers by handling in-tree runs +701943a qa/workunits/cephtool/test.sh: look for 'ceph log' via -w, not in log file +b70f565 ceph: flush stdout on watch print +299f6a6 Usage log and ops log are disabled by defaults since 0.56 +de17238 mon: fix 'pg dump_stuck' stuckops type +afa16b4 qa: multiple_rsync.sh: more output +42e06c1 (tag: v0.64) v0.64 +68b5fa9 ceph-fuse: older libfuses don't support FUSE_IOCTL_COMPAT +1577e20 ceph-create-keys: Make sure directories for admin and bootstrap keys exist +95434d1 rgw: propagate mtime from remote rgw on copy +256afa0 store_test: create_collection prior to split +1a9415a mon: adjust trim defaults +5f0007e doc: Reworked the landing page. +dc6cadc doc: Added a hostname resolution section for local host execution. +f6c51b4 doc: Added some tips and re-organized to simplify the process. +9b012e2 client: set issue_seq (not seq) in cap release +c7fb7a3 doc: Added some Java S3 API troubleshooting entries. +6c557d5 doc: Added install ceph-common instruction. +5543f19 doc: Added install ceph-common instruction. +3f3ad61 doc: Fixed :term" syntax. +00743d5 rgw: propagate error from remote gateway when copying object +0948624 ceph-create-keys: Remove unused caps parameter on bootstrap_key() +3f2017f osd: fix con -> session ref change after hb reset +ea3efca rgw: pass grant headers to target when writeing object +da5e443 rgw: head acls target can be quoted +a378c4d common/admin_socket: fix leak of new m_getdescs_hook +6bab425 common/cmdparse: no need to use (and leak to) the heap +5c945cd CrushWrapper: dump tunables along with crush map +0e0e896 ceph: --keyring must be passed to parse_argv, which means not argparse +8190b43 OSD: create collection in handle_pg_create before _create_lock_pg +af92b9a Objecter: fail osd_command if OSD is down +a741aa0 mon: send "osd create" output to stdout; tests rely on it +db0c250 rgw: send meta headers with remote PUT request +566315c rgw: don't busy wait for outgoing rest requests +cbf860f rgw: don't send redirect if copy object has a local source +be1d84d rgw: link bucket to owner on metadata update +bf6b80c6 rgw: fix logic related to operations on different region +2237086 rgw: minor logging change +6f6e425 rgw: fix json decoding for swift keys +4849c8c rgw: stream obj into http request +284f6a2 rgw: format put request auth +72cb5fd rgw: bucket metadata, ignore ENOENT on put +31676c5 rgw: skeleton for obj copy across regions +f6c7c0c rgw: metadata lock/unlock implemented with test cases +d1afc81 RESTful APIs for data changes log implemented with test cases +8f141c4 unit tests for PGLog::rewind_divergent_log +04e89a4 unit tests for PGLog::merge_log +6ce2354 messages/MMonProbe: fix uninit vars (again) +10bfa83 osdc/Objecter: clear osd session command ops xlist on close +81a786e librados: fix pg command test +00eaf97 librados.h: Fix up some doxygen problems +e8300d0 mds: fix filelock eval_gather +2b4157a .gitignore: add 'ceph', now a generated file +359f456 ceph: old daemons output to outs and outbuf, combine +b3f38f3 ceph: handle old OSDs as command destinations, fix status part of -w +11e1afd ceph: add -v for version. Makefile processes ceph_ver.h +fde536f osd: make scrub chunk size tunable +637e0ea rados: --num-objects will now cause bench to stop after that many objects +0bc731e test_filestore_idempotent: use obj name from source coll add +ad3934e rgw: handle deep uri resources +8d55b87 rgw: fix get_resource_mgr() to correctly identify resource +9a0a9c2 rgw: add 'cors' to the list of sub-resources +0b036ec osd: do not include logbl in scrub map +dea8c2d doc: Updated for glossary terms and added indexing. +8e24328 doc: Added indexing and did a bit of cleanup. +a08d620 mds: do not double-queue file recovery in eval_gather +faa1ae7 MDSMonitor: dead debugging code +7785fc5 rados.py: make exception with errno string instead of int +24a5212 ceph, librados, rados.py, librados tests: pass cmd as array +37a6102 ceph: -v should mean version, not --verbose +4446681 ceph: error and verbose message improvement +b114e11 ceph: refactor -s -> status to common code, pass childargs to old mons +2431bfb librados: rados_X_command need to assemble a vector from char *cmd +783b7ec librados, ceph, rados.py: -EINVAL for create with null/invalid name +3f7cac3 ceph: improve error reporting on failure to connect to cluster +ead8d89 ceph: fix up old-monitor handling +b1588bd ceph: catch/handle exceptions in admin socket commands +3720b64 ceph: collect/use clustername, and set defaults like other utilities +366de90 librados, rados.py: rados_create2: add clustername and future flags +8108c95 AuthMonitor: fix signed/unsigned comparison warning +f43c974 mon: upgrade auth database on leader +afebad4 auth: CephxKeyServer: add secrets_{begin,end}() getters +f2177a4 mon: AuthMonitor: remove dead code to avoid confusion +115bb93 ceph: Remove connect/command timeouts; too risky for now Keep 10s timeout when connecting for help descriptions, however +5c30844 doc: Updated with glossary terms. +8e13b38 doc: Updated with glossary terms. +7116de3 doc: Correction and index tags. +ae5aeb1 doc: Updates for glossary terms. +b394edc doc/release-notes: v0.61.3 +3d6eaf5 doc: Added upstart syntax. +2d9a46c doc: Added link to Upstart syntax. +963a9c4 init-radosgw*: add all sections to usage output +4ea24ae init-radosgw*: add status +39fff6a fix init-radosgw* to use the same indentation +a4dbfa3 test: Add blacklisting to test_stress_watch +4eb576e Add test_blacklist_self() librados function for test cases +0cbc0a0 osd: Add dump_watchers to osd admin socket to examine all watchers +4b80c5b rados: Output client address in rados listwatchers request +3b0a44d osd: Add dump_blacklist to admin socket +ab0da28 osd: Drop watchers from blacklisted clients +0bd60f8 osd: Add entity_addr_t to watch_info_t and Watch +92d085f mon: fix preforker exit behavior behavior +5deece1 PG: don't dirty log unconditionally in activate() +951fc2f OSD: resurrect a parent if it splits into the pg we want to create +02946e5 qa: stop running xfstests 192 in qemu +30733af Makefile.am: add -ldl to unittest_pglog +5a53da3 ceph-test: add ceph_test_rados_api_lock to packaging and qa +68ccf8e Add RADOS API lock tests +d841566 Add RADOS lock mechanism to the librados C/C++ API. +d970311 doc: Added key and ceph repository to ceph-deploy install. +7acf3de cls,msg: Fix use of set_in4_quad() to set a entity_addr_t +89524eb osd: Fix usage of commands supported by TestOpsSocketHook::test_ops() +c76838f osd: Style corrections +a99435d mon: fix leak of loopback Connection +08bb8d5 messages/MMonHealth: remove unused flag field +4974b29 messages/MMonProbe: fix uninitialized variables +8c23d8c dev/rbd-diff: make formats into bullet lists (solves linebreak probs) +09a796d doc: Removed ceph-deploy git, and added ceph-deploy packages. +d1e2e7b doc: Modified pre-flight checklist for ceph-deploy packages. +72a6767 doc: Added title. Suppresses no title warning messages. +891641e messages/MMonProbe: remove unused fields +6dd7d46 rados.py: correct some C types +6f8b53a ceph: cleanup: accept --conf *and* -c; suppress stderr if no outs +24a270a librados, rados.py: add rados_create2/init2 +85576db Revert "mds: initialize rejoins_pending" +0c4ca2a mds: allow purging "dirty parent" stray inode +d7fb9b1 mds: initialize some member variables of MDCache +d605eaf OSD: add pgid and res_map to DeletingState +15a5e09 OSD: make get_or_create_pg handle_pg_peering_evt +9655946 OSD: remove created argument from get_or_create_pg() +64b3e83 Revert "mds: allow purging "dirty parent" stray inode" +05a57bd mds: initialize rejoins_pending +c216914 Revert "mds: initialize some member variables of MDCache" +ce67c58 os/LevelDBStore: only remove logger if non-null +cdf5785 test_filestore_idempotent: make newly created objects globally unique +713719a test_librbd: use correct type for varargs snap test +b70868e unit tests for PGLog::merge_old_entry +21a1c4d mon: fix POOL_OP_AUID_CHANGE +18f2f19 test/librados: remove "set_auid" pool tests +51a887a Add ceph_test_rados_api_cmd to the ceph-test package +fbfdd51 ceph: backward-compatibility hack: blank line before JSON output +f6f4f8f librados cmd tests: mon_status comes to stdout, not stderr +6cec9cc librados: fix unsigned vs. signed warning +5bd93b3 ceph: refactor help so it can be called after cluster connection +d4bfce7 mon: better debugging of caps messages/values +0bec7e1 mon/MonCap: fix setting of text in parse() +5e90e6c mon/MonCap: set text in set_allow_all() +8c67480 ceph: various cleanups - make base class valid() do useful work - remove valid from CephPoolname; pool need not exist for create - add --user as alias for --id - remove vestige of special --keyring handing - be sure childargs is an empty list rather than None - remove -- from childargs if present (to stop interpreting -- args) - handle connection timeout cleanly +a4b824c PGMonitor: fix pg dump and dump_stuck +be1a512 cmdparse, mon: add cmd_vartype_stringify for _allowed_command +f1021c9 cmdparse: add handle_bad_get(), ceph:: qualifiers, cmdmap_t +b8f1cb9 mds: allow purging "dirty parent" stray inode +2d655bd mds: initialize some member variables of MDCache +17029b2 test_librbd: use correct type for varargs snap test +456f96f ceph: remove global declarations, declare verbose and cluster near top +df34cff ceph: use conf_parse_argv to deal with nonspecial Ceph args +065b29c librados, rados.py: add conf_parse_argv_remainder() +73a1b21 ceph: make ceph -w output 'ceph status' first +dc73581 mon: include cluster fsid/uuid in status output +74f5ea4 mon/MonCap: allow osd, mds to write to cluster log +9809371 ceph: move admin-daemon command before connect() +8dd3618 ceph: finish changing bestsigs to bestcmds +b0469a1 cephtool/test.sh: fix "expect failure" +22660bd MDSMonitor, cmdparse: increase resiliency of bad cmd_getval() +1cb7dbd messages/MClientCapRelease: fix string output +27f82ce ceph: Add missing usage "ceph osd blacklist ls" +367e203 fusetrace_ll.cc: handle return value of fuse_session_loop() +541320c mds/MDCache.cc: reduce scope of 'CDir *dir' in _create_system_file_finish() +84dedf5 mount/mount.ceph.c: reduce scope of 'value' +1b70fcd mds/Migrator.cc: reduce scope of 'in' in handle_export_prep() +8afbc28 kv_flat_btree_async.cc: fix assigned but unused value issue +575652a key_value_store/kv_flat_btree_async.cc: fix some reassign before use value issues +f7071b2 osd/PG.cc: prefer prefix ++operator for iterator +7aa9b92 mds/MDCache.cc: prefer prefix ++operator for iterator +4fa5f99a ceph-fuse: create finisher threads after fork() +1e99be1 vstart.sh: make client logs unique +eb6d5fc os/LevelDBStore: fix merge loop +6cdc4f8 merge_old_entry arguments info and oe are changed to const because there is no side effect. +d7e2ab1 mon: fix uninitialized fields in MMonHealth +f1ccb2d mon: start lease timer from peon_init() +fb3cd0c mon: discard messages from disconnected clients +6b8e74f mon/Paxos: adjust trimming defaults up; rename options +a03ccf1 OSD: *inodes_hard_limit must be less than the fd limit +e12a9c4 OSD: tell them they died if they don't exist as well +cec8379 osd: fix msg leak on shutdown in ms_dispatch +9865bb4 osd: reset heartbeat peers during shutdown +923683f mon/MonClient: fix leak of MMonGetVersionReply +222059e osd: fix leak of MOSDMarkMeDown +08631e7 rgw: some user metadata fixes +851619a upstart: handle upper case in cluster name and id +dfad09b rgw_admin: modify mdlog functionality +2b9ab9f rgw: set truncated as false if ENOENT when listing mdlog entries +54d2305 doc: Added Java example for setting protocol to HTTP. +145c480 doc: Text of diagram for osd_throttles. +8d70c09 doc: Omitted text diagram, and used literal include to text file. +e6ad9da PGLog: only add entry to caller_ops in add() if reqid_is_indexed() +ddb3a8d unit tests for pg_missing_t +db85c52 PG: don't write out pg map epoch every handle_activate_map +5aa0b12 .gitignore: add directory from coverity tools +cfdd87c mds/Server.cc: fix dereference after null check +e555558 mds/Server.cc: fix dereference after null check +d9b00c4 mds/Server.cc: fix dereference after null check +0b78e2b mds/Migrator.cc: fix dereference after null check +578e292 mds/Migrator.cc: fix dereference after null check +c0e3d04 mds/MDCache.cc: fix dereference null return value +91f6b0f mds/MDCache.cc: fix dereference null return value +38ee69c mds/MDCache.cc: fix dereference after null check +5d8440e mds/MDCache.cc: fix dereference after null check +59cffba mds/Locker.cc: fix dereference after null check +3969c69 mds/Locker.cc: fix dereference after null check +bb8798e mds/Locker.cc: fix dereference after null check +db2fbb1 bench/dumb_backend.cc: check return value of lseek() +a7a0425 bench/dumb_backend.cc: check return value of posix_fadvise() +679775a small_io_bench_fs.cc: check return value of FileStore::mkfs/mount() +2a02409 mds/Locker.cc: fix explicit null dereferenced +39a53e5 mds/Server.cc: fix explicit null dereferenced +c5fc52a rgw: only append prefetched data if reading from head +b1312f9 rgw: don't copy object idtag when copying object +8f3f053 rgw: Do not assum rest connection to be established +df2d06d mon: destroy MonitorDBStore before g_ceph_context +f4eddd7 doc: Updated to reflect glossary usage. +474bb16 doc: Updated title and syntax to reflect glossary usage. +7365d0c doc: Updated to reflect glossary usage. +eb35d73 doc: Updated title to reflect glossary usage. +65294bf doc: Updated conf with ServerAlias for S3 subdomains. +442f082 doc: Updated object storage quick start for S3-style subdomains. +5e450ba doc: Updated text with new glossary terms. +c4001b1 doc: Removed FAQ from the index. +d52b805 doc: Removed FAQ doc. It's now in the wiki. +cf9aa7a debian: guard upstart {start,stop} with -x check +6bac8ac rbd/kernel.sh: quit looking for snapshot sysfs entries +1d75b49 debian: add radosgw.postinst +d126a20 debian: invoke-rc.d does not work with upstart jobs +446e077 fix test users of LevelDBStore +ec7731f move log, ondisklog, missing from PG to PGLog +d1b3eeb os/WBThrottle: remove asserts in clear() +7802292 os/LevelDBStore: add perfcounters +a47ca58 mon: make compaction bounds overlap +f628dd0 os/LevelDBStore: merge adjacent ranges in compactionqueue +e9c32b9 doc: note openstack changes for Grizzly +352b7b5 doc: start Hadoop installation docs +743c528 doc: Hadoop clarifications +5fa098f Added -r option to usage +c888d1d mon: fix leak of health_monitor and config_key_service +3c57061 mon: return instead of exit(3) via preforker +626de38 mon: Monitor: backup monmap using all ceph features instead of quorum's +59916b8 debian: stop radosgw daemons on package removal +9e658f0 debian: stop sysvinit ceph-mds daemons +70a3832 debian: only stop daemons on removea; not upgrade +f402568 rbd/concurrent.sh: probe rbd module at start +0c05955 osd: wait for healthy pings from peers in waiting-for-healthy state +04aa2b5 osd: distinguish between definitely healthy and definitely not unhealthy +28ea184 osd: remove down hb peers +a4d3b47 osd: only add pg peers if active +b586f4a osd: factor out _remove_heartbeat_peer +e1dc3fd osd: augment osd heartbeat peers with neighbors and randoms, to up some min +d20e30a flushed the formatter after closing the primary section in MDLOG, BILOG and GETSHARDINFO :: list() +50ac891 osd: initialize new_state field when we use it +a55e03c WBThrottle: add some comments and some asserts +4b31c7e WBThrottle: rename replica nocache +45873b5 rgw: verify bucket location only if exists +80942eb osd: move health checks into a single helper +c093e5b osd: avoid duplicate mon requests for a new osdmap +aac828c osd: tell peers that ping us if they are dead +ea2b232 osd: simplify is_healthy() check during boot +81a9608 rgw: forward delete_bucket to master region +482733e mds: stay in SCAN state in file_eval +0071b8e mds: stay in SCAN state in file_eval +f71e1b1 Makefile: include new message header files +29e4e7e osd: do not assume head obc object exists when getting snapdir +6da4b20 mon: compact trimmed range, not entire prefix +ab09f1e mon/MonitorDBStore: allow compaction of ranges +e20c9a3 os/LevelDBStore: allow compaction of key ranges +f03a6f2 Fixed default region creation issue +3e5cead rgw: user master region's version of bucket +e634d9d Use new fuse package instead of fuse-utils +1bb4e74 mon: disable tdump by default +4af917d os/LevelDBStore: do compact_prefix() work asynchronously +dd35c26 osd: fix note_down_osd +45b84f3 osd: fix hb con failure handler +054e96c (tag: v0.63) v0.63 +64d1178 rgw: mdlog, bilog RESTful api cleanup +fabe723 ceph: first cut at --completion +2dcc266 ceph, MonCommands.h: code format/help format tweaks +5bca9c3 HashIndex: sync top directory during start_split,merge,col_split +1c35556 doc/dev/osd_internals: add wbthrottle.rst +4d53e9c WBThrottle: add perfcounters +b528a91 osd/OSDMap: fix Incremental dump +478b576 kv_flat_btree_async.cc: fix AioCompletion resource leak +e6efc39 kv_flat_btree_async.cc: fix AioCompletion resource leak +6939b12 kv_flat_btree_async.cc: fix AioCompletion resource leak +554b41b Remove mon socket in post-stop +7e0e096 mds: use "open-by-ino" function to open remote link +3120d96 mds: open missing cap inodes +ceaf51f mds: bump the protocol version +eeb68eb mds: open inode by ino +617f70d mds: move fetch_backtrace() to class MDCache +05a7588 mds: remove old backtrace handling +39b5e76 mds: update backtraces when unlinking inodes +b88c49b mds: bring back old style backtrace handling +c9d2e25 mds: rename last_renamed_version to backtrace_version +6c72111 mds: journal backtrace update in EMetaBlob::fullbit +03c0fe9 mds: reorder EMetaBlob::add_primary_dentry's parameters +26effc0 mds: warn on unconnected snap realms +f3a9f47 mds: slient MDCache::trim_non_auth() +9424298 mds: fix check for base inode discovery +c9707f6 mds: Fix replica's allowed caps for filelock in SYNC_LOCK state +3962a75 mds: defer releasing cap if necessary +a918e61 mds: fix Locker::request_inode_file_caps() +2b1b6ca mds: notify auth MDS when cap_wanted changes +fc94f47 mds: export CInode:mds_caps_wanted +e21f328 mds: export CInode::STATE_NEEDSRECOVER +882be6b mds: send slave request after target MDS is active +38fb2ec mds: unfreeze inode after rename rollback finishes +8a1114c mds: remove buggy cache rejoin code +30c6821 mds: fix typo in Server::do_rename_rollback +e8497f8 mds: fix import cancel race +0708d44 mds: fix straydn race +7a6ec35 mds: fix slave commit tracking +0c1ca8e mds: fix uncommitted master wait +5426c75 mds: adjust subtree auth if import aborts in PREPPED state +d7b999b mds: don't stop at export bounds when journaling dir context +81d073f mds: fix underwater dentry cleanup +8b4e991 mds: journal new subtrees created by rename +a6df764 PendingReleaseNotes: notes about enabling HASHPSPOOL +aa0649c osdmaptool: fix cli tests +0740811 With mdlog lock and unlock functionality, listing and trimming base on shard_id +615b54c doc: Updated rgw.conf example. +6f93541 doc: Updated RGW Quickstart. +e59897c doc: Updated index for newer terms. +b4f63ce ceph: --help-all +99d7bce ceph: fix format strings for Py2.6 compatibility +ec0371c ceph: print parameter name for CephString in concise_sig +1e0222a ceph: Clean up/add missing docstrings +52b23b5 rgw: propagate region on bucket creation +3044fa8 rgw: determine owner after effetctive user +4dafea4 rgw: forward request params through upstream REST +aee6665 mon: Refactor +6d1e14e pg_pool_t: enable FLAG_HASHPSPOOL by default +5187649 rgw: enable data sending via http client +f9b58e0 rados.py: don't access returned buffers if error/SIGINT +ef4eb4c PGMonitor: dead code removal +2c51b91 MonCap: add pg r/w to osd capability profile +0f54748 kv_flat_btree_async.cc: fix AioCompletion resource leak +7b438e1 kv_flat_btree_async.cc: fix resource leak +9785478 ceph-disk: remove unnecessary semicolons +16ecae1 ceph-disk: cast output of _check_output() +9429ff9 ceph-disk: fix undefined variable +c127745 ceph-disk: add missing spaces around operator +580a08c rgw: multiple fixes and cleanups +2655c1e utime: add asctime() +8682248 PG: ping tphandle during omap loop as well +d62716d PG: reset timeout in _scan_list for each object, read chunk +b8a25e0 OSD,PG: pass tphandle down to _scan_list +bb407bf doc: Updated Ceph FS Quick Start. +7c497d9 doc: Added troubleshooting to Ceph FS index. +3dda794 doc: Added separate troubleshooting for MDS and Ceph FS. +8b3a04d rgw: iterate usage entries from correct entry +0c805b6 rgw: rest_client, forward requests +f2f7353 rgw: some code cleanup +75600c6 doc: Updates for ceph-deploy and cuttlefish. +c812bb5 rgw: separate certain request info into different structure +87cef3d mon: drop unnecessary conditionals +e09e944 modified: src/init-ceph.in fixed bug in init script, the "df" should be run on remote host by do_cmd, and use $host instead of "hostname -s" +f9ec5a7 msgr: increase port range to 6900-7300 (from -7100) +1dd99f0 modified: src/init-ceph.in fixed bug in init script, the "df" should be run on remote host by do_cmd, and use $host instead of "hostname -s" +27381c0 osd: ping both front and back interfaces +92a558b msgr: add Messenger reference to Connection +2885142 msgr: take an arbitrary set of ports to avoid binding to +6ad1055 osd: bind front heartbeat messenger to public_addr +0262301 osd: send hb front addr to monitor at boot +da1940a osd: create front and back hb messenger instances +1fee4cc osd/OSDMap: encode front heartbeat addr +342eed3 osd/OSDMap: hb_addr -> hb_back_addr +cf977ce osd/OSDMap: new_hb_up -> new_hb_back_up +6cfdb74 osd/OSDMap: new_up_internal -> new_up_cluster +3fa6585 osd: Add asserts for seg faults caused by corrupt OSDs +b355b98 OSDMonitor: fix osd dump (need enclosing section) +c2e262f osd: skip mark-me-down message if osd is not up +32dc463 osd, mds: shut down async signal handler on exit +4a8d996 rbd image_read.sh: ensure rbd is loaded +87eaaab rgw: clean up s3 signing code +08c39b8 ReplicatedPG::submit_push_complete don't remove the head object +eb91f41 messages/MOSDMarkMeDown: fix uninit field +70c9851 mds: weaken reconnect assertion +bec630f cephtool/test.sh: add test for --verbose and --concise +28a6761 ceph: fix --concise (set verbose to False) +d81d0ea sysvinit: fix osd weight calculation on remote hosts +caa15a3 sysvinit: use known hostname $host instead of (incorrectly) recalculating +903d4a0 rgw: add system users +b35fafb rgw: pre-generate bucket object version before creating it +0289c44 OSDMonitor: skip new pools in update_pools_status() and get_pools_health() +751b73a ceph-syn: specify which types of addresses to pick +a43d353 ceph-mds: specify which types of addresses to pick +de49967 mon: PaxosService: drop atomic_t on 'proposing' +c307d42 ceph-osd: specify which types of addresses to pick +6d89323 ceph-mon: only care about public addr during pick_addresses() +1ba9f84 common: add mask argument to pick_addresses() to specify what we need +78a1834 ceph: remove cli test +e15d290 mon: Paxos: get rid of the 'prepare_bootstrap()' mechanism +586e8c2 mon: Paxos: finish queued proposals instead of clearing the list +549e547 mds/Migrator.cc: fix possible dereference NULL return value +32b024c mds/Migrator.cc: fix possible dereference NULL return value +ed53bf1 mds/Migrator.cc: delete some empty lines at EOF +158e740 mds/Migrator.cc: fix possible dereference NULL return value +7ba34c1 mds/Migrator.cc: fix dereference NULL return value +de1e355 mds/Migrator.cc: fix possible NULL pointer dereference +c266d7c mds/Server.cc: fix possible NULL pointer dereference +fd818a2 src/rbd.cc: silence CID COPY_PASTE_ERROR warning +fa3149d mds/MDS.cc: fix dereference null return value +7118108 mds/MDCache.cc: fix possible NULL pointer dereference +2ff23fe mon: Paxos: finish_proposal() when we're finished recovering +f70d463 wip: ceph: print help for osd.0, mon.a, mds.a daemon commands +34c42f6 ceph: admin_socket() returns data rather than printing. +06a156d admin_socket and all users: command-descriptor support +27b60d8 Makefile.am: Move cmdparse to libcommon +ed31524 rados.py, ceph: add timeout for run_in_thread and selected callers +70a9697 packaging fixes around the new ceph cli: +7e6c461 ceph: handle our own help printing +bf6220e mon: Merge in (and add COMMAND() for) compact command +948d396 ceph: handle non-EINVAL failure on get_command_descriptions +d302761 objecter: allow osd-destined commands to fail if osd doesn't exist +a9b4f46 mon: fix stdout vs. stderr throughout monitor +de1b855 librados, rados.py: rados_*_command: pass inbuflen to handle zeroes +5225028 osd: handle new-style JSON commands directly (like mon) +c3f6e64 mon, cmdparse: move dump_cmds_to_json to common/cmdparse +623d630 ceph: cleanup: remove dead code/imports, note apparently-unused objects +a568be8 ceph: hack for tell so that we don't have to duplicate "tell " in each command description +a502daa ceph: figure out which daemon should get a command early +9a08573 ceph: add partial to validate() +aa7f52f ceph: move parsing of a json funcsig into function for reusability +26df7ac ceph: allow CephName to validate when given only an 'id' +2a663a9 rados.py: no exception on error, just return errno to caller +0b9601d MonmapMonitor: use parsed destination for mon tell +fc629e6 MonmapMonitor: mon tell: allow 'type.id' or 'id' as well as 'n' +d7c6885 ceph: send pgid in command strings of pg tell +3ff7c36 ceph: return error from json_command rather than raising exception +5f211ef ceph: clean up line wraps, comments, add verbose command output +95e411d ceph: implement -w/--watch. +2ce5cb7 rados.py: change all calls to librados to be on a child thread +4849084 rados.py: implement rados_monitor_log +bcf064f librados: rados_monitor_log's cb takes two ints rather than timespec +4dc6a16 mon/PGMonitor: reflow command methods +590cffe mon/OSDMonitor: restructure command flow +d87e371 mon: fix 'osd dump' +db589d1 vstart.sh: use new mon cap profiles +05dda0f mon: weaken security check on 'log' command +73d08b9 mon: wire new command map to new caps +839d5b3 mon: transition from MonCaps -> MonCap +489cd5c FileStore: integrate WBThrottle +6670e2a os/: Add WBThrottle +917341e ceph-object-corpus: note MForward encoding change +5d7dd5a mon: bump wire protocol version +1123fc2 mon/MonCap: add new MonCap implementation +27dc4fe osd/OSDCap: avoid typedef for rwxa_t; rename to osd_rwxa_t +2aefee2 osd/OSDCap: fix allow_all() check +dc4a508 ceph: remove ceph tool cli tests +039b757 librados: add rados_monitor_log() +e830de5 librados: unit tests for mon_command +63017ba rados.py: use librados-allocating versions of *_command +a090abf librados: use memcpy rather than strncpy for possibly-NUL data +d490041 ceph: restructure so old-style commands and new-style can share code +93d8125 rados.py: remove debug prints from *_command +9e8397a Check for and handle old-monitor +d5075ca Return correct error to main; always write outs to stderr +2919bde Set conffile to passed -c, not conf +d5497fa rados.py: errnos must have errno. qualifier +7dbe4ef ceph: pop off 'target' before sending command +808f518 ceph: fix exception msg +3b7062b RadosClient: handle command replies +2e52649 ceph: 'ceph daemon ' +e748d9b ceph: add support for --admin-socket +e3f13e8 vstart.sh: set python path(s); echo something for user to paste +aeeabcd librados: add *_command() variants that allocate the result w/ malloc +1af5f74 wip: osd tell commands, CephFileparse, etc. +4698d99 Enhance cephtool tests for coverage of CLI rewrite +f26bd55 mon, ceph: transition to separate CLI parsing +d9ff7d4 mon: add JSON command parsing framework +ed2266a Formatter: fix XML parsing assert +3148482 Formatter: add new_formatter(type) +850a4cc Rename "ceph" tool to "ceph-legacy-cli" +4227490 rados.py: functions for new librados functions {mon,osd,pg}_command +3bc0d3f Add C and C++ interfaces to mon_command, osd_command, pg_command +a9ce311 str_list: cleanup/enhancement +2e17222 osdc/Objecter: implement osd and pg commands +9f55333 mon/MonClient: assume tid 0 is the first command +0c6a31c mon/MonClient: add mon command handling +5e21b30 mon: set tid on MMonCommandAck +17cf8df Revert "mon: fix validatation of mds ids in mon commands" +e9d20ff mon: implement --extract-monmap +5110497 doc: update mon cluster rescue process for cuttlefish+ +132d5bf Fix usage for "ceph osd lost" +c0268e2 mon: implement --extract-monmap +669e45e rgw: forward bucket creation to master region +5671fa9 ceph-monstore-tool: implement getmonmap +d48f1ed rgw: protect ops log socket formatter +0866517 FileStore: add fd cache +14d8cc6 ceph-fuse: add ioctl support +bcc8bfd ceph-disk: fix stat errors with new suppress code +ca28d87 common/shared_cache.hpp: fix set_size() +17a6e7f doc/dev/osd_internals: add some info about throttles +12eff5d common/shared_cache.hpp: add clear() +bfb08ee rbd image_read.sh: test different clone object orders +7ad5ceb rbd image_read.sh: add clone-of-clone testing +a6b4847 rbd image_read.sh: allocate local file at create time +512e907 rbd image_read.sh: a few cleanups +cbff720 rbd: prevent import of a dir +ebc0913 ceph-monstore-tool: be more verbose when replaying a trace +a6569c5 ceph-monstore-tool: compact command +9cc787a ceph-monstore-tool: dump-keys command +7be705e rgw: infrastructure to send requests to different region +1c7b9c3 os/LevelDBStore: fix compression selection +19c5ac3 Use invoke-rc.d in maintainer scripts +047d32a Added send_response implementation for MDLOG and BILOG list APIs so that periodic flushing can happend in execute() +183280c PG: kill some dead IndexedLog methods +4cf00b9 OSD: kill old split code, it's been dead for a while +2f193fb debian: stop sysvinit on ceph.prerm +d2a4253 mds: better error check on sessionmap load +87767fb mon: be a bit more verbose about osd mark down events +03b9326 Makefile: add -Wformat-security +a7096f8 rgw: add access key to zone info +d05a4e5 ceph df: fix si units for 'global' stats +0c2b738 ceph df: fix si units for 'global' stats +17f6fcc Remove stop on from upstart tasks +6340ba8 Fix -Werror=format-security errors +947e133 MDLOG and BILOG REST Apis implemented along with some bug fixes +8bba266 libcephfs: add ceph_get_pool_name() +feec1b4 doc: Added more glossary-compliant terms and indexing. +5c4b4f0 doc: Added another instance term to the glossary. +decf342 doc: Minor improvements to Ceph FS landing page. +0f4c67f rgw: store region in bucket info +3255f11 libcephfs: get the pool name of a file path +3562c8c libcephfs: get replication factor of a file handle/path +877fcf0 libcephfs: get file handle/path layout info +42c74fd libcephfs: get stripe_unit/stripe_count/object_size/pool_id by file handle/path +10496a8 libcephfs: fix typos +ee3d50e Client: get describe_layout by file handle/path +69e2cbe mon: add 'compact' command +a130cd5 kv_flat_btree_async.cc: release AioCompletion before leave the loop +4ba70f8 librbd/internal.cc: fix resource leak +7494e4e doc: Omitted literal syntax from toc. +381ad24 doc: Added fuse syntax to the fstab doc. +c80c6a0 sysvinit: fix enumeration of local daemons when specifying type only +d8d7113 udev: install disk/by-partuuid rules +65072f2 mon: clear pg delta after some period +acf6b8f os/FileStore: fix replay guard error msgs (again) +9b9d322 test_filestore_idempotent_sequence: unmount prior to deleting store +5a27e85 Revert "test_filejournal.cc: cleanup memory in destructor" +aacc9ad librbd: make image creation defaults configurable +c49ba75 os/FileStore: print error code to log on replay guard failure +53ee6f9 rbd.py: fix stripe_unit() and stripe_count() +810306a cls_rbd: make sure stripe_unit is not larger than object size +8fa3039 doc: Added index reference. +74a73f2 doc: Added glossary references and index references. +5737d03 doc: Added cluster map and CRUSH definitions. +58a880b doc: Fixing index references. +46f5f58 doc: Added latency comment. +604c83f debian: make radosgw require matching version of librados2 +eaf3abf FileJournal: adjust write_pos prior to unlocking write_lock +541396f client/Client.cc: fix/silence "logically dead code" CID-Error +64871e0 mds: avoid assert after suicide() +49033b6 objclass/class_debug.cc: reduce scope of 'n' in cls_log() +297b573 tools/ceph-filestore-dump.cc: reduce scope of 'r' in export_files() +a634a13 test/system/systest_runnable.cc: reduce scope of 'ret' in join() +6147df4 test/system/st_rados_list_objects.cc: reduce scope of 'ret' in run() +56f8c36 test/system/st_rados_create_pool.cc_ reduce scope of 'ret' in run() +d226d9c test/system/rados_list_parallel.cc: reduce scope of 'ret' +8f486f0 test/librbd/test_librbd.cc: reduce scope of several variables +95bf066 rgw/rgw_tools.cc: reduce scope of 'ret' in rgw_get_obj() +492553b rgw/rgw_common.cc: reduce scope of 'end' in two cases +682f107 rgw/rgw_bucket.cc: reduce scope of 'max' in rgw_remove_bucket() +9d6e086 rgw/rgw_admin.cc: reduce scope of 'ret' +a3eeb9f rgw/rgw_acl_s3.cc: remove local variable 'ret' from create_from_headers() +b9fe22b rbd_fuse/rbd-fuse.c: reduce scope of some variables in open_rbd_image() +393de32 osdc/Objecter.cc: reduce scope of skipped_map +84ce4e9 os/chain_xattr.cc: reduce scope of local variable +829fdd4 src/os/LFNIndex.cc: reduce scope of suffix_len +8254072 os/HashIndex.cc: reduce scope of a local variable +ea7d8a4 os/FileStore.cc: reduce scope of a local variable +2c60bc1 src/os/FlatIndex.cc: reduce scope of suffix_len +4427528 src/os/DBObjectMap.cc: reduce scope of some variables +14871d0 mount/mount.ceph.c: reduce scope of 'skip' in parse_options() +eb808cf src/mds/flock.cc: reduce scope of old_lock_to_end in two cases +ce84a22 mds/Locker.cc: reduce scope of forced_change_max +e7d4782 src/crush/mapper.c: reduce scope of some local variables +e0f1084 auth/Crypto.cc: reduce scope of local variable in_buf +aa11c68 rgw/rgw_rados.cc: remove not needed code +cd48f57 rgw/rgw_gc.cc: fix possible NULL pointer dereference +403bfa4 osd/OSD.cc: remove unused variable +17d8ee9 Fix some little/big endian issues +769a16d Makefle: force char to be signed +3759daa OSD: After repairs finish a new deep-scrub should be avoided +c0378b6 OSD: Repair with 0 fixed doesn't complete properly +e34a56f doc: fix mkcephfs production use, deprecated note +3ac7fb8 rgw: parse location constraint on bucket creation +a7e80e2 rgw: a function to read all request input +84c17b6 rgw: update json encode/decode for new bucket info +c8ac287 rgw: add region to bucket info +b646407 Modified PutMetadata::get_data() to handle chunked transfers +3c8ef2b ceph_json: don't try to parse NULL buffer +0219774 Removed the check for parameter validation in op_get() +efaa33f Fixed certain bugs on rest admin APIs +bf612f0 rgw: modify metadata RESTful implementation +648c3bc With admin metadata rest API implementation and unit test cases for it +8f3fb97 Added OSD to glossary, removed parenthetical. +f36ec02 doc: Updated architecture document. +48e89b5 OSD: scrub interval checking +1f4e7a5 OSD: Don't scrub newly created PGs until min interval +7b93d28 doc/release-notes: v0.62 +52b0438 doc/rados/configuration: fix [mon] osd min down report* config docs +2a4425a reflect recent changes in the pg deletion logic +1c53991 fix typos and add hyperlink to peering +b7d4012 typo s/come/some/ +dbddffe update op added to a waiting queue or discarded +e9935f2 (origin/wip-rgw-bucketlog-3) ceph_json: fix bool decoding +67ecd75 rgw: json_encode json a bit differently +afeb8f2 md/Sever.cc: fix straydn assert +e69257e rgw/rgw_user.cc: fix possible NULL pointer dereference +d692902 mds/Server.cc: fix possible NULL pointer dereference +fb222a0 mds/Server.cc: fix possible NULL pointer dereference +c87788b mds/Server.cc: fix possible NULL pointer dereference +088455f librados/AioCompletionImpl.h: add missing Lock +8a52350 src/dupstore.cc: check return value of list_collections() +70a4a97 mds/Server.cc: fix possible NULL pointer dereference +21489ac src/rbd.cc: use 64-bits to shift 'order' +3e44682 mon/Monitor.cc: init 'timecheck_acks' with '0' in constructor +528ec35 mon/Monitor.h: init 'crc' in constructor with '0' +9883630 mon/QuorumService.h: remove unused QuorumService::flags +8df55e0 test/test_cors.cc: initialize key_type in constructor +eac545e tools/ceph.cc: cleanup memory allocated for 'buf' +c3c140b tools/ceph.cc: close file descriptor in error case +043ea2c tools/ceph.cc: close file descriptor in error case +3602891 test_filejournal.cc: cleanup memory in destructor +7ea44ee librbd/test_librbd.cc: free memory in test_list_children() +3c285c4 scratchtool.c: cleanup rados_t on error +cab8e9b test/kv_store_bench.cc: fix resource leak +d8cb7df filestore/test_idempotent_sequence.cc: fix FileStore leaks +349cfb4 ceph-filestore-dump.cc: cleanup on error case +df4c099 ceph-filestore-dump.cc: cleanup resource in error case +9382379 (tag: v0.62) v0.62 +c5deb5d doc/release-notes: v0.61.2 +97a7309 rgw: tie bucket/user removal to mdlog differently +4bb4063 ceph_test_libcephfs: parse environment +f24b8fb PG: fix some brace styling +72bf5f4 PG: subset_last_update must be at least log.tail +395a775 SimpleThrottle: fix -ENOENT checking +d06d0c3 rgw: slightly simplify metadata abstraction +bb6d1f0 rgw: read bucket metadata before writing it +88af2b0 Replace mis-named mon config variables using mon_osd_min_down_reports/mon_osd_min_down_reporters +225fefe ceph-disk: add '[un]suppress-activate ' command +5c305d6 mon: fix validatation of mds ids in mon commands +ba05b16 mon: Monitor: tolerate GV duplicates during conversion +6db072d libcephfs: add ceph_conf_parse_env() +9ec77eb ceph_test_libcephfs: fix xattr test +9bb58b2 OSD: We need to wait on CLEARING_DIR, not DELETED_DIR +13ae13a librbd: add options to enable balanced or localized reads for snapshots +0c7414b ReplicatedPG: send -EAGAIN for both balanced and localized reads +4ddaea7 librados: add per-ObjectOperation flags for balanced and localized reads +442f058 librados: add sparse_read() to the C++ bindings for an ObjectOperation +d519346 Objecter, librados: use only ObjectOperation form of sparse_read internally +ed76824 Objecter: fix error handling for decoding stat +82211f2 qa: rsync test: exclude /usr/local +459c731 osd/OSD.h: fix try_stop_deletion +a0d238c rgw: cache obj version +93f2794 Throttle: move start_op() to C_SimpleThrottle constructor +613d747 librbd: run copy in parallel +fb299d3 librbd: move completion release into rbd_ctx_cb() +a6d0a25 librbd: parallelize and simplify flatten +bfa1066 librbd: only send non-zero copyup data +cfece23 librbd: parallelize rollback +922df6c rgw: op->PutACLs uses the correct set_attr for buckets +1f0b947 rgw: rados->set_attr() just calls rados->set_attrs() +437d69e mds/CDir.cc: fix possible dereference after NULL check +c006151 ceph-monstore-tool.cc: check if open() was successful +d1e0fc6 kv_flat_btree_async.cc: fix resource leak +f6635cb client/SyntheticClient.cc: check return value of describe_layout() +cb91f0f client/Client.cc: fix possible NULL pointer dereference +5af2cbf rados.cc: fix leaking of Formatter* +4b3a7dc client/SyntheticClient.cc: fix another memory leak +b9fbc82 client/SyntheticClient.cc: fix memory leak +447f318 mds/MDCache.cc: fix dereference NULL pointer +d258df4 mds/MDCache.cc: add NULL pointer check +5392e97 mds/Server.cc: remove dead default in switch +f56cb98 osd/OSD.h: add missing unlock of osd_lock +b097f65 rgw/rgw_rest.cc: remove dead and unneeded code +5babc81 rbd.cc: fix error handling +4908079 rados_sync.cc: remove dead and not needed code +077cdb0 test/omap_bench.cc: remove dead code +0c70e44 libcephfs/test.cc: add assert for result of ceph_getxattr() +8d61466 rgw/rgw_user.cc: add missing break in switch +d9c5b5b client/SyntheticClient.cc: add missing break in switch +6e241b9 ObjectStore.cc: add missing break in switch +92db7a0 rgw: metadata handler for bucket set_attr operations +27fb38b doc: Fixed typos. Somehow got a merge error. +65768a6 mds: be more explicit about path_traverse completion +8eaa15f doc: fix broken link to ceph-deploy in release notes +3b2c5fb librados: add selfmanaged_snap_rollback as an ObjectOperation +4095641 librbd: delete more than one object at once +537386d Throttle: add a simpler throttle that just blocks above a threshold +261aaba doc: Added entry for the RGW Admin Ops API. +54e7a6f libcephfs_jni.cc: reduce scope of ret variable +cd0f461 include/ceph_hash.cc: reduce scope of a var in ceph_str_hash_rjenkins() +ad2990c include/addr_parsing.c: reduce scope of port_str in safe_cat() +cc3376c global/global_init.cc: reduce scope of ret in global_init_daemonize() +73a10ac crush/builder.c: reduce scope of oldsize in crush_add_bucket() +e064e67 common/safe_io.c: reduce scope of some ssize_t variables +8c97e77 common/obj_bencher.cc: reduce scope of avg_bandwidth +6256d3e common/ceph_argparse.cc: remove scope of some variables +b66b8dd common/admin_socket.cc: remove scope of ret variable in do_accept() +e7d1114 cls/rbd/cls_rbd.cc: reduce scope of variable rc +cdfc4a7 rgw/rgw_op.cc: use empty() instead of size() +45ffb36 ceph-filestore-dump.cc: use empty() instead of size() +723062b doc: Updated usage syntax. Added links to hardware and manual OSD remove. +01a07c1 OSD: rename clear_temp to recursive_remove_collection() +f5a60ca osd: remove_dir use collection_list_partial +8b3cd6e rgw: don't handle ECANCELLED anymore +7a8d6fd PG,OSD: delay ops for map prior to queueing in the OpWQ +d3dd99b PG: no need to wait on DeletingStateRef for flush +0ef9b1e osd_internals/pg_removal.rst: update for pg resurrection +90f50c4 OSD: add pg deletion cancelation +b274c8a common/sharedptr_registry.hpp: add remove +0557e6c rgw: bucket metadata operations go through metadata handler +270ca62 doc: Updated doc for connectivity. Updated text with glossary terms. +e417312 doc: Updated disk syntax. Updated text with glossary terms. +af91928 doc: Added connectivity section. Updated doc with glossary terms. +f1b13a1 doc: Added the non-implemented bit for the gateway to the dev/radosgw TOC. +69b6482 OSD: don't rename pg collections, handle PGs in RemoveWQ +fe164e4 doc: Republishing the admin operations API for the gateway. +d4732e8 doc: Republishing the admin operations API for the gateway. +00e9031 osd: prioritize recovery for degraded pgs +09163a3 Add priority option to AsyncReserver class +df049c1 AsyncReserver: Remove assert in set_max() for max > 0 +da271f7 doc: Document admin api web interface. +619a68a armor: don't break lines by default +770d94d rgw: implement metadata hander for buckets data +499edd8 osd: initialize OSDService::next_notif_id +e30a032 osd: init test_ops_hook +72b5629 rbd: fix buffer leak in do_import +2bc0883 librbd: fix possible use-after-free +4a90af8 ceph-filestore-dump: fix uninit fields in ctor +99958e2 rgw: fix various uninit class fields +ad073c2 radosgw-admin: fix fd leak in read_input() +110a823 rados: fix fd leak +3dc7c32 rados: fix buffer leak +4087e42 os/Filestore: fix fd leak in error path +8632707 mon: fix Formatter leak +76b9024 mds: fix fd leak +5433462 doc/release-notes: v0.61.1 release notes +e5b2ca8 PG: rename must_delay_request to op_must_wait_for_map, make static +6c1e479 mon: dump MonitorDBStore transactions to file +5a631b8 osd: optionally enable leveldb logging +bb4f65a mon: allow leveldb logging +a284c9e common/Preforker: fix warnings +3ebddf1 debian/control: squeeze requres cryptsetup package +83bbae4 debian/control: squeeze requres cryptsetup package +46c3e48 ceph_json: dump timestamp in utc +551571c rgw: datalog trim +52666dc PG: reassert_lock_with_map_lock_held() is dead +17705d7 OSD,PG: lock_with_map_lock_held() is the same as lock() +e2528ae ceph-create-keys: gracefully handle no data from admin socket +f2a54cc init-ceph: fix osd_data location when checking df utilization +ea809f7 rgw: bucket index log trim +546ed91 osd: don't assert if get_omap_iterator() returns NULL +76b736b rgw: metadata log trim +36ec6f9 osd: don't assert if get_omap_iterator() returns NULL +3846451 rgw: user operation mask +ef82ad7 rgw: resend data log entry if took too long +3385c2c rgw: more data changes log implementation +a37092f RefCounteCond: keep return val, wait() returns it +f28df17 rgw: changed data log renew thread +39b258c rgw: limit num of buckets in data changes log +d5da152 rgw: use shared_ptr instead of RefCountedObject +5e642fa lru_map: infrastructure for a bounded map +6659b2b rgw: data changes log, don't always send new requests +171b0bf rgw: data changes log, naive implementation +988dab3 rgw: decouple bucket data pool from bucket index pool +8e89db8 OSD: handle stray snap collections from upgrade bug +252d71a PG: clear snap_collections on upgrade +438d9aa OSD: snap collections can be ignored on split +1870516 mon: set MonitorDBStore options on open +393c937 ceph: return error code when failing to get result from admin socket +dbcd738 ceph-monstore-tool: added replay +aa94f5b ceph-monstore-tool: add MonitorDBStore trace dumper +797089e mon: dump MonitorDBStore transactions to file +4fbf9a7 rgw: fix get_obj() with zero sized obj +0b526d9 rgw: don't set shadow obj attr in object metadata +abef2b2 rgw-admin: object stat also decodes policy +d05d05a rgw: update cli test for radosgw-admin +2983d98 Makefile.am: add missing header file +7132e6e rgw-admin: add object stat command +49b3d2e rgw-admin: bucket list also specifies object namespace +4b142a1 rgw: copy_obj uses req_id as tag +b295c64 rgw: radosgw-admin bucket list --bucket lists bucket objects +3d7b839 rgw: call rgw_store_user_info() with objv_tracker +85e4ea9 rgw-admin: fix some more merge issues +fa23b3e rgw-admin: fix user_id initialization +7e08c57 rgw: share object tag and index tag +2a16baf rgw: bucket index log fixes +871b401 radosgw-admin: bilog list gets marker and max-entries params +b1578ba radosgw-admin, cls_rgw: list bucket index log +5e19628 cls_rgw: bucket index versioning +d857896 rgw: fix broken radosgw-admin user * commands +abd0ab3 cls_rgw, rgw: bucket index logs modifications +478fe5e rgw: metadata rm +fe63d44 rgw: cls_log_trim boundary change +288645d rgw: show metadata log through radosgw-admin +75ada77 rgw: use new cls_log listing interface +8444db6 cls_log: adjust listing api +cb6d4de rgw: log user operations +7ca9192 rgw: track object versions between reads and writes +72220bf rgw: initialize meta_mgr earlier +e98ca56 test_cls_log: remove warning +0cdce74 cls_log: extend unitest +c28f864 cls_log: more fixes +815e0ac cls_log: unitest +5313b99 cls_log: fixes, other adjustments +fee51dd objclass: provide new api for unique subop versioning +4feac81 osd: keep track of current osd subop num +b77422f cls_log: trim works in chunks, returns -ENODATA when done +7c19f96 cls_log: a class to handle info sorted by timestamp +0cccd7c rgw: metadata list user, only show uids +272635f rgw: user metadata updates also key version +ff2d3c9 rgw: add top level metadata handler +dcee3a1 rgw: put metadata, other cleanups +1269986 rgw: metadata manager, api to list keys +7cfa89d rgw: metadata set/get infrastructure +fe96600 rgw: rgw_get_system_obj() can return obj_version +2223d99 cls_version: add cls_version_read(ObjectReadOpeation&) +1563ad1 librados: add two more ObjectOperation::exec() +5f1b897 rgw: start tying metadata objs to version objclass +913ecd4 cls_version: unitest +8d7d436 cls_version: various fixes +6a5966c cls_version: create a new objclass +8bab4fe rgw: fix json decoding of rgw_bucket +8bb5e0a rgw: regionmap update +8ef4f39 rgw: get/set region map +ea4d033 rgw: zone list, setup changes +e27f889 common/ceph_parser.cc: cleanup +67db8a6 rgw: set region info, default region +5cc34ff rgw: can list regions, show default region info +708339a rgw: some region/zone related cleanups/fixes +a12357c rgw: admin command to show region info +6fa5480 rgw: derr -> lderr +488a20d rgw: region creation +960fa0d rgw: region management encoding/decoding changes +64aa4e4 rgw: define region/zone data structures +f0c0997 doc/install/os-recs: reverse order of releases +f8ae2bd doc: Fixed typos. +452fb52 doc: Fixed typo. +a0cb5e5 doc: Removed "and" as suggested. +ad75582 doc: Fixed hyperlink. +87160c4 doc: Fixed path typo. +2d6e4d2 doc: Updated OS support for Cuttlefish. +67b60b9 doc: Minor tweak to the definition list style. +fd63f8a WorkQueue: Allow WorkQueueVal to be specified with 1 type +4b548b5 OSD: removal collections will be removed inline and not queued +d7cd957 OSD::clear_temp should clear snap mapper entries as well +7b22cfb PG,OSD: mark info as backfilling in _remove_pg() +c207516 doc: Added glossary to TOC. +473aae9 doc: Added glossary. +4e99dca doc: Fixed usage typo. +8586738 Fix whitespace indentation +ad504e9 Implement 'config get ' for the admin socket +27d86bd fixed common typo in error messages +2bd2731 doc/install/{debian,rpm}: update for cuttlefish +7c3a0e8 doc/start/get-involved: fix links +b107081 doc/release-notes: I missed rgw rest api in the release notes +9d85d67 os/ObjectStore: add missing break in dump() +c693ba5 rados: add whole-object 'clonedata' command +298ebdb doc: Deleted redundant "so that" phrase. +277f2de doc: Corrected typo. +359bd6d doc: Corrected typo. +2d4b5bd Removed comment out of header, and added "coming soon." +1cfc6e3 doc: Updated usage for push | pull. +048e049 Clean up defer_recovery() functions +bd36e78 osd: make class load errors louder +0b4c5c1 osd: optionally enable leveldb logging +c1d5f81 mon: allow leveldb logging +237f3f1 (tag: v0.61) v0.61 +eb69c7d os/: default to dio for non-block journals +60603d0 ceph-disk: use separate lock files for prepare, activate +e662b61 ceph-test.install: add ceph-monstore-tool and ceph-osdomap-tool +eae02fd ceph.spec.in: remove twice listed ceph-coverage +71cef08 ceph.spec: add some files to ceph +c5d4302 doc: Update the usage to reflect optional directory name. +35acb15 doc: Rearranged to show zapping multiple disks and creating multiple OSDs. +8add78c doc: Moved install to the second step, from the first step. +6abbe68 doc: Autonumbering syntax correction. +efa460c doc: Added troubleshooting PGs to the index. +cddf3b5 doc: Commented out osd list for now. +0c0fc03 doc: Commented out remove a mds for now. +41eecf4 doc: Forwarding link. FAQ migrated to new Ceph wiki. +3540d90 ceph-test.install: add ceph-monstore-tool and ceph-osdomap-tool +6f33885 ceph.spec.in: remove twice listed ceph-coverage +acb60e5 ceph.spec: add some files to ceph +1a67f7b mon: fix init sequence when not daemonizing +a763569 ceph: add 'osd crush rule ...' to usage +3f0b8ec mon: avoid null deref in Monitor::_mon_status() +a968692 mon: generate useful error msgs for 'osd crush rule create-simple ...' +8894c50 crush: return -1 on error from get_type_id +b2501e9 ceph.spec: require xfsprogs +a0988be doc/release-notes: warn about sysvinit crush map update +c189d85 init-ceph: update osd crush map position on start +2e0dd5a mon: fork early to avoid leveldb static env state +6f8c1e9 doc/release-notes: add/link complete changelogs +4fa2c49 doc/release-notes: v0.56.5 +72fc6eb doc: Fixed typos. +5cdd731 Revert "mon: fix Monitor::pick_random_mon()" +b4e73cc doc/install/upgrading...: note that argonaut->bobtail->cuttlefish must be v0.56.5 +039a3a9 tools/: add paranoid option to ceph-osdomap-tool +2610528 osd: default 'osd leveldb paranoid = false' +444660e librados,client: bump mount timeout to 5 min +6a61268 OSD: also walk maps individually for start_split in consume_map() +c659dd7 rgw: increase startup timeout to 5 min +45c9e24 doc/install/upgrading...: note about transitioning to ceph-deploy +a8d4647 doc/release-notes: note about ceph-deploy +f95a053 Update debian.rst +615b84b Makefile,gitignore: ceph-monstore-tool, not ceph_monstore_tool +628e232 Makefile: put ceph_monstore_tool in bin_DEBUGPROGRAMS +d0d93a7 tools: ceph-osdomap-tool.cc +f498226 OSD: load_pgs() should fill in start_split honestly +3e0ca62 OSD: cancel_pending_splits needs to cancel all descendants +d944180 osd: add --osd-leveldb-paranoid flag +7cc0a35 mon: add --mon-leveldb-paranoid flag +dfacd1b dumper: fix Objecter locking +7bb145b doc/rados/deploy: note that osd delete does not work yet +771f452 doc/rados/deploy: misc edits +a21ea01 Revert "PaxosService: use get and put for version_t" +88c030f mon/Paxos: update first_committed when we trim +3a6138b mon/Paxos: don't ignore peer first_committed +bb270f8 mon: Monitor: fix bug on _pick_random_mon() that would choose an invalid rank +7f48fd0 mon: Monitor: use rank instead of name when randomly picking monitors +8a8ae15 OSD: clean up in progress split state on pg removal +2f6eb39 docs: Update links to Github and the Tracker +81b06be docs: Update the ceph-users join and leave addresses +b3f37ea docs: Update CloudStack RBD documentation +fe68afe mon: communicate the quorum_features properly when declaring victory. +b17e842 doc: Incorporating Tamil's feedback. +bd6ea8d doc: Reordered header levels for visual clarity. +bb93eba doc: Fixed a few typos. +14ce0ad doc: Updated the upgrade guide for Aronaut and Bobtail to Cuttlefish. +7de29dd doc/release-notes: update cuttlefish release notes to include bobtail +cd1d6fb ceph-disk: tolerate /sbin/service or /usr/sbin/service +a97ecca mon: Monitor: disregard paxos_max_join_drift when deciding whether to sync +a39bbdf mon: if we get our own sync_start back, drop it on the floor. +d00b4cd Revert "mon: update assert for looser requirements" +cedcb19 Revert "mon: when electing, be sure acked leaders have new enough stores to lead" +c2bcc2a ObjectCacher: wait for all reads when stopping flusher +6ae9bbb elector: trigger a mon reset whenever we bump the epoch +0acede3 mon: change leveldb block size to 64K +6f2a7df doc: Fix typo. +35a9823 doc: Added reference to transition from mkcephfs to ceph-deploy. +de31b61 doc: Updated index for new pages. Added inner table. +fa9f17c doc: Added transition from mkcephfs to ceph-deploy page. +02853c5 doc: Added purge page to ceph-deploy. +45d12f1 doc: Added OSD page to ceph-deploy. +0b912f4 doc: Added mds page for ceph-deploy. +3c46c51 doc: Added admin tasks page for ceph-deploy. +1c15636 Set num_rd, num_wr_kb and num_wr in various places that needed it +adb7c8a osd: read kb stats not tracked? +b5e2461 osd: Rename members and methods related to stat publish +bd68b82 mon: enable 'mon compact on trim' by default; trim in larger increments +929a994 mon: share extra probe peers with debug log, mon_status +030bf8a debian: only start/stop upstart jobs if upstart is present +825a431 man: update remaining copyright notices +4abf081 man: refresh content from rst +1bd011a PG,OSD: _remove_pg must remove pg keys +7146012 OSD: no need to remove snapdirs on _remove_pg() +8f6a1b8 mon/Paxos: compact on trim +3cb4f67 mon: compact PaxosService prefix on trim +e8c9824 mon: add compact_prefix transaction operation +a2f7d1d leveldb: add compact_prefix method +90b6b6d mon: compact leveldb on bootstrap +ee3cdaa mon: compact leveldb on bootstrap +5fa0f04 mon: --compact argument, config option to compact the store on start +6a00f33 leveldb: add compact() method +ffc8557 doc: update rbd man page for new options +8b2a147 gitignore: add ceph_monstore_tool +29831f9 Makefile: fix java build warning +a2fe013 mon: remap creating pgs on startup +278186d mon: only map/send pg creations if osdmap is defined +28d495a mon: factor map_pg_creates() out of send_pg_creates() +896b277 client: make dup reply a louder error +ee553ac client: fix session open vs mdsmap race with request kicking +bf0b430 Fix a README typo +cea2ff8 mon: Fix leak of context +20d99c4 doc: Removed extra whitespace. +041b0cf doc: Added rbd-fuse to TOC. +8f48a3d Added commentary and removed fourth column for now. +4e805a5 doc: Removed. Redunant information now. +6612785 doc: Added openssh-server mention, corrections, hyperlink fix. +21db055 doc: Added openssh-server mention. +9fa6ba7 doc: Added manpage link and hidden TOC. +dd6e79a doc: Removed installed Chef. This is now in the ceph wiki. +945dac6 doc: Removed text for include directive. Wasn't behaving the way I'd hoped. +3d9bc46 doc: Added ceph-mds to CephFS toc. +44d13a7 doc: Fix. ceph, not chef. +5327d06 ceph-filestore-dump: fix warnings on i386 build +79280d9 OSDMonitor: when adding bucket, delay response if pending map has name +e725c3e PaxosService: use get and put for version_t +1e6c390 tools: add ceph_monstore_tool with getosdmap +50e58b9 ceph.spec.in: remove conditional checks on tcmalloc +5c1782a debian/rules: Fix tcmalloc breakage +6d348a1 mon: cache osd epochs +0650fa9 monitor: assert out early if we get our own sync_start back +1e6f02b mon: update assert for looser requirements +ba13173 doc: Deleted old index. Generates warnings otherwise. +9a7a075 doc: General purpose pre-flight checklist. +9e775f1 doc: Modified Ceph deployment landing page. +fb8119c doc: Added general pre-flight checklist for ceph-deploy. +3433aa8 doc: Removed old ceph-deploy placeholder. +9c0c4c1 doc: Removed Chef section. Now appears in new Ceph wiki. +c25144e doc: Added Key Management for ceph-deploy. +d0d1554 doc: Added "Add/Remove Monitors" section for ceph-deploy. +f24dbde doc: Added Create a Cluster section. +b631cc6 doc: Added ceph-deploy package management (install | uninstall ) section. +d85c690 doc: Added new quick start preamble and index. +3ff7eef doc: Added ceph-deploy preflight. +9365674 doc: Added ceph-deploy quick start. +ebbdef2 monitor: squash signed/unsigned comparison warning +5fa3cbf mon: use brute force to find a sync provider if our first one fails +c880e95 rgw: fix compilation for certain architectures +a8b1bfa rgw: fix list buckets limit +f2df876 rgw: fix bucket listing when reaching limit +2264078 rgw: swift list containers can return 204 +960eac2 rgw: fix plain formatter flush +7144ae8 rgw: fix bucket count when stating account +1670a2b rgw: trivial cleanups post code review +98f532e Makefile.am: Add -lpthread to fix build on newer ld in Raring Ringtail +741f468 mon: fix Monitor::pick_random_mon() +cbc3b91 mon: mark PaxosServiceMessage forward fields deprecated +77c068d mon: fix double-forwarding check +e3b602a osd: Fix logic in OSDMap::containing_subtree_is_down() +a2a23cc debian/rules: use multiline search to look for Build-Depends +f768fbb client: re-fix cap releases +5121e56 client: don't embed cap releases in clientreplay +89692e0 debian/rules: use multiline search to look for Build-Depends +2146930 mon: do not forward other mon's requests to other mons +a5cade1 PG: clear want_acting when we leave Primary +3ce35a6 mon: get own entity_inst_t via messenger, not monmap +303e739 radosgw: receiving unexpected error code while accessing an non-existing object by authorized not-owner user +407ce13 PendingReleaseNotes: these are now in the release-notes.rst +4af93dc doc/release-notes: add note about sysvinit script change +cd7e52c init-ceph: use remote config when starting daemons on remote nodes (-a) +d90b0ca gen_state_diagram.py: fix function name +1ee8f39 gen_state_diagram.py: fix naming of global variables/constants +d9f8de1 gen_state_diagram.py: add some missing spaces around operators +7cd9d23 gen_state_diagram.py: remove unnecessary semicolon +eb3350e test_mon_config_key.py: fix some more naming of local vars +7436542 test_mon_config_key.py: fix naming of local variable opLOG +9d3b4fd test_mon_config_key.py: fix naming of local variable +0407572 fix "Instance of 'list' has no 'split' member" +c792ea6 test_mon_config_key.py: fix naming of local variable +912bb82 test_mon_config_key.py: fix naming of global variables/constants +1464169 test_mon_config_key.py: add missing space after comma +16c5650 test_mon_config_key.py: remove unnecessary semicolon +f601eb9 test_mon_config_key.py: fix bad indentation +9dd5de2 perf-watch.py: fix naming of a local variable +226ff52 perf-watch.py: fix naming of local variable +148710f perf-watch.py: add missing space after comma +dffa9ee perf-watch.py: remove unnecessary semicolons +ac3dda2 scrub clears inconsistent flag set by deep scrub +ba527c1 doc/release-notes: enospc note +2075ec6 doc/release-notes: 0.61 cuttlefish notes +82d5cd6 ObjectCacher: remove all buffers from a non-existent object +fcaabf1 mon: when electing, be sure acked leaders have new enough stores to lead +fb8bad3 mon: be more careful about making sure we're up-to-date on sync check +290b5eb rgw: fix i386 compile error +14f2392 FileStore::_split_collection: src or dest may be removed on replay +3604c98 librados: fix calc_snap_set_diff interval calculation +81a6165 PG: call check_recovery_sources in remove_down_peer_info +a9791da mon: send clients away while sychronizing +12bc9a7 mkcephfs: give mon. key 'allow *' mon caps +cce1c91 PendingReleaseNotes: note about rbd resize --allow-shrink +31399d1 Fix typo of the keystone service-create command +9abec30 rgw: list container only shows stats if needed +c7a0477 rbd: fix cli-integration tests for striping change +446641a 95-ceph-osd-alt.rules: Fix missing parent parameter +1f7ff41 ReplicatedPG: timeout watches based on last_became_active +a40772b osd_types: add last_became_active to pg_stats +d196b5b OSD: don't report peers down if hbclient_messenger is backed up +49eeaeb Messenger: add interface to get oldest queued message arrival time +297c671 DispatchQueue: track queued message arrival times and expose oldest +48631c1 mon: revert part of PaxosService::is_readable() change +0093d70 librbd: fix i386 build +857c88e librbd: add read_iterate2 call with fixed argument type +6c798ed librbd: implement read not in terms of read_iterate +95ed73a mon: drop forwarded requests after an election +ab25707 mon: requeue routed_requests for self if elected leader +4b07d69 mon: track original Connection* for forwarded requests +8402107 test_filejournal: adjust corrupt entry tests to force header write +556bb64 rgw: stream list buckets (containers) request +ccbc4db init-ceph: fix (and simplify) pushing ceph.conf to remote unique name +7ad63d2 ceph-disk: OSD hotplug fixes for Centos +3dd9574 doc: Usage requires --num_osds. +b71ec9c doc: Added some detail. Calculating PGs, maps; reorganized a bit. +b73ef01 mon: [MDS]Monitor: remove 'stop_cluster' and 'do_stop()' +f42fc0e mon: MDSMonitor: tighter leash on cross-proposals to the osdmon +fa77e1e mon: PaxosService: add request_proposal() to perform cross-proposals +a634bb1 mon: PaxosService: is_writeable() depends on being ready to be written to +98e2398 mon: PaxosService: is_readable/writeable() depending on is_active() +b29a5b1 mon: PaxosService: consider is_recovering() on is_writeable() +b33fae4 mon: commit LogSummary on every message +59d6953 mon: set threshold to periodically stash_full +660752a doc: Added users to Getting Started. +1164345 ceph-mon: Attempt to obtain monmap from several possible sources +9ba3240 mon: Monitor: backup monmap prior to starting a store sync +de5d1da rgw: don't send tail to gc if copying object to itself +85fd2ca mon: make 'osd pool rmsnap ...' idempotent +43d62c0 mon: make 'osd pool mksnap ...' idempotent +08e3ec1 mon: make 'osd blacklist rm ...' idempotent +5926ffa rbd: only set STRIPINGV2 feature when needed +5446218 rbd: fix feature display for --info +568101f rbd: avoid clobbering return value with udevadm settle +8db9d0a FileJournal: a valid entry after invalid entry =/=> corrupt +9b953aa radosgw: Fix duplicate 'Content-Type' when using 'response-content-type' +4b9a2a3 mon: MonmapMonitor: add function to obtain latest monmap +41b874c mon: PaxosService: add 'exists_key/version' helper functions +1a8b30e ceph-create-keys: Don't wait if permission denied +1fa719d doc: Aesthetic improvements. Removed unnecessary graphic and overrode margin for h3 tag. +3749ffe doc: Added a scenario to PG troubleshooting. +cf91594 doc: Changed usage to "bucket-name". Description was okay. +870f47c tools/ceph-filestore-dump: Implement remove, export and import +88d9ee1 ReplicatedPG::_finish_mark_all_unfound_lost: only requeue if !deleting +0e15555 ReplicatedPG::_applied_recovered_object*: don't queue scrub if deleting +6ef0f16 PG: check for pg change in ~FlushState +b8cb9d7 PG: bail if deleting in _finish_recovery +75cb55b AsyncReserver: delete context in cancel_reservation +d73b9fb tools/ceph-filestore-dump: Error messages lost because stderr is closed +37d2fe2 osd: Make clear_temp() public for use by remove +460db08 osd: Add flag to force version write in _write_info() +da39f91 osd: Create static PG::_write_log() function +ad845e6 OSDMonitor: pg split is no longer experimental +56619ab Fix journal partition creation +fe9d326 rbd: fix qa tests to use --allow-shrink +d395aa5 init-ceph: do not stop start on first failure +9a7d1f5 mon: Monitor: fix timechecks get_health clobbering overall status +aa0d5f3 mon: fix health monitor calls +be4807f global: call observers (and start logging) in global_init +76505c2 osd: Create new static function PG::_write_info() for use by PG import +52d8240 osd: Add OSD::make_infos_oid() as common function to create oid +5ffb3ef filestore, osd: Fixes to comform to programming guidelines +fa89cfd mon: QuorumService: return health status on get_health() +78c9db8 OpRequest: don't maintain history if the OSD is shutting down +1493e7d osd/: optionally track every pg ref +66c007f common/: add tracked_int_ptr.hpp +ec6f71b ReplicatedPG: use the ReplicatedPGRef typedef +4090eff ReplicatedPG: use ReplicatedPGRef for C_PG_MarkUnfoundLost +f03ba5a ReplicatedPG: use ReplicatedPGRef for C_OSD_OpCommit +8fe1b9d ReplicatedPG: use ReplicatedPGRef for C_OSD_OpApplied +c04c3e5 OSD: use PGRef in handle_pg_remove +1c2b66c OSD: use PGRef in handle_pg_stats_ack +c2127a1 PG: use PGRef in QueuePeeringEvt +0b7795a OSD: use PGRef in consume_map +f45a541 PG: use PGRef for FlushState +2f9a35a PG: use PGRef for C_PG_FinishRecovery +8bd89e1 PG: use PGRef in C_PG_ActivateCommitted +ce64775 PG: do not put() in scrub() if pg is deleting +b021036 PG,ReplicatedPG: move intrusive_ptr declarations to top +220c651 ReplicatedPG: add ReplicatedPGRef +016e975 FileStore::_do_copy_range: read(2) might return EINTR +07a80ee FileStore::_do_clone_range: _do_copy_range encodes error in return, not errno +5e4b8bc config: clarify 'mon osd down out subtree limit' +cd2cabe doc: Trimmed toc depth for nicer visual appearance. +44aa696 doc: Added new PG troubleshooting use case. +2e3579e doc: Updated title. +304a234 doc: Added PG troubleshooting to toctree. +d5139ba doc: Bifurcating OSD and PG Troubleshooting. Updated hyperlink. +3b8057a doc: Bifurcating OSD and PG Troubleshooting. Added PG troubleshooting doc. +3c4bf83 doc: Bifurcating OSD and PG Troubleshooting. Removed PG section. +46d8b9f rgw_bucket: Fix dump_index_check. +b0c1001 mon: ensure 'osd crush rule ...' commands are idempotent +0d46dc4 mon: make 'osd crush link ...' idempotent +5f1898d rgw_bucket: Fix dump_index_check. +87634d8 mds: journal the projected root xattrs in add_root() +f379ce3 mds: fix setting/removing xattrs on root +7e4f80b debian/control: Fix typo in libboost version number +f4bc760 build: Add new package dependencies +fd678ea debian/control: Fix typo in libboost version number +4b34b0e mon: PaxosService: fix trim criteria so to avoid constantly trimming +86c1ea1 build: Add new package dependencies +5a5fdfc mon: Paxos: increase debug levels for proposal listing +a0e457a doc: Removed legacy man page index. Generates warning otherwise. +d67793c doc: Clarified that admin-socket is accessed from same host. +da7bf67 doc: Updated hyperlinks to new tshooting section. +fb4cba4 doc: Removed this doc. Nothing referenced it, and parent directory echoes content. +f784317 doc: Revised top-level ops page. +6cf3682 doc: Removed link to nowhere. Otherwise generates a warning. +064ec2f doc: Removed top-level tshoot page, and created new index. +0d1e047 doc: Excised community from OSD tshoot, made it stand alone. +23e3fbe doc: Moved monitor troubleshooting to troubleshooting section. +594580c doc: Moved troubleshooting OSD to troubleshooting section. +7875800 doc: Added extraneous rgw settings to rgw conf. +4e6709b doc: Moved memory profiling from operations to troubleshooting. +9e9bd2d doc: Moved CPU profiling from operations to troubleshooting. +f0e3548 doc: Set toc depth to 1 level, and added troubleshooting so it appears in sidebar. +dd7fd2d doc: Moved journal discussion to OSD ref from Ceph config. +9ddc8b9 doc: Reordered deployment tools in toc. +fd8b4d0 doc: Removed logging from config index. Set depth to 1 for clean appearance. +cd4b242 doc: Removed logging. Added references. Reorganized and edited. +22a5cb6 doc: Removed. Not in toc, and otherwise generates a warning. +84b0ec2 doc: Updated hyperlink. +808ad25 doc: Removed fragmented logging info. Consolidated into one doc. +3c144e9 rbd: Only allow shrinking an image when --allow-shrink flag is passed +7b408ec client: disable invalidate callbacks :( +db37bd8 rbd: add --no-progress switch +8f21beb leveldbstore: handle old versions of leveldb +085b3ec mds: change XLOCK/XLOCKDONE's next state to LOCK +efe7399 mds: pass proper mask to CInode::get_caps_issued +f25f922 mon: Monitor: convert osdmap_full as well +1260041 mon: PaxosService: add helper function to check if a given version exists +246b811 osd/PG.cc: initialize PG::flushed in constructor +a993d25 Fix policy handling for RESTful admin api. +f3527d4 Fix policy handling for RESTful admin api. +544eb9b qa: pull qemu-iotests from ceph.com mirror +8994566 librbd: flush on diff_iterate +efce39e doc: Cherry-picked from master to next. Uses ceph-mds package during upgrade. +82aab8d doc: Cherry-picked from master to next. Rewrite of CloudStack document. +9753287 doc: Cherry-picked from master to next. Updates config to use virtio. +72b3919 doc: Cherry-picked from master to next. Reorders ceph osd create. +3afe84b doc: Cherry picked from master to next. Adds comments on naming OSDs. +02d3c11 os/FileJournal: fix journal completion plug removal +d8a354d config: provide settings for the LevelDB stores we use +fb840c8 osd/PG.cc: initialize PG::flushed in constructor +4a84ddb client: Fix inode remove from snaprealm race +0dc0f5b osd/PG.h: remove unused variable prior_set_built +6133ea5 librbd: use initialized data for DiffIterateDiscard test +638eb24 librbd: print seed for all DiffIterate tests +b343c52 doc: Changed MDS upgrade to use ceph-mds package. +785b25f Fix: use absolute path with udev +b4fc83c doc: Overhauled Wido's CloudStack document. +d801ca3 ceph.spec.in: use %{_sbindir} macro again +98de67d qa: add workunit for running qemu-iotests +a0ae2ec os: bring leveldbstore options up to date +6b98162 mds: output error number when failing to load an MDSTable +ae71b57 init-radosgw.sysv: New radosgw init file for rpm based systems +f875c0c mds: only go through the max_size change rigamarole if the client requested it +9c18fd6 mds: Locker needs to remember requested max_size changes from clients +87ff4af doc: Added additional note on first step of adding OSD. +2b6719f doc: Added info on OSD naming, and example. +a01bc3d doc: Moved ceph osd create to first step. +74cdbc3 doc: Changed libvirt example to use virtio. +4977f3e mds: Delay export on missing inodes for reconnect +3a1cf53 client: Unify session close handling +06d05e5 LibrbdWriteback: complete writes strictly in order +a329871 OSD: make pg upgrade logging quiet +351d9b2 rbd qa/workunits: add rbd read data test +bb8d1c9 rgw_admin: Create keys for a new user by default. +170d4a3 FileJournal: start_seq is seq+1 if journalq.empty() +90c256d FileJournal: fix off by one error in committed_thru +a4fa0a8 Journal: commits may not include all journaled seqs +13474b0 Journal: pass the sequence number to commit_start +49bc341 rgw_admin: Create keys for a new user by default. +a1d9cbe mds: fix session_info_t decoding +909dfb7 LibrbdWriteback: removed unused and undefined method +9d19961 LibrbdWriteback: use a tid_t for tids +870f9cd WritebackHandler: make read return nothing +f5b81d8 ObjectCacher: deduplicate final part of flush_set() +4b65673 test_stress_watch: remove bogus asserts +3888a12 test: update rbd formatted-output for progress changes +718fa0c pool should be root in osd set syntax for bobtail +95374c6 config: fix osd_client_message_cap comment +a48739d FileJournal: clarify meaning of start_seq and fix initialization +88ab841 Revert "global: call config observers on global_init (and start logging!)" +be801f6 mon: Use _daemon version of argparse functions +c76bbc2 ceph_argparse: add _daemon versions of argparse calls +d7b7ace Pipe: call discard_requeued_up_to under pipe_lock +4cb18b5 journaler: remove the unused prefetch_from member variable +3cdc61e mds: Keep LogSegment ref for openc backtrace +edc9ddf mds: fix journaler to set temp_fetch_len appropriately and read the requested amount +0031949 md_config_t: change from class to struct as the name indicates +1734742 rados.py: add docstrings for Ioctx::__aio_*_cb() +203915c rados.py: add more docstrings +3daf250 rados.py: add docstrings for *Error classes and others +2124a4b cephfs.py: add docstring for shutdown() and version() +94a1f25 rados.py: fix create_pool() +9adf2e9 rados.py: add some docstrings +29ae388 rados.py: chmod -x +059c512 pybind: unify make_ex() code in cephfs.py and rados.py +5559e1d pybind: add docstrings for make_ex() +471174b rbd.py: remove unnecessary semicolons +a309177 global: call config observers on global_init (and start logging!) +1e7ddd9 global: flush log before stopping/starting on daemonize +f5ba0fb mon: make 'osd crush move ...' idempotent +628e9ae librbd: fix DiffIterateStress again +aca0aea osd: throttle client messages by count, not just by bytes +f7070e9 msgr: add second per-message throttler to message policy +79b7144 librbd: fix DiffIterateStress test +b083dec rgw: translate object marker to raw format +be6961b Allow creation of buckets starting with underscore in RGW +6ef9d87 FileJournal: introduce start_seq header entry +f12a5ed FileJournal: fill in committed_up_to for old headers +e5cecd7 debian/ceph-test.install: add installed but not packaged files +a3a658d ceph.spec.in: add installed but not packaged files to ceph-test +8cf3319 ceph.spec.in: remove some twice created directories +6bc1488 ceph.spec.in: fix udev rules.d files handling +4b90a95 ceph.spec.in: use macros for standard directories +a8362f5 ceph.spec.in: reorder and fix ceph file list +6b80296 debian/ceph.install: no need to move files to usr/sbin/ +61a2be3 ceph.spec.in: don't move ceph-disk* and ceph-create-keys around +4d16f38 Makefile.am: install ceph-* python scripts to /usr/bin directly +354c41e ceph.spec.in: use %{_sbindir} instead of /usr/sbin +29f9db1 mon: fix crush unit tests for idempotency +336c4ae mds: verify mds tell 'dumpcache ' target does not exist +e6d4582 mon: make 'osd crush unlink ..' idempotent +0d6ddd9 mds: do not go through handle_mds_failure for oneself +c8cbec2 Makefile.am: fix build of ceph_test_cors +0ce09fa client: Kick waiters for max size +f9b7dff client: log inode when waiting on max size +85a77df mon: limit warnings about low mon disk space +ea7c6c6 librados: Fixes to list_snaps test changes +a793853 ceph-disk: CalledProcessError has no output keyword on 2.6 +b48d6b4 librados: test for EINVAL on bad list_snaps() ioctx snapid +65a6975 librados: set SNAP_DIR on listsnaps command +ccb47fd osd: fail with EINVAL if bad snapid set on list_snaps +ae67d37 librados: fix list_snaps() tests +8d3c7ff mon: make 'osd crush rm|unlink ...' idempotent +4e847e8 librbd: simplify diff_iterate calls to list_snaps +edc46a7 Fix comment typos +cfd32ff test_mon_config_key.py: fix 'del' to clean up correctly internally +5cf0c49 mds: initialize tableservers/clients on mds creation +1054c87 Revert "mds: trigger tableserver active/recovery hook even for self" +8a6438f README: fix dependency lists +0c16b31 Adds "mds fail 0" command to operations commmand reference. Partially fixes #2206, though better documentation will eventually be needed. +968c6c0 mds: trigger tableserver active/recovery hook even for self +c4eb7e6 ceph-disk: fix some (local) variable names +3dd8b46 ceph-disk: fix naming of local variable in is_mounted() +eaf31bf ceph-disk: merge twice defined function is_mounted(dev) +4c6d644 ceph-disk: define exception type +058eb92 ceph-disk: fix Redefining name 'uuid' from outer scope +0080d1d ceph-disk: add missing space after comma +b99b8cc rgw/rgw_user.cc: reduce scope of variable +ee7eae3 rgw/rgw_user.h: remove twice initialized purge_keys +6e9f478 test_cors.cc: prefer prefix ++operator for iterator +b4845a6 test_cors.cc: use static_cast instead of C-Style cast +e2c3511 test_cors.cc: use %u to format unsigned in sprintf() +bda21f7 rgw/rgw_user.cc: use 'true' directly instead of variable +84b1914 rgw/rgw_user.cc: reduce scope of same_email in execute_modify() +13abf32 rgw/rgw_user.cc: remove some unused std::string variables +4839cf2 rgw/rgw_cors_swift.h: prefer prefix ++operator for iterator +620ca6c rgw/rgw_op.cc: prefer prefix ++operator for iterator +275be10 rgw/rgw_op.cc: remove unsused variable +4a35cfd rgw/rgw_op.cc: use static_cast instead of C-Style cast +c662733 rgw/rgw_cors_s3.cc: prefer prefix ++operator for iterator +9850ed1 rgw/rgw_cors_s3.cc: remove unused variable +2136170 rgw/rgw_cors_s3.cc: use static_cast instead of C-Style cast +69f60d2 explain what an inline xattr is and how it relates to omap +7abba7b rgw/rgw_cors.cc: fix inefficient usage of string::find() +eb815bb rgw/rgw_cors.cc: prefer prefix ++operator for iterator +5479723 rgw/rgw_cors.cc: use empty() instead of size() == 0 +e1babf4 rgw/rgw_bucket.cc: prefer prefix ++operator for iterator +c9be9ff rgw/rgw_bucket.cc: remove unused variable +42109d3 rgw/rgw_user.h: initialize some bool variables in constructor +a5ce246 rgw/rgw_user.h: move initialization in initialization list +9b5f8a4 rbd.cc: use static_cast instead of C-Style cast +07be36c mds/Migrator.cc: prefer prefix ++operator for iterator +574051f unit tests for FileStore::_detect_fs when running on ext4 +aee6549 fix nspace assignment in LFNIndex::lfn_parse_object_name +dd19d69 rgw: Create RESTful endpoint for user and bucket administration. +aa14da2 doc/release-notes: v0.60 +fc13f11 PG::_scan_list: assert if error is neither -EIO nor -ENOENT +3fa3b67 FileStore: rename debug_delete_obj to debug_obj_on_delete +40070ce PG: _scan_list can now handle EIO on read, stat, get_omap_header +fcec1a0 ObjectStore: add allow_eio to read, stat, get_omap_header +76ad956 librados: test empty ObjectWriteOperation +690e4df Makefile.am: disable building ceph_test_cors when radosgw is not enabled +f26f7a3 (tag: v0.60) v0.60 +267ce0d librados: don't use lockdep for AioCompletionImpl +78acc5c test: fix signed/unsigned comparison in test_cors +d5b7970 PG: don't compare auth with itself +39d1a3f PG: pass authoritative scrub map to _scrub +a838965 PG: read_error should trigger a repair in _compare_scrub_objects +1940cf3 FileStore,OSD: add mechanism for injecting EIO, truncating obj +83dbfae PG::_select_auth_object: prefer a peer which did not hit a read error +e61c94e PG: make _select_auth_object smarter +a77eaec mds: bump the protocol version. +93ab1ed mds: don't roll back prepared table updates +2b0f03c mds: clear scatter dirty if replica inode has no auth subtree +3d3d85d mds: don't replicate purging dentry +44db980 mds: eval inodes with caps imported by cache rejoin message +9939ced mds: try merging subtree after clear EXPORTBOUND +5ceae8c mds: clear dirty inode rstat if import fails +d1602b3 mds: don't open dirfrag while subtree is frozen +fcf170b mds: notify bystanders if export aborts +7278f64 mds: fix export cancel notification +27438db mds: unfreeze subtree if import aborts in PREPPED state +4d532cb mds: check MDS peer's state through mdsmap +b439588 mds: avoid double auth pin for file recovery +e072d34 mds: add dirty imported dirfrag to LogSegment +a4ed7ea mds: send lock action message when auth MDS is in proper state. +7ad7c34 mds: issue caps when lock state in replica become SYNC +10b1a56 mds: share inode max size after MDS recovers +b2342a9 mds: take object's versionlock when rejoinning xlock +6862fe7 mds: reqid for rejoinning authpin/wrlock need to be list +d1a2574 mds: handle linkage mismatch during cache rejoin +ce0b74e mds: encode dirfrag base in cache rejoin ack +9f66d04 mds: include replica nonce in MMDSCacheRejoin::inode_strong +cbb38a1 mon: OSDMonitor: only output warn/err messages if quotas are set > 0 +01fd55a mds: remove MDCache::rejoin_fetch_dirfrags() +e62e48b mds: fix MDS recovery involving cross authority rename +3ab8663 mds: send resolve acks after master updates are safely logged +75346d8 mds: send cache rejoin messages after gathering all resolves +97bc0d2 mds: don't send MDentry{Link,Unlink} before receiving cache rejoin +e381bb3 mds: set resolve/rejoin gather MDS set in advance +ed85dd6 mds: don't send resolve message between active MDS +30dbb1d mds: compose and send resolve messages in batch +a6d9eb8 mds: don't delay processing replica buffer in slave request +1312716 mds: unify slave request waiting +ef9a4f6 mds: defer eval gather locks when removing replica +12e7c3d mds: avoid sending duplicated table prepare/commit +a5dce80 mds: make sure table request id unique +bb83a5d mds: consider MDS as recovered when it reaches clientreplay state. +7826814 client: always remove cond from list after waiting +8267bf5 librbd: fix size arg type for diff_iterate +b2b1034 PendingReleaseNotes: note about rbd progress output +f1f6407 test_librbd: add diff_iterate test including discard +e88fe3c rbd.py: add some missing functions +c0e3f64 librbd: add C and python bindings for diff_iterate +e83fd3b librados: don't insert zero length extents in a diff +52097d3 rbd: add formatted output to diff command +33d1a2f librbd: return -ENOENT from diff_iterate when the snap doesn't exist +6a04a7f rbd: initialize random number generator for bench-write +c680531 librbd: change diff_iterate interface to be more C-friendly +8a1cbf3 rbd: remove alway-true else condition in import-diff +d86fb04 rbd: make diff banner length depend on the banner +c499caf mkcephfs: warn that mkcephfs is deprecated in favor of ceph-deploy +677867d qa: workunits: mon: test 'config-key' store +c0e5c22 rbd: fail import-diff if we reach the end of the stream sooner than expected +09898ff rbd: complete progress for import-diff from stdin +a0fca08 rbd: fix else style in import-diff +2ec87e6 rbd: update progress as a diff is exported +f0ddf6c rbd: remove unused argument from do_diff() +ef49385 rbd: fix size change output +88706ab rbd: send progress info to stderr, not stdout +325a337 rbd: include 'diff' command in man page +64a202a rbd: update man page for import-diff and export-diff +f67f62a rbd: prevent import-diff if start snapshot is not already present +9946c69 rbd: fail import-diff if end snap already exists +5b0c68b doc/dev/rbd-diff: specify that metadata records come before data +3694968 librbd: implement image.snap_exists() +c5bd978 librados: move snap_set_diff to librados/ +6af769a librados: cleanly define SNAP_HEAD, SNAP_DIR constants +10dc0ad librados: document list_snaps +be8927f librbd: drop unused elapsed calc for diff_iterate +f0c9a20 librbd: diff_iterate fromsnapname after the end snap is also invalid +a69532e librbd: document diff_iterate in header +d0baadb librbd: uint64_t len for diff_iterate +7bbaa71 doc/dev/rbd-diff: update incremental file format +44e295a qa: rbd/diff_continuous.sh: use non-standard striping +39689fe librbd: fix diff_iterate arithmetic for non-standard striping +f2b0880 qa: rbd/diff_continuous.sh: base test off a clone +fc3f4fd rbd: implement simple 'diff' command +4d02e17 librbd: handle diff from clone +186ddda rbd: send import debug noise to dout, not stdout +58c2ded qa: add rbd/diff_continuous.sh stress test +e716743 rbd: implement 'export-diff' and 'import-diff' commands +cf7d13a rbd: add --io-pattern option to bench-write +0296c7c librbd: implement diff_iterate +6db5109 librados: expose snapset seq via list_snaps +ebed000 osdc/Objecter: prval optional for listsnaps +4ae9774 osd: fix error codes for list-snaps +941cfc2 osd: fix clone snap list for list-snaps +ceee218 osd: wait for all clones on SNAPDIR requests +556d334 osd: direct reads on SNAPDIR to either head or snapdir +b64bb5f osd: do not include snaps with head on list_snaps() +01b7420 osd: clean up some whitespace +0074228 osd: include SnapSet seq in the list snaps response +fa5206c osd: make LIST_WATCHERS and LIST_SNAPS print nicely for OSDOp +849a45c strings: add 'list-watchers' to MOSDOp strings +a2956f6 rgw: fix warning +01779df rgw: add missing include file +3c52b8b Makefile.am: change some cors rules +e1a78f9 rgw: fix a few warnings +d4b22f3 rgw: more cors fixes +e9e86ad rgw: cors, style fixes, other fixes +f165049 rgw: with CORS support +c01e2e4 client: do sync read when 'client oc = false' +74c7083 client: fix use-after-free on session close and cond signals +4ad35b2 mds: mark connection down when MDS fails +fbcc64d mds: fix MDCache::adjust_bounded_subtree_auth() +573a4ae mds: process finished contexts in batch +5cbaae6 mds: preserve subtree bounds until slave commit +c344ff1 fix null character in object name triggering segfault +e611937 mon: OSDMonitor: add 'osd pool set-quota' command +9532808 doc: Added entries for Pool, PG, & CRUSH. Moved heartbeat link. +bcc5c65 doc: Added heartbeat configuration settings. +6157d68 doc: Moved PG info to separate page. Moved heartbeat to mon-osd doc. +ca77aab doc: Rewrote monitor configuration section. +ea3c833 doc: Moved to separate section for parallelism. +ba73b83 doc: Cleanup. +e9b3f2e ceph-disk list: say 'unknown cluster $UUID' when cluster is unknown +9e7ddf6 config_opts: fix rgw_port comments to be plaintext +3da3129 ReplicatedPG: check for full if delta_stats.num_bytes > 0 +9b09073 mon: Monitor: check if 'pss' arg is !NULL on parse_pos_long() +e2a936d common: util: add 'unit_to_bytesize()' function +23c2fa7 osd: osd_types: add pool quota related fields +655a950 PG::_scan_list: record read errors in the Scrubmap::object +dab3dac osd_types: add read_error flag to Scrubmap::object +562e171 ceph-disk: handle missing journal_uuid field gracefully +4c4d559 librados: move snapc creation to caller for aio_operate +3cbd036 client: update cap->implemented when handling revoke +4f8ba0e msgr: allow users to mark_down a NULL Connection* +2da57d7 debian: Add git to Build-Depends (need by check_version script) +8f5c665 debian: Run wrap-and-sort from devscripts +972f0eb unit test LFNIndex::remove_object and LFNIndex::lfn_unlink +d15c152 ceph_json: add missing include file +9a07ee3 ceph_json: add template specializations +6a65b91 ceph-disk: implement 'list' +b982516 ceph.spec.in: Add python-argparse dependency +a021ce6 mon: ConfigKeyService: stash config keys on the monitor +e950ed0 ceph.spec.in: Move four scripts from sbin to usr/bin +06a1e9c ceph: propagate do_command()'s return value to user space +e91405d ceph: propagate do_command()'s return value to user space +f804892 PG: update PGPool::name in PGPool::update +1993c2a PG: use int64_t for pool id in PGPool +91a8d93 OSD: flush pg osr on shutdown prior to put() +f1d1f11 librbd: increment version for new functions is_complete() and aio_flush() +302b93c librbd: add an async flush +860493e librbd: use the same IoCtx for each request +2ae3206 librbd: add an is_complete() method to AioCompletions +f06debe librados: add versions of a couple functions taking explicit snap args +7cc0940 librados: add async flush interface +fa27156 librados: increase version number to indicated new functions +553aaac ObjectCacher: remove unneeded var from flush_set() +41568b9 ObjectCacher: remove NULL checks in flush_set() +92db06c ObjectCacher: always complete flush_set() callback +03ac01f librbd: make aio_writes to the cache always non-blocking by default +c212504 ObjectCacher: optionally make writex always non-blocking +bf7cbdf rados: remove confusing argument echo on error +f891d5a rgw_json_enc.cc: use static_cast instead of C-Style cast +8d957c1 rgw/rgw_admin.cc: remove double checks from get_cmd() +c8ac1ee unit test LFNIndex::lfn_get_name +b9c8d4f librados.h: fix comment describing rados_pool_list +613b708 librbd: flush cache when set_snap() is called +2429446 radosgw-admin: fix help clitest +10626f7 mon: MonitorDBStore: add 'get_iterator()' method to iterate over a prefix +d3e4904 ceph-disk: reimplement list_all_partitions +20d594a ceph-disk: reimplement is_partition +d89a63c doc: Updated usage. +bc72492 doc: Updated usage. +4362934 ceph-disk: conditionally remove mount path +2ae297c ceph-disk: ignore udevadm settle return code +9844500 upstart: try udevadm settle if osd journal isn't present +89c6901 osd: disallow classes with flags==0 +f2dda43 osd: EINVAL when rmw_flags is 0 +50b831e osd: fix detection of non-existent class method +b0103ab OSD fails to start with error assert(values.size() == 2) +4db4a02 Fix radosgw upstart job +5aa5bc2 mds: Delay session close if in clientreplay +9369f91 Change ceph::apt -> ceph::repo in doc +98f6a25 mkcephfs.in: use 32 chars for mktemp to be more unique +2cb9f96 mkcephfs.in: cleanup rdir in MON case +a8338ee mkcephfs.in: provide a valid rdir for MONs on -a +38f845d mkcephfs.in: use mktemp instead of dd+md5sum+awk +0e009b1 mds: Clear backtrace updates on standby_trim_seg +0c43ac3 ceph_common.sh: fix typo in comment +17029a6 java libcephfs: add serialVersionUID to some Exception classes +10191a9 CephMount.java: remove unused import +8c962b5 MDS.cc: remove double is_clientreplay() check in active_start() +3f2e711 mon: fix crush_ops.sh tests +76b296f ReplicatedPG: send entire stats on OP_BACKFILL_FINISH +503ed9e testing: fix hadoop-internal-test +7c1e9be client: Don't signal requests already handled +77230d4 fix append to uninitialized buffer in FlatIndex::created +9eda8e5 ceph-disk: udevadm settle before partprobe +14cef27 mds: CInode::build_backtrace() always incr iter +bb68a20 java: fix test name typo +b9141e9 client: Cleanup request signaling +3b520b5 client: Handle duplicate safe replies +dfb46b9 client: Always cleanup request after safe +4dda138 client: Remove got_safe from MetaRequest +f957e72 CrushWrapper.cc: remove some std::string::c_str() calls +7f65c51 doc/release-notes: extra note for v0.56.4 +82b129f doc/release-notes: v0.56.4 +491795e Improve test by getting cloneid from my_snaps vector +70e0ee8 rgw: bucket index ops on system buckets shouldn't do anything +b7d7e68 ceph-disk: rename some local variabels in list_*partitions +0b5fcff ceph-disk: fix naming of a local variable in find_cluster_by_uuid +8a999de ceph-disk: rename some constants to upper case variable names +86e55f5 ceph-disk: add some more docstrings +543327b ceph-disk: print subprocess.CalledProcessError on error +2d26bcc ceph-disk: fix indention +9db05a2 java: pretty print Ceph extent +486e5b9 java: support ceph_get_osd_addr +bc65ace java: support ceph_get_osd_crush_location +60fe136 java: support ceph_get_file_extent_osds +78fd096 PendingReleaseNotes: mention renamin of cluster to zone +ece4348 client: don't set other if lookup fails in rename +836b97f test/libcephfs: Test rename error cases +8e6a970 client: Fix rename returning ENOENT for dest +3f5f432 MDSMap: improve health check +e77cd59 MDSMap:: constify a bunch of methods +838f1cd preserve /var/lib/ceph on deb/rpm purge +4f2051c mon: factor out _get_pending_crush() helper +eae1532 mon, crush: add some tests to build a DAG via the cli +a60d7df crush, mon: unlink vs remove +b54db77 crush: fix remove_item on bucket removal +d8f4be6 mon: add 'osd crush add-bucket ' +96e08ef mon: allow removal of buckets via 'osd crush rm ...' +683f745 crush: change find_roots(); add find_takes() +751b4bf mon: add optional ancestor arg to 'ceph osd crush rm [ancestor]' +ee6b993 crush: add remove_item_under() +6cba563 mon: 'ceph osd crush link ...' to add a link to an existing bucket +fe4e86c crush: prevent formation of a loop +a54a411 crush: add link_bucket() +05dac04 mon: 'ceph osd crush add ...' to add a second link to an item +78d8faf rgw: zone info is configurable +4fe4dea PG::GetMissing: need to check need_up_thru in MLogRec handler +d611eba PG,osd_types: improve check_new_interval debugging +c524e2e common/MemoryModel: remove logging to /tmp/memlog +6a7ad2e init-ceph: clean up temp ceph.conf filename on exit +0517345 init-ceph: push temp conf file to a unique location on remote host +f463ef7 mkcephfs: make remote temp directory name unique +853dd35 doc: Added {id} argument to OSD lost. +020fb1a rgw: s/cluster/zone +8bd7915 rgw: generic decode_json for containers +b07f3cd rgw: add encode_json +96ad9b1 moved rgw/rgw_json.* common/ceph_json.* +53ba6c2 rgw: rgw_jsonparser changes +da33701 rgw: decode RGWUserInfo using decode_json +959b658 rgw: introduce decode_json to easily decode json structures +6d63752 ceph-disk: re-add python 2.7 dependency comment +38a5acb osd: reenable 'journal aio = true' +e5940da os/FileJournal: fix aio self-throttling deadlock +6c79604 test/test_snap_mapper.cc: remove twice included +00cf817 mon/MDSMonitor.cc: remove twice included MonitorDBStore.h +a583029 mon/LogMonitor.cc: remove twice included +9dd5b20 mon/AuthMonitor.cc: remove twice included +1144260 common/Formatter.h: remove twice included +000310f ReplicatedPG: add debug flag to skip full check at reservation +29a288f ReplicatedPG: replica should post BackfillTooFull in do_scan if full +f9c8190 PG: halt backfill on RemoteReservationRejected in Backilling +022903b PG: add helper for adding a timer event to retry backfill +3ab4a09 PG: add BackfillTooFull event for RepRecovering +cd73539 PG: add helper for rejecting backfill reservation +33aaea5 PG: use OSDService::too_full_for_backfill in RepWaitBackfillReserved +cec3d82 OSDService: add too_full_for_backfill +fab0be1 Makefile: add MOSDMarkMeDown +7bfaaf7 OSD: notify mon prior to shutdown +a2dba95 Monitor: add MOSDMarkMeDown support +edebb34 OSDMonitor: factor out check_source helper +b8929c4 messages: add MOSDMarkMeDown +bb12522 OSD: clear OpHistory on shutdown +51ae509 OpRequest: use OpRequestRef for OpHistory +210ecc5 FileStore::stat: valgrind: don't read *st on error +6119f29 shared_cache: clear lru in destructor +95e9322 ceph_osd: clear client_throttler prior to putting g_ceph_context +8d43a2e OSD: reorder OSD::shutdown +505bebb OSD: check for is_stopping after locking osd_lock or heartbeat_lock +9d076a0 OSD: lookup_lock_raw_pg is dead +e41554d OSD: rename timer to tick_timer +30b7a15 OSD: move backfill_request_timer cleanup to OSDService::shutdown +264cd3e ReplicatedPG,OSD: move dequeueing into on_shutdown +eb8dd0d PG: clarify PG::deleting comment +71ec9c6 mon: AuthMonitor: delete auth_handler while increasing max_global_id +42a71c1 FileJournal: quieter debugging on journal scanning +6740d51 FileJournal: quieter debugging on journal scanning +7e8cc57 doc: Fixed some typos. +7698500 libcephfs: fix ceph_get_osd_crush_location +a72aaff test: add ceph_rename test +7ed0be1 rados.py: remove unnecessary semicolon +cffc2d5 rados.py: fix bad indention +9496622 rados.py: remove lenght modifier 'l' on format string +d81d2c0 rados.py: fix 'Rados' has no member 'name' +4e2557a crush: allow an item to be inserted twice +14f2674 crush: use const string& args +eed8d53 rados.py: add missing space after ',' +e2df59e ceph-create-keys: rename log to LOG since it's a constants +17d4a7c doc/release-notes: v0.59 +541cd3c msg/Pipe: fix seq handshake on reconnect +ac9fa43 Fix tips in documentation +cd96dbe Fix important in documentation +3305157 Fix notes in documentation +e485471 Update Chef deployment documentation +97fd7b6 mon: DataHealthService: log to derr instead if we're about to shutdown +51d62d3 mon: DataHealthService: shutdown mon if failed to obtain disk stats +5bf0331 client/Client.cc: handle error if _lookup() fails +fc41684 qa/workunits/direct_io/test_sync_io.c: add proper error handling +a8a5683 test_short_dio_read.c: add proper error handling +f9c108c mds/Locker.cc: prefer prefix ++operator for iterators +4151630 mount/mount.ceph.c: remove unused variable +87691dc ceph-disk: cast output of subprocess.Popen() to str() +c29812c mon: Monitor: clearer output on error during attempt to convert store +3575feb ceph-disk: fix adjust_symlink() replace 'journal' with 'target' +a27cb85 ceph-disk: fix adjust_symlink() replace 'canonical' with 'path' +6d3247b ceph-disk: there is no os.path.lstat use os.lstat +97b4f8d ceph-disk: remove unused variable key from prepare_journal_dev() +9daf6cf ceph-disk: fix except to catch OSError +0ada43f ceph-disk: add missing space after >> operator +d3c60dc fix: Redefining name 'uuid' from outer scope (line 14) +6a8120d ceph-disk: remove unused variables from list_partitions() +3af7a1a ceph-disk: fix /dev/dm-[0-9] handling list_all_partitions() +cbae6a4 (tag: v0.59) v0.59 +9bcf5b6 ceph-disk: rename local variable shadowing builtin +4adf088 ceph-disk: remove twice defined identical function unmount +ea26ea0 ceph-disk: remove twice defined function mount +c57daa3 ceph-disk: remove double defined function get_conf +57dde5c ceph-disk: rename local variable shadowing builtin +dfb1fbe QuorumService.h: use enum instead of static const int +6a3aa2a Missed adding rados_types.hpp to package +c2602d7 ceph-disk: install and package +f287c6f ceph-disk: simplify command dispatch +a019753 ceph-disk: consolidate exceptions +20e4ba5 ceph-disk: consolidate ceph-disk-* into a single binary +2900bf4 PendingReleaseNotes: fix typo +1597b3e librbd: optionally wait for a flush before enabling writeback +47f1a94 Makefile: missing header +020d1b1 mon: use enum instead of static const int +efc4b12 mon/Paxos: set state to RECOVERING during restart +45843f7 Makefile.am: fix misspelt header name +bee5046 mon/PaxosService: handle non-zero return values +d477594 ceph-disk-prepare: 'mkfs -t' instead of 'mkfs --type=' +9029b09 mds: Handle ENODATA returned from getxattr +7aec13f mon/PaxosService: fix proposal waiter handling +6774290 Makefile: fix header name +cecfe41 mon: Monitor: take advantage of the new HealthMonitor class. +b781400 mon: HealthMonitor: Keep track of monitor cluster's health +a3751d1 mon: QuorumService: Allow for services quorum-bound to be easily created +a2ac935 qa: add 16MB direct-io write test +53c1c48 signal_handler: add func to queue an async signal +a13ae37 client: Remove unecessary set_inode() in _rmdir() +5e5e1cd mon/Session.h: prefer prefix ++operator for iterators +ffaf286 test/filestore/workload_generator.cc: prefer prefix ++operator for iterators +37fd66e test/filestore/test_idempotent.cc: prefer prefix ++operator for iterators +7258051 test/filestore/test_idempotent.cc: fix ~TestFileStoreState() +80615f6 test/test_snap_mapper.cc: prefer prefix ++operator for iterators +ed159c4 test/osd/RadosModel.h: prefer prefix ++operator for iterators +0535e1f test/filestore/TestFileStoreState.cc: prefer prefix ++operator for iterators +2a04a9b test/xattr_bench.cc: prefer prefix ++operator for iterators +28354c0 test/osd/Object.cc: prefer prefix --/++operator for iterators +ed4a0fa test/encoding/ceph_dencoder.cc: prefer prefix ++operator for iterators +a8f6b76 test/bench/bencher.h: prefer prefix ++operator for iterators +e94cbee ObjectMap/test_object_map.cc: prefer prefix ++operator for iterators +f56d484 tools/rest_bench.cc: prefer prefix ++operator for iterators +58d07ad tools/common.cc: prefer prefix ++operator for iterators +6ba964f ceph-filestore-dump.cc: prefer prefix ++operator for iterators +12a44bc rgw/rgw_user.cc: prefer prefix ++operator for iterators +424bce9 rgw/rgw_rest_swift.cc: prefer prefix ++operator for iterators +360191f osd/OSDMap.cc: prefer prefix ++operator for iterators +5fe46a3 mds/MDCache.cc: prefer prefix ++operator for iterators +51a2d78 mds/CInode.cc: prefer prefix ++operator for iterators +d0a1632 client/Client.cc: prefer prefix ++operator for iterators +c091dcc auth/AuthMethodList.cc: fix remove_supported_auth() +a96a1cc mds/mdstypes.h: prefer prefix ++operator for iterators +3967ce4 rgw/rgw_rados.cc: make sure range_iter != ranges.end() +5b8a505 rados.cc: prefer prefix ++operator for iterators +006a70d rgw/rgw_rados.cc: prefer prefix ++operator for iterators +272ebf3 rgw/rgw_admin.cc: prefer prefix ++operator for iterators +c4cc2e8 rgw/rgw_acl_s3.cc: prefer prefix ++operator for iterators +a740eef osdmaptool.cc: prefer prefix ++operator for iterators +d5f6073 osdc/Striper.cc: prefer prefix ++operator for iterators +4d46efa osdc/Objecter.cc: prefer prefix ++operator for iterators +f0ed8c4 osdc/ObjectCacher.cc: prefer prefix ++/--operator for iterators +da438aa osdc/ObjectCacher.h: prefer prefix ++operator for iterators +d0df3da osdc/Objecter.h: prefer prefix ++operator for iterators +060d2d5 osdc/Filer.h: prefer prefix ++operator for iterators +844671e osdc/Filer.cc: prefer prefix ++operator for iterators +49c5470 osd/osd_types.cc: prefer prefix ++operator for iterators +273517a osd/SnapMapper.cc: use empty() instead of size() == 0 +10b0839 osd/ReplicatedPG.cc: prefer prefix ++operator for iterators +293bb07 osd/PG.cc: prefer prefix ++operator for iterators +cdfce02 osd/OSDMap.cc: prefer prefix ++operator for iterators +812ca21 osd/OSD.cc: prefer prefix ++operator for iterators +7647003 os/LFNIndex.cc: prefer prefix ++operator for iterators +c089f5d mds/Migrator.cc: prefer prefix ++operator for iterators +d777e5a os/JournalingObjectStore.cc: prefer prefix ++operator for iterators +16fa6f1 os/FlatIndex.cc: prefer prefix ++operator for iterators +b374a3a os/FileStore.cc: prefer prefix ++operator for iterators +9704dde msg/Pipe.cc: prefer prefix ++operator for iterators +62f00f0 msg/Pipe.cc: prefer prefix ++operator for iterators +d7936e8 mon/OSDMonitor.cc: prefer prefix ++operator for iterators +344feba mds/journal.cc: prefer prefix ++operator for iterators +d2026a9 mds/events/EMetaBlob.h: prefer prefix ++operator for iterators +18b4a17 mds/SnapRealm.cc: prefer prefix ++operator for iterators +206cd8d mds/Migrator.cc: prefer prefix ++operator for iterators +2b902b3 mds/MDCache.cc: prefer prefix ++operator for iterators +55e8bcc mds/CDir.cc: prefer prefix ++operator for iterators +7a3e2ee librados/librados.cc: prefer prefix ++operator for iterators +ebd959b kv_flat_btree_async.cc: prefer prefix ++operator for iterators +566b60b common/Finisher.cc: prefer prefix ++operator for iterators +ba5c935 mds: Add config option for log segment size +2678db5 qa/workunits/restart: Add test to check backtrace +85057e9 mds: Add kill points for backtrace testing +acae3d0 pybind/cephfs: Add initial py wrappers for cephfs. +0c74475 mds: Cleanup new segment conditionals +8b79886 mds: Backtrace for create,rename,mkdir,setlayout +4d0448f mds: New backtrace handling +62d12d8 message/mds: Fix client reconnect decode +fb07745 include/elist: Fix clear() to use pop_front() +b8fb2ee dencoder: Add inode_backtrace_t to types +9e13886 mds: Use map for CInode pinrefs +fc80c1d client: Ensure inode/dentries are ref counted +f8d66e8 OSD: split temp collection as well +5b022e8 hobject: fix snprintf args for 32 bit +9ea02b8 ceph_features: fix CEPH_FEATURE_OSD_SNAPMAPPER definition +ee178fb ceph.spec.in: Additional clean-up on package removal +65c31e1 ceph-fuse: invalidate cache by default +f3ad12e test_filejournal: add tests for footer, header, payload corruption +a22cdc6 FileJournal: add testing methods to corrupt entries +3b767fa FileJournal,Journal: detect some corrupt journal scenarios +cf00930 FileJournal::wrap_read_bl: convert arguments to explicit in/out arguments +c3725e9 FileJournal: add committed_up_to to header +4aa0f8a FileStore: add more debugging for remove and split +de8edb7 FileJournal: queue_pos \in [get_top(), header.max_size) +f1b031b OSD: expand_pg_num after pg removes +8222cbc PG: ignore non MISSING pg query in ReplicaActive +11650c5 mon: only try to bump max if leader +80af5fb ceph-disk-activate: identify cluster .conf by fsid +6f15dba debian/control: Fix for moved file +7370b55 ceph-disk-activate: abort if target position is already mounted +18525eb rados/test.sh fails in the nightly run +efd153e debian: add start ceph-mds-all on ceph-mds install +41897fc debian: add start ceph-mds-all on ceph-mds install +47378d6 libcephfs: add ceph_get_osd_addr interface +b6102c0 Revert "ceph-disk-activate: rely on default/configured keyring path" +3e628ee Revert "ceph-disk-activate: don't override default or configured osd journal path" +282d3aa monmaptool.cc: prefer prefix ++operator for iterators +0c5532c mon/PGMonitor.cc: prefer prefix ++operator for iterators +01c6a7e mon/MonmapMonitor.cc: prefer prefix ++operator for iterators +45a3d0c mon/Monitor.cc: prefer prefix ++operator for iterators +a26a9f7 mon/MonMap.cc: prefer prefix ++operator for iterators +a6c4543 mon/MDSMonitor.cc: prefer prefix ++operator for iterators +a66170d mon/LogMonitor.cc: prefer prefix ++operator for iterators +23ce79f mon/AuthMonitor.cc: prefer prefix ++operator for iterators +ab0dac1 mds/mdstypes.cc: prefer prefix ++operator for iterators +c0506c2 mds/SnapServer.cc: prefer prefix ++operator for iterators +823a56f mds/SnapServer.h: prefer prefix ++operator for iterators +6127f43 mds/SnapServer.h: prefer prefix ++operator for iterators +e98432c mds/Mutation.cc: prefer prefix ++operator for iterators +e317a97 mds/MDSTableServer.cc: prefer prefix ++operator for iterators +d0a0ee5 mds/MDSTableClient.cc: prefer prefix ++operator for iterators +f8825a3 mds/MDSMap.cc: prefer prefix ++operator for iterators +3ff204e mds/MDS.cc: prefer prefix ++operator for iterators +865d7a8 mds/MDLog.cc: prefer prefix ++operator for iterators +6735383 mds/MDCache.cc: prefer prefix ++operator for iterators +ce8060e mds/MDBalancer.cc: prefer prefix ++operator for iterators +180d93a mds/Locker.cc: prefer prefix ++operator for iterators +f2452b1 mds/MDCache.h: prefer prefix ++operator for iterators +a42e9ef mds/CInode.cc: prefer prefix ++operator for iterators +1e60fcf mds/CDir.cc: prefer prefix ++operator for iterators +d0d8929 mds/AnchorServer.h: prefer prefix ++operator for iterators +8b96655 mds/AnchorServer.cc: prefer prefix ++operator for iterators +1525053 mds/AnchorClient.cc: prefer prefix ++operator for iterators +f4a78a2 librbd/internal.cc: prefer prefix ++operator for iterators +2ef97a6 librbd/ImageCtx.cc: prefer prefix ++operator for iterators +7332796 librados/RadosClient.cc: prefer prefix ++operator for iterators +5ac012a librados/IoCtxImpl.cc: prefer prefix ++operator for iterators +ab46e6d libcephfs.cc: prefer prefix ++operator for iterators +e8d59d5 kv_flat_btree_async.cc: prefer prefix ++operator for iterators +46c0d9c key_value_store/cls_kvs.cc: prefer prefix --operator for iterators +e2776a9 crush/CrushWrapper.cc: prefer prefix ++operator for iterators +9a1b863 crush/CrushCompiler.cc: prefer prefix --operator for iterators +381bee3 common/lockdep.cc: prefer prefix ++operator for iterators +60cedb1 client/SyntheticClient.cc: prefer prefix ++operator for iterators +31a3645 mon: refuse "mon remove" if only one mon left +f56620b osd: data loss: low space handling +ce7ee72 ceph_common.sh: Fix sed regex in get_local_daemon_list +8c774aa rbd: clean up do_import() a bit +8d8f892 Simplify may_write() +388616b OSD: remove snap_mapper entries in RemoveWQ +3177cb8 PG: check and repair snap_mapper entries during scrub +8665839 OSD,PG: add upgrade procedure for snap_mapper +8631e92 osd/: Integrate SnapMapper with OSD +8db029d Makefile: add SnapMapper to osd +354f33d test/: add tests for map_cacher +580ea54 osd/: add SnapMapper +2f9e369 common/: add map_cacher +984c0c3 common/shared_ptr.hpp: add get_next and expose VPtr and WeakVPtr types +4ac16ec filestore: add debug option to verify split results +03e5330 DBObjectMap, hobject: add helpers for pgid bit matching +0b436ab ObjectStore: add Context management to Transaction +f6500f5 Context: allow C_Contexts to not have a cct, add list_to_context +7db2a51 ObjectStore: move queue_transaction into ObjectStore +78db663 osd_internals/snaps.rst: update description to reflect SnapMapper +ba449ce osd_internals/snaps.rst: add a description of snaps and trimming +be95af7 PG::read_log: fix assert, split may introduce holes in the log +1a8c170 OSD: add debugging to start_split and complete_split +de22b18 PG: check_recovery_sources must happen even if not active +7a434d1 FileStore: fix reversed collection_empty return value +ce4432a HashIndex: _collection_list_partial must tolerate NULL next +e4bf1bc OSD: lock not needed in ~DeletingState() +32bf131 ReplicatedPG: don't leak reservation on removal +3091283 rbd: remove fiemap use from import +8123a1f mds: log session resets more cleanly +311704f mds: use session con ref to mark down killing session +dcda366 mds: mark con for closed session disposable +5c9186c mds: useless cleanup +2b55470 mds: mark_down old sessions using con +ca89cf5 client: fix kick_flushing_caps() args +e35d19b client: clean up useless MetaSession lookups +e6f04db client: fix trim_caps() args +ca5d68a client: fix wake_inode_waiters() arg +bc2a2eb client: validate/lookup mds session in each message handler +ced92b0 client: fix remaining s->inst users to use s->con +1ab8ff9 client: remove unused MetaSession::was_stale +6d1040b client: only signal session waiters on open and close +f8272c0 client: use Connection* in MetaSession instead of the inst/addr +dea707b client: use session->inst where possible +41f8b61 client: drop unused release_lease() +6fca300 client: pass session to send_reconnect and resend_unsafe_requests +90b3014 client: switch kick_requests and send_request to take a session * +6d0b7c8 client: handle ESTALE redirection in make_request(), not reply handler +80e81ec client: fix up _closed_mds_session +72d1184 client: use helper for _close_mds_session() +3975774 mds: flush log when we hit xlock during path traversal +e47d490 client: instantiate MetaSession for opening connections +5f2efe6 client: pass around MetaSession* instead of int mds +cee8786 client: check for mds state before sending messages +1779d39 mon: increase max_global_id before we hit the wall +4637752 mon: simplify assign_global_id() +436e5be mon: AuthMonitor: don't return global_id right away if we're increasing it +b99367b mon: Paxos: only finish a queued proposal if there's actually *any* +7710ee2 auth: assert if auth_debug = true and secret_id == 0 +8659b7e libcephfs_jni.cc: prefer prefix ++operator for iterators +bc77af7 dupstore.cc: prefer prefix ++operator for iterators +f6b4f3e crushtool.cc: prefer prefix ++operator for iterators +c4810a5 libcephfs_jni.cc: fix indention +6802f27 doc: Added libvirt config comments for discard granularity. +8872531 rgw: set up curl with CURL_NOSIGNAL +4056552 src/crush/CrushTester.{cc,h}: prefer prefix ++operator for iterators +acac2be common/pick_address.cc: prefer prefix ++operator for iterators +1fc0b4d common/buffer.cc: prefer prefix ++operator for iterators +7feec80 common/WorkQueue.cc: prefer prefix ++operator for iterators +ae9fdfd LogEntry.h: prefer prefix ++operator for iterators +74198cc common/LogClient.cc: : prefer prefix ++operator for iterators +5c7b603 client/SyntheticClient.cc: prefer prefix ++operator for iterators +20dbd13 osd/osd_types.h: prefer prefix --/++operator for iterators +e047260 osd/PG.h: prefer prefix ++operator for iterators +f59f644 osd/OSD.h: prefer prefix ++operator for iterators +5e016d9 client/Client.cc: prefer prefix ++operator for iterators +8998c9f ceph_syn.cc: prefer prefix ++operator for iterators +b94f4b3 mon/Session.h: prefer prefix --operator for iterators +1e89f74 mon/Session.h: prefer prefix ++operator for iterators +69d1eab mds/SnapRealm.h: prefer prefix ++operator for iterators +62d33e9 mds/SessionMap.h: prefer prefix ++operator for iterators +d3f9673 mds/MDSMap.h: prefer prefix ++operator for iterators +89ffc64 mds/CInode.h: prefer prefix ++operator for iterators +bd4f1a3 msg/Messenger.h: prefer prefix ++operator for iterators +95749b3 MonMap.h: prefer prefix ++operator for iterators +6ae0345 buffer.h: prefer prefix ++operator for iterators +5d401b0 types.h: prefer prefix ++operator for iterators +81e00c1 auth/Crypto.cc prefer prefix ++operator for iterators +af3b163 doc: Fixed syntax error. +be6f7ce doc: Added tcp and bind settings and cleaned up syntax a bit. +77ecdc7 doc: Setting should use network not single IP. +669d2ba doc: Fixed usage and added note for copying keyring to client. Added hyperlinks. +7f66ebe doc: Addressed confusion with version numbering. +4df44bb doc: Added troubleshooting entry for single OSD and single replica. +36c672d Fix typo in ceph usage output +60639ab mon/Monitor.h: return string instead of 'char *' from get_state_name() +72c6226 client/hadoop/CephFSInterface.cc: prefer prefix ++operator for iterators +5ad2460 cls/rgw/cls_rgw.cc: prefer prefix --operator for iterators +7a31085 client/Inode.cc: prefer prefix ++operator for iterators +822c67e SyntheticClient.h: prefer prefix ++operator for iterators +0f48638 CephxKeyServer.h: prefer prefix ++operator for iterators +b1437a8 auth/Auth.h: prefer prefix ++operator for non-primitive types +64dca11 tools/rest_bench.cc: remove unused variable +9b51c25 test/test_filejournal.cc: use %u to format unsigned in sprintf() +5e882db test/system/st_rados_list_objects.cc: remove not needed statement +ae15b2f test/osd/RadosModel.h: remove unused variables +faab0e8 test/osd/Object.cc: catch exception by reference +4762fac test/omap_bench.cc: remove unused variables +b77454c test_mon_workloadgen.cc: remove unused variables +3cb9b35 test/librados/aio.cc: use static_cast instead of C-Style cast +a6bd658 test/encoding/ceph_dencoder.cc: use static_cast instead of C-Style cast +8dc0a32 bench/dumb_backend.h: remove never executed delete statement +3072902 test_object_map.cc: use %u to format unsigned in snprintf() +a19a2a1 test_keyvaluedb_iterators.cc: remove unused variable +08bf10b rgw/rgw_xml.cc: use static_cast instead of C-Style cast +03e0308 rgw/rgw_user.cc: remove unused variables +69cb92e rgw/rgw_rest_usage.cc: remove unused variables +3894205 rgw/rgw_rest_s3.cc: remove unused variables +f8a9fec rgw/rgw_rados.cc: perform initialization of prefix in initialization list +a37d71d rgw/rgw_rados.cc: remove unused variables +c6becc6 rgw/rgw_rados.cc: use static_cast instead of C-Style cast +579d4ad testing: update wordcount to new code layout. +09fa711 testing: fix hadoop-internal-tests +936b8f2 ceph-disk-activate: rely on default/configured keyring path +813e9fe ceph-disk-activate: don't override default or configured osd journal path +f8bc21a crush: add test for reweighting multiple items in the tree +9eb0d91 debian: stop ceph-mds before uninstalling ceph-mds +c021c5c log: drop default 'log max recent' from 100k -> 10k +46e8fc0 librbd: invalidate cache when flattening +f2a23dc ObjectCacher: add a method to clear -ENOENT caching +f6f876f ObjectCacher: keep track of outstanding reads on an object +28c0ce6 crush: make item adjust weight adjust *all* instances of the item +b3b059e crush: whitespace +c48c76f ceph: fix cli test +2450db1 Revert "Use start-stop-daemon --chuid option to setuid to www-data." +a52c48d mon: Paxos: increase trim tolerance from 3 to 30. +41987f3 mon: Paxos: bootstrap leader if he has fallen behind upon reaching collect +8ce26ea Document scrubbing behavior +a99ed03 Use start-stop-daemon --chuid option to setuid to www-data. +44f1cc5 Fix radosgw actually reloading after rotating logs. +c846e5c rgw/rgw_op.cc: remove unused variables +7e65048 rgw/rgw_op.cc: use static_cast instead of C-Style cast +6f85287 rgw/rgw_multi_del.cc: use static_cast instead of C-Style cast +f87b4ea rgw/rgw_multi.cc: use static_cast instead of C-Style cast +7ed6fe8 rgw/rgw_http_client.cc: use static_cast instead of C-Style cast +b322024 rados_sync.cc: fix typo in error msg +8ad58b4 rgw/rgw_common.cc: initialize has_acl_header in constructor with 'false' +33f67c9 rgw/rgw_admin.cc: remove some unused variables +026575b rgw/rgw_admin.cc: reduce scope of 'int ret' +30938f6 rgw/rgw_admin.cc: remove twice check for 'object' +9f34cf5 rgw/rgw_rados.h: use static_cast instead of C-Style cast +ece03bc rgw/rgw_acl_s3.cc: use static_cast instead of C-Style cast +f106e1a rgw/rgw_common.h: pass some const variables by reference to 'operator<<' +b669682 rbd_fuse/rbd-fuse.c: remove consecutive return/break statement +fab9ee5 rbd.cc: use static_cast instead of C-Style cast +8720f52 rados_sync.{cc,h}: pass some const std::string by reference +315c8c3 rados_sync.cc: remove unused variable +2b3cef7 rados_export.cc: reduce scope of 'int ret' in do_rados_export() +da51f59 src/rados.cc: remove unused variable +965f5d0 src/osdmaptool.cc: remove some unused variables +531ff1c osdc/Objecter.cc: use static_cast instead of C-Style cast +0517a2d osdc/ObjectCacher.cc: set left to 0 instead off 'left -= left' +75531a1 osdc/ObjectCacher.cc: use static_cast instead of C-Style cast +868447d os/FileStore.cc: move variable async_done to the right #ifdef block +2a94340 os/FileStore.cc: remove assignment of a never used value +a6f4de9 msg/SimpleMessenger.cc: use static_cast instead of C-Style cast +637e8e7 mon/PGMonitor.cc: use static_cast instead of C-Style cast +0ed2f37 mon/Monitor.cc: Clarify calculation precedence for '%' and '?' +88b6b57 librbd/internal.cc: clarify expression with parentheses +f7eec26 SyntheticClient.cc: Clarify calculation precedence for '%' and '?' +94d370e fusetrace_ll.cc: reduce scope of 'int err' in main() +5c1dc92 mds/Locker.cc: fix warning about 'Possible null pointer dereference' +f971a67 mds/Locker.cc: use static_cast instead of C-Style cast +07820f0 mon/MonMap: don't crash on dup IP in mon host +0dd956c debian: Fix FTBFS because depend on old libboost-dev +3fbdfd3 Add code to check flag state +0e33490 librados: fix installed header include paths +c7aa897 ceph_common.sh: add warning if 'host' contains dots +4fe52a7 Revert "Update conf.py" +7008992 Update conf.py +776c042 osd: noscrub, nodeepscrub osdmap flags +cdb4ae3 doc: Added a new network configuration reference document. +9bcba94 Fix output of 'ceph osd tree --format=json' +3854d3e doc: Added network settings. Reorganized index. +4c8c36c doc: Excised network settings. +da706c1 doc: Format edits. Excised much of network discussion. Added reference to network guide. +881e9d8 osd: mark down connections from old peers +ba7e815 osd/PG: rename require_same_or_newer_map -> is_same_or_newer_map +7a9107d mon/Paxos: make old clock skew message more/less suggestive +416b962 Properly format Content-Length: header on 32-bit systems. +4384e59 rgw: set attrs on various list bucket xml results (swift) +7cb6ee2 formatter: add the ability to dump attrs in xml entities +6669e73 rgw: don't iterate through all objects when in namespace +3b260f3 Add filestore_replica_fadvise config option default true +f52ec6d osd: fadvise replica data don't use +08d5a28 Avoid sending a success response when an error occurs. +edd0a1c Fix FileStore to notice if filestore_flusher config is changed +eb9b5f0 client: move annoying traceless handling into verify_reply_trace() +3f1b7fd client: debug async cache invalidation +3a7233b mds: pass created_ino back to client on replayed requests +0bcf2ac mds: track created inos with completed request ids in session info +977a1cb client: debug created ino +974dc84 client: unlink old_dentry on traceless rename reply +bc92b40 client: force lookup on traceless reply +0d501f6 client: make _do_lookup take a const string +3112754 mds: do not do traceless reply for open O_TRUNC requests +98a383b client: handle fh cleanup in ll_create() failure path +d87035c client: root can write to any file +613c8f1 client: clear I_COMPLETE on traceless reply for dentry request +80e122f client: pass ptarget from link, create, mkdir, symlink, setattr +29abaf6 client: handle traceless replies from make_request() +1e2864a osd: increate default pg log size from 1000 -> 3000 +a714c16 vstart.sh: osd debug op order = true +d43384d Set weight of an osd based on df. priority to Weight in ceph.conf +e6caf69 config: note which options are overridden by common_preinit() +7c208d2 common: reduce default in-memory logs for non-daemons +a58eec9 init-ceph: fix run dir +de2c5b3 osd: add ctor for clone_info +e1e2d5d Missed adding rados_types.hpp to package +cb3ee33 ObjectCacher: fix debug log level in split +439d0e3 osd: add ctor for clone_info +a319f5c debian: require libsnappy-dev for ceph +ee158ed libcephfs: return osd location from crush map +e694ea5 release-process.rst: Fix typos +e8da4bf client: expose extent/osd mapping +32407c9 ceph-disk-prepare: move in-use checks to the top, before zap +8550e5c doc/release-notes: v0.58 +b244b87 Update doc/radosgw/s3/python.rst +7cd1cb2 Add list_snaps() calls to snapshots test cases +818f3d2 Add rados listsnaps command +db4ccc0 osd/librados: add op to list clones/snaps for an object +3b5933e Remove unused SnapContext in librados.hpp +1ebfb41 osd: Improve snapshot test +8418330 osd: correct comment +a6196de ceph-disk-prepare: verify device is not in use by device-mapper +3bd0ac0 ceph-disk-prepare: verify device is not mounted before using +867586c debian: require >= python2.6 for ceph as well +f03f626 ceph-disk-prepare: clean up stupid check for a digit +5950554 ceph-disk-prepare: use os.path.realpath() +ba3f91e (tag: v0.58) v0.58 +66df847 Add X-Python-Version >=2.6 to debian control file. +a06ea30 PG,ReplicatedPG: use pg_has_reset_since to discard old async events +83e9aa5 PG::build_scrub_map: detect race with peering via last_peering_reset +9e47225 ReplicatedPG::C_OSD_CommittedPushedObject: use intrusive_ptr for pg +3e59667 ReplicatedPG::C_OSD_CommittedPushedObject take epoch submitted +2a7e802 init-ceph: fix --restart option +007c83d doc: Updated year in footer. +1d33436 doc: Added instructions for ensuring ceph config file and keyring prior to mounting ceph fuse. +1cfc3ae jounal: disable aio +7e2785a Build: no longer need to use LEVELDB_INCLUDE +d5a453f tools: ceph: add 'ceph df' usage +de6d0a2 mon: Monitor: 'ceph df' +e384798 README: Add libsnappy-dev to build requirements. +14daccc doc: missing blank line in radosgw/config-ref +e01c15b librados.hpp: replace paris with pairs +d5ec9ca doc: Instruction should have been noout, not nodown. +d54ded4 doc: Fixed OSD pool config settings. Should be in [global], not [osd]. +ded94ad ceph.spec.in: Require gptfdisk for Suse, gdisk for otherwise +1de23b5 osd/Watch.cc: init NotifyTimeoutCB::canceled in constructor with false +7ee047c osd/ReplicatedPG.cc: use static_cast instead of C-Style cast +1695525 ReplicatedPG.cc: remove unused variables +91e24b8 ReplicatedPG.cc: remove consecutive return/break statement +79569f7 osd/PG.cc: reduce scope of listed_collection in read_log_old() +75a265f osd/PG.cc: use static_cast instead of C-Style cast +b4276cb osd/OSD.cc: remove unused variable 'map pool_resize' +e0308f3 osd/OSD.cc: reduce scope of "PG *pg" in OSD::handle_pg_query() +054424b osd/OSD.cc: use static_cast instead of C-Style cast +3c96faa os/IndexManager.cc: reduce scope of 'int r' in IndexManager::build_index() +b871163 os/LevelDBStore.h: pass const string by reference to past_prefix() +ea7907f os/FileStore.cc: fix warning about comparing int with bool +40aaf82 os/FileStore.cc: remove identical else branch +a68411b os/FileStore.cc: use static_cast instead of C-Style cast +f1f1c77 SimpleMessenger.cc: use static_cast instead of C-Style cast +5009c77 msg/Pipe.cc: reduce scope of some variables +bb172dd mon/Paxos.cc: use static_cast instead of C-Style cast +8bfe3c6 mon/PGMonitor.cc: use static_cast instead of C-Style cast +5376a13 mon/PGMap.cc: remove useless assigment to 'first', it's never used +e13da07 mon/OSDMonitor.cc: use static_cast instead of C-Style cast +9b73448 mon/MonmapMonitor.cc: remove unused variable +4d5e3dd mon/MonmapMonitor.cc: use static_cast instead of C-Style cast +e2fe6f0 mon/Monitor.cc: reduce scope of reuse_caps in Monitor::_ms_dispatch() +0b73c31 mon/Monitor.cc: use static_cast instead of C-Style cast +0213806 mon/MonClient.cc: use static_cast instead of C-Style cast +f26fad2 mon/MDSMonitor.cc: use static_cast instead of C-Style cast +956408e mon/LogMonitor.cc: move unused variable into related code block +b232621 mon/LogMonitor.cc: use static_cast instead of C-Style cast +17bd157 mon/Elector.cc: use static_cast instead of C-Style cast +00b309c mon/AuthMonitor.cc: remove unused 'std::stringstream ss' +17aa1b4 mds/flock.cc: remove unused variable 'crossed_waiting_locks' +eedb463 mds/Server.cc: reduce scope of some variables +116d8d1 mds/Server.cc: : use static_cast instead of C-Style cast +146e457 mds/Migrator.cc: use static_cast instead of C-Style cast +cb31159 mds/MDS.cc: remove unused variable 'oldresolve' +7def48c mds/MDS.cc: : use static_cast instead of C-Style cast +926e996 mds/MDCache.cc: remove unused variables recover_q and check_q +87a1773 mds/MDCache.cc: reduce scope of 'in' in MDCache::open_root_inode() +ec0e6cb mds/MDCache.cc: use static_cast instead of C-Style cast +f40932d mds/MDBalancer.h: init some double variables in constructor +a8be638 mds/MDBalancer.cc: use static_cast instead of C-Style cast +eabd0b8 ESession.h: initialze 'open' in the constructor with false +b6305c1 mds/LogEvent.cc: use static_cast instead of C-Style cast +82f233b mds/Locker.cc: reduce scope of 'pool' in Locker::issue_client_lease() +eed1476 ceph.spec.in: merge fdupes support from SUSE packages +558681d ceph.spec.in: add on non-RHEL sharutils to 'BuildRequires:' +db4fee2 ceph.spec.in: fix 'Requires:' to get sgdisk into the system +c02e317 mds/Locker.cc: use static_cast instead of C-Style cast +95cfffb mds/CDir.h: use static_cast instead of C-Style cast +96e9da1 ceph.spec.in: gdisk for for rpm based systems instead of gptfdisk. +0f42edd msgr: drop messages on cons with CLOSED Pipes +2a84437 osd: add 'osd debug op order' to track and assert order of client ops +2ed9f5a osd: include osdmap epoch in osd_op message operator<< +0ad717a osd: useful debugging for when we drop requests +d672452 crush-map.rst: fix chooseleaf syntax in ssd example +ffc0ff6 init-ceph: kick off ceph-create-keys when starting mons +1e0b2d8 init-ceph: fix default admin socket path used for status +0cbe406 osd: show retry attempt in MOSDOp operator<< +c47c02d msg/Pipe: allow tuning of TCP receive buffer size +e10c1d1 msg/Pipe: move setting of socket options into a common method +5d54ab1 FileJournal::wrap_read_bl: adjust pos before returning +6cba924 librbd/internal.cc: remove unused variable total_write +c12d91e librbd/internal.cc: reduce scope of 'int r' +bed61fc librados/librados.cc: don't check unsigned 'len' against less than zero +a2b14cf librados/librados.cc: reduce scope of 'ret' in rados_objects_list_next() +f441d38 librados/librados.cc: use static_cast instead of C-Style cast +56902d7 librados/RadosClient.cc: use static_cast instead of C-Style cast +2f66b49 crush/builder.c: fix realloc handling +9b87690 crush/builder.c: fix sizeof handling of bucket->h.items +56777b0 cls_rbd.cc: remove another unused variable +9f98b80 cls_rbd.cc: remove unused variable +d75cf46 CInode.h: use static_cast instead of C-Style cast +4f1cd46 CDentry.h: use static_cast instead of C-Style cast +5c3f5c5 ceph.spec.in: add new Requires from ceph-disk-prepare +5ce0809 fix ceph-object-corpus submodule commit +58f4cd5 doc: rbd-cloudstack: fix bullet list, missing words, change ! to . +b65ca56 ceph-test.install: Add libcephfs-test.jar to package. +be3581e doc: Consolidated Ubuntu and Ubuntu 12.10 requirements. +fac4959 mon: PaxosServices: don't ignore get_version(ver,bl) return value +ded84b1 doc: Added dependencies for ubuntu 12.10. +cfcacea debian: require cryptsetup-bin +5e278b8 vstart.sh: give mon. key mon = 'allow *' caps +202ae8e doc: fixed link and form edit. +783555f doc: Added auth entry to index. +7f7b2e7 doc: Removed auth entries from general. Part of an auth-specific section now. +712fca6 doc: Added comment to enable message. Added link to Auth Config Reference. +c0ed901 doc: Added Auth Config Reference as standalone config reference. +f62c5ab osd: allow log trimming during recovery +c980b76 ceph-fuse: add ceph options for all current fuse options +cf0d4f8 mon: MonitorDBStore: return -ENOENT on get() if key doesn't exist +1a581d0 kv_flat_btree_async.cc: remove unused variables +b6884e8 kv_flat_btree_async.cc: remove some unreachable break statements +ebdf67f key_value_store/cls_kvs.cc: remove unused variable dupmap +ca71457 bloom_filter.hpp: check for self assignment +8d35a66 crush/builder.c: reduce scope of oldsize in crush_add_rule() +d9d075e debian: let dpkg calculate the shlibs dep for leveldb (if any) +afa811c CrushCompiler.cc: remove duplicate if/else branches +9a40ab3 common/secret.c: reduce the scope of some variables +4b242f9 pick_address.cc: pass const string by refrence +7b7e912 obj_bencher.cc: use static_cast instead of C-Style cast +4ac5edd config.cc: remove unused variable 'val' from parse_injectargs() +7aab480 code_environment.cc: move variable ret in get_process_name() +de3f80c ceph_context.cc: remove unused variable 'args' from do_command +cd4dc83 cls_crypto.cc: remove some unused variables +924040b cls_acl.cc: remove unused variables +b20d024 common/armor.c: reduce scope of some variables +289d816 ceph_argparse.cc: accept also 0/1 for boolean injectargs +a7e797d TextTable: pass const string by refrence to define_column() +90c407e CephBroker.h: use static_cast instead of C-Style cast +85e36c1 SyntheticClient.cc: use static_cast instead of C-Style cast +f42a63b debian/control: fix Depends +4316153 debian/control: add libleveldb-dev to Build-Depends: +2becb35 README: add leveldb-dev to package list needed for build +f811f72 ceph.spec.in: fix leveldb handling +37d148b configure.ac: check for libsnappy +83dbaf6 add src/leveldb to .gitignore +8162215 remove leveldb from master branch +ea546ae Build: Change build to always use system leveldb +a34e7c6 ceph-test.install: remove cepkfs-test.jar +75ce88f doc: fix rst for watch/notify internals +c313423 OpRequest: rmw_flags may actually be 0 +0666b63 ceph-test.install: Add libcephfs-test.jar. +1d8e119 client: add some new functions: lchmod, fsetattr, lutime +ac9ed33 client: allow change file owner or group only +7bd8400 client: use get_filehandle +3cc0551 client: fix log data +c5d78f4 libcephfs: fix default parameters document for ceph_open_layout +b5c9e59 PendingReleaseNotes: mention ceph-mon requiring the creation of data dir +ebf4717 mon: give useful errors to user when store is missing +cf20ea6 mon: Monitor: check for an argument to 'quorum' before reading the array +6810111 mon: Monitor: adjust sync start criteria considering a peon's bootstrap +d9962cc mon: Paxos: bootstrap if we have fallen behind when we start collecting +f58601d librbd: fix rollback size +c8dd2b6 msg: fix entity_addr_t::is_same_host() for IPv6 +5b468e2 mon: fix other debug dumps +be31390 msgr: print dump before asserting (if that is enabled) +20b0933 msgr: dump corrupt message to log (at high debug levels) +6d89b34 osd: allow (some) log trim when degraded, but not during recovery +86df164 osd: restructure calc_trim +0ba8db6 osd: allow pg log trim during (non-classic) scrub +c1cffc7 mon: avoid expensive dump unless log will gather +95a379a ceph_common.sh: tolerate missing mds, mon, osds in conf +6bd0969 testing: updating hadoop-internal test +1274064 CephBroker.cc: fix condition +f0ae380 test: removing dead code +5006028 test: updating libcephfs-java tests +4ce3461 Client.cc: reduce the scope of some variables +60b9b10 Client.cc: use static_cast instead of C-Style cast +26e8577 Paxos.h: pass string name function parameter by reference +dc55c29 Typo: pool should be root in rados/operations/crush-map.rst +ef20382 osd/ReplicatedPG.cc: remove unused variables +fd5ce75 osd_types.cc: add parenthesis around expression +c0da0e1 OSDMap.cc: add parenthesis around expression +83eadd8 PGMonitor.cc: add parenthesis around expression +43e2b51 Client.cc: add parenthesis around expression +d783f95 CephxProtocol.cc: catch end_of_buffer by reference +bf10e5e CephxProtocol.cc: catch error by reference +d0e48eb crushtool.cc: remove unneeded function declaration +a6b3cc7 mds/journal.cc: fix assert in replay() +88555e7 KeyValueDBMemory.cc: use empty() instead of size() == 0 +4059d94 ReplicatedPG.cc: use empty() instead of size() == 0 +a2d842f FileStore.cc: use if(!empty()) instead of if(size()) +e3b27b7 mon_store_converter.cc: use empty() instead of size() +ed83d4b Paxos.cc: use empty() instead of size() +14716fd Monitor.h: use empty() instead of !size() +7a81b07 Monitor.cc: use empty() instead of size() +1c8ffc5 ceph.spec.in: Create placeholder directorys under /var/lib/ceph (Bug 4119) +aa79077 configure.ac: Add test for c++ compiler. +ccdafa0 test_lock_fence.sh, rbdrw.py: rbd lock/fence test +98408f5 mon: PaxosService: remove lingering uses of paxos getters and wait methods +9d472ca systest: restrict list error acceptance +b64d261 systest: fix race with pool deletion +9e6025b doc: Added subnet example and verbiage to network settings. +5e5530b doc: Added content to remove REJECT rules from iptables. +9c693d7 test_rbd: move flatten tests back into TestClone +55bd768 qa: enable watch-notify dependent test +345aa2d test_rbd: close image before removing it +9ab0fd7 doc: Added a small ref section for osd config reference. +3ef6d5b doc: Updated osd configuration reference. +5b24a68 systest: restrict list error acceptance +b0271e3 systest: fix race with pool deletion +2b7deee qa: output rados test names as they run +62999ea PG,ReplicatedPG: use pg_has_reset_since to discard old async events +6722533 PG::build_scrub_map: detect race with peering via last_peering_reset +04ee8f4 ReplicatedPG::C_OSD_CommittedPushedObject: use intrusive_ptr for pg +a01dea6 ReplicatedPG::C_OSD_CommittedPushedObject take epoch submitted +c453734 librbd: remove unused internal method +5806226 librbd: drop snap_lock before invalidating cache +3fdf439 doc: Moved admonition to kernel mount. +516935b doc: Added verbiage to describe single host deadlocks. +67103a8 Monitor.cc: fix -Wsign-compare +cf167a1 debian: add new files +4b77deb ceph.spec.in: add new files +6ae10fe Client.cc: don't pass c_str() if std::string is expected +350481f Paxos.h: fix dangerouse use of c_str() +9217c4a debian: make gdisk, parted requirements, not recommendations. +35c951f Minor wording change. +6bae2a5 Grammar typo +3896896 Changes to the OS support, multi-data center, and hypervisor questions. +0cd215e mds: reencode MDSMap in MMDSMap if MDSENC feature is not present +c07e8ea qa/run_xfstests.sh: use $TESTDIR instead of /tmp/cephtest +8235b16 osd: an interval can't go readwrite if its acting is empty +704db85 mkcephfs: create mon data dir prior to ceph-mon --mkfs +10f50d3 doc: Added a lot of info to OSD troubleshooting. +e68f2c8 doc: Added mention of Admin Socket interface and brief description. +73317bd doc: Changed title to OSD and PG, indicating both subjects are covered. +ab7039d doc: Added references from monitoring OSD to troubleshooting OSD. +97cc738 doc: set maxdepth to 2, so TOC isn't so long with new OSD troubleshooting. +7c94083 client: use 4MB f_bsize and f_frsize for statfs +64267eb test/librados/watch_notify: fix warning +53586e7 ceph-object-corpus: re-update +2dae6a6 PG::proc_replica_log: oinfo.last_complete must be *before* first entry in omissing +3105034 objecter: don't resend linger ops unnecessarily +15bb9ba objecter: initialize linger op snapid +5648117 Add test for list_watchers() C++ interface +1c3241e Add listwatchers command to rados +af339ae Add ObjectReadOperation and IoCtx functions +cfe9239 librados: expose a list of watchers on an object +bf5cf33 Add rados_types.h header file +8c05af5 configuration parsing: give better error for missing = +dc18122 osd/PG: fix typo, missing -> omissing +94ae725 test_librbd_fsx: fix image closing +6c08c7c objecter: separate out linger_read() and linger_mutate() +de4fa95 osd: make watch OSDOp print sanely +dd007db ceph_common.sh: fix iteration of items in ceph.conf +6cb5374 ceph-conf.rst: missing '=' in example network settings +ce7ffc3 PG::proc_replica_log: adjust oinfo.last_complete based on omissing +79f09bf MDS: remove a few other unnecessary is_base() checks +9f82ae6 mds: allow xattrs on the root inode +6bd8781 mds: use inode_t::layout for dir layout policy +84ef164 mds: parse ceph.*.layout vxattr key/value content +fea7768 osdc/Objecter: unwatch is a mutation, not a read +81bd996 FileStore::_clone: use _fsetattrs rather than _setattrs +5b48e63 FileStore::_setattrs: use _fsetattrs +c33c51f FileStore: add _fsetattrs +2ec04f9 FileStore::_setattrs: only do omap operations if necessary +83fad1c FileStore::_setattrs no need to grab an Index lock for the omap operations +ad00fc7 Fix failing > 4MB range requests through radosgw S3 API. +96896eb Handle empty CONTENT_LENGTH environment variable. +c83a01d Fix failing > 4MB range requests through radosgw S3 API. +4277265 osd: an interval can't go readwrite if its acting is empty +a1ae856 librbd: make sure racing flattens don't crash +995ff0e librbd: use rwlocks instead of mutexes for several fields +e0f8e5a common: add lockers for RWLocks +6d8dfb1 osd: clear recovery state on pg removal +94e5dee test: fix run-rbd-tests pool deletion +6612b04 ceph-object-corpus: use temporary 'wsp.master.new' corpus until we get merged into master +04dac7e vstart.sh: Create mon data directory before --mkfs +89f9204 test: ObjectMap: add a generic leveldb store tool +cb85fb7 mon: ceph-mon: convert an old monitor store to the new format +19e5098 mon: Add an offline monitor store converter +091fa82 os: LevelDBStore: scrap init() and create open() and create_and_open() +cab3411 mon: Monitor: Add monitor store synchronization support +6db25a3 message: MMonSync: Monitor Synchronization message +d8a5cf6 mon: MonitorDBStore: add store iterators to obtain chunks for sync +b33d4ea mon: Paxos: get rid of slurp-related code +cd4de77 mon: PaxosService: rework full version stashing +86f6a34 mon: Paxos: trim through Paxos +a5e2dcb mon: Single-paxos and key/value store support +5551aa5 mds: parse ceph.*.layout vxattr key/value content +0202bf2 ReplicatedPG: allow multiple watches in one transaction +9a399af doc: add some internal docs for watch/notify +661a283 librados/: include watch cookie in notify_ack +8ece91f ReplicatedPG: accept watch cookie value with notify ack +ebdf66d Watch/Notify: rework watch/notify +7af3299 osd/: move ObjectContext over to osd_types.h +22ec5bc PG: check object_contexts on flushed +359c0df ReplicatedPG: add intrusive_ptr hooks +7fe7eff Timer.cc: use complete() rather than finish() +8713f18 osd: remove force hack for testing the HASHPSPOOL code +ceb390f mon: allow syslog level and facility for cluster log to be controlled +c3d130c mon: Monitor: keyring always on mon_data/keyring by default +1461967 mon: MonitorDBStore: Add a key/value store to be used in the monitor +0201cc8 rgw: refactor header grants +eb0f49d rgw_acl: Support ACL grants in headers. +04f3fe4 mon: fix new pool type +2e1b02b osd: lock pg in build_past_intervals_parallel() +473beb5 qa: mon/pool_ops.sh: fix last test +3692ccd doc: make the cephfs man page marginally more truthful +db99fb4 rgw: fix multipart uploads listing +34f885b rgw: don't copy object when it's copied into itself +efc4947 man: make the cephfs man page marginally more truthful +128cb17 osd/OSDMap: note OSDHASHPSPOOL feature when pool FLAG_HASHPSPOOL is set +b90167d mon: move OSDMap feature bit calculation into an OSDMap method +8cc2b0f osd: introduce HASHPSPOOL pool flag, feature to avoid overlapping pg placements +96e153a qa: mon/pool_ops.sh: test pool set size +7bd49d0 qa: mon/pool_ops.sh: fix pool tests +4eb9bf2 test/bufferlist: fix warning +3ff0fe0 testing: updating hadoop-internal test +f1bff17 qa: sample test for new replication tests +60d9465 doc/release-notes: v0.57 +dbadb3e PG: remove weirdness log for last_complete < log.tail +5fc83c8 os/FileStore: check replay guard on src for collection rename +56c5a07 osd: requeue pg waiters at the front of the finished queue +f1841e4 osd: pull requeued requests off one at a time +9a7a9d0 (tag: v0.57) v0.57 +4002d70 osd: fix printf warning on pg_log_entry_t::get_key_name +f80f849 qa: test_mon_workloadgen: use default config file path +6d33859 qa: mon/workloadgen.sh: drop TEST_CEPH_CONF code +8ca2274 rbd: udevadm settle before unmap +b45f67e test: correcting hadoop-internal tests +d2dbab1 testing: adding a Hadoop wordcount test +30b8d65 mon: restrict pool size to 1..10 +45a4fe0 qa: rbd map-snapshot-io: udevadm settle +8e0be54 debian: allow extra args to get passed to ./configure via the environment +231dc1b qa: rbd/map-snapshot-io: remove image when done +1a7a57a qa: fix quoting of wget URLs +3612ed6 osd: log weirdness if caller_ops hash gets bigger than the log +ad84ea0 Strip any trailing whitespace from rbd showmapped +133d0ea buffer: drop large malloc tests +7fcbfdc buffer: put big buffer on heap, not stack +fb472a5 unit tests for src/common/buffer.{cc,h} +94e7c14 mon: fix pgmap stat smoothing +aa537df doc/release-notes: add note about upgrade to v0.56.3 +28e7212 ceph_common: fix check for defined/undefined entities in conf +d20bf07 buffer::ptr::cmp only compares up to the smallest length +fecc3c3 ceph-disk-prepare: -f for mkfs.xfs only +aff0bb6 debian: fix start of ceph-all +c4573b7 fix operator>=(bufferlist& l, bufferlist& r) +3f5c252 qa: rbd/map-snapshat-io: unmap image when done +d950d83 ceph-disk-prepare: always force mkfs.xfs +e090a92 udev: trigger on dmcrypted osd partitions +c6ac0dd ceph-disk-prepare: add initial support for dm-crypt +e7040f5 ceph-disk-activate: pull mount options from ceph.conf +b1c0fcc ceph-disk-activate: use full paths for everything +95835de ceph-disk-prepare: do partprobe after setting final partition type +ea6cfb5 ReplicatedPG: handle missing set even for old format +bc74429 qa: rbd/map-snapshot-io.sh: chown rbd device stuff +29b4466 cls/lock/cls_lock.cc: use !lockers.empty() instead of size() +adb807c src/client/SyntheticClient.cc: use !subdirs.empty() instead of size() +5c3e657 client/Client.cc: use empty() instead of size() +4902836 mds/MDSMap.h: use up.empty() instead of up.size() +28bf6cb mds/CDentry.h: use projected.empty() instead of projected.size() +d50a22d ceph_authtool.cc: use empty() instead of size() +ab17aaf OSD: add leveldblog compatibility flag for OSD +16b3718 PG: verify log versions during read_log +5f92b6c PG: write_log if we read an old-format log +1ef9420 osd: move pg log into leveldb +ae0c2bb qa: pull qa stuff from ceph.com ceph.git mirror +160490c doc: radosgw: document config without 100-continue and custom fastcgi +467f7a7 config: Add small note about default number of PGs +6f3f173 test_sync_io.c: add error handling +26cdb6a test_short_dio_read.c: add error handling +2c42bfc doc: update rados troubleshooting for slow requests +a6534bc osd/OSDCap: add unit test for parsing pools/objects with _ and - +6c504d9 osd/OSDCap: tweak unquoted_word parsing in osd caps +4dfcad4 OSD: always activate_map in advance_pgs, only send messages if up +2ce28ef osd/OSDCap: add unit test for parsing pools/objects with _ and - +a14bae6 rgw: user can specify 'rgw port' to listen on a tcp port. +93bfb36 test/filestore/chain_xattr: remove testfile; disable LOGFILE +1de16ac osd: log error when ondisk snap collections do not match +971b161 osd: fix read_log error/warning messages to mon +533fd7a wireshark/ceph/packet-ceph.c: fix some issues from cppcheck +ab1166c rest_bench.cc: use empty() to check for emptiness +8202378 tools/common.cc. use !empty() to check for non-emptiness +1834885 test_filejournal.cc: use empty() to check for emptiness +f9bf127 src/test/osd/RadosModel.h: use empty() to check for emptiness +37bb45f test_mon_workloadgen.cc: use empty() to check for emptiness +f923be5 TestFileStoreState.cc: use empty() to check for emptiness +47413b3 FileStoreTracker.cc: use empty() to check for emptiness +9da963e test_object_map.cc: use empty() to check for emptiness +e551dd4 test_keyvaluedb_iterators.cc: use empty() to check for emptiness +a8614b8 scratchtoolpp.cc: print some more results +e2af5b3 rgw/rgw_user.cc: use empty() to check for emptiness +a30017f rgw/rgw_usage.cc use empty() to check for emptiness +b14994e rgw/rgw_rest_swift.cc: don't pass c_str() result to std::string argument +dfe1b45 rgw/rgw_rados.cc: : use empty() to check for emptiness +005fe42 rgw/rgw_op.cc: use empty() instead of size() to check for emptiness +e980d52 rgw/rgw_main.cc: use empty() instead of size() to check for emptiness +6044083 mds/journal.cc: use !empty() instead of size() to check for emptiness +f244fd7 mds/SnapServer.cc: use !empty() instead of size() to check for emptiness +e57d991 mds/MDSMap.cc: use !empty() instead of size() to check for emptiness +aa2ae6a mds/MDS.cc: use !empty() instead of size() to check for emptiness +1755fd9 mds/MDCache.cc: use empty() instead of size() to check for emptiness +3ed962b mds/Locker.cc: use !empty() instead of size() +a65c71c mds/CInode.cc: use !empty() instead of size() +d089640 mds/CDir.cc: use !empty() instead of size() +4c11a5d librbd/internal.cc: use !empty() instead of size() +15248ae kv_flat_btree_async.cc: use empty() instead of size() to check for emptiness +fc0a108 cls_kvs.cc: use !empty() instead of 'size() > 0' to check for emptiness +30fe107 crushtool.cc: use !empty() instead of 'size() > 0' to check for emptiness +f4cae00 crush/CrushWrapper.cc: don't pass c_str() result to std::string argument +d6c4a62 obj_bencher.cc: use empty() instead of 'size() == 0' to check for emptiness +e719e0a common/WorkQueue.cc: use !empty() instead of size() to check for emptiness +810d23e cls_refcount.cc: use empty() instead of !size() to check for emptiness +c4f1c07 cls/rbd/cls_rbd.cc: use !empty() instead of 'size() > 0' +fb811ec rgw/rgw_log.cc: don't pass c_str() result to std::string argument +59f8c8d rgw/rgw_gc.cc: use !empty() instead of size() to check for emptiness +338e168 rgw/rgw_admin.cc: use empty() instead of size() to check for emptiness +8c1cb21 rgw/rgw_admin.cc: prevent useless value assignment +c115bdb rbd.cc: use empty() instead of size() to check for emptiness +95eda32 rados.cc: use omap.empty() instead of size() to check for emptiness +4950a1b osdmaptool.cc: : use empty() instead of 'size() < 1' +fb6561e Objecter.cc: prevent useless value assignment +d029b93 init-ceph.in: replace "/var/run/" by already used $RUN_DIR +aa4cae6 ceph_common.sh: check if $sshdir exist, otherwise create it +97c6ce0 init-ceph.in: create pid and log dir only on start +7eefe0b doc: Update create example to use 'allow ' syntax +51a0a22 doc: Move pool=... syntax inside of single quotes +01f82b8 ceph.spec.in: remove librados2 requirement from librbd1 +9952f2d ceph.spec.in: cleanup requirements of fuse packages +03fe479 LDADD PTHREAD_LIBS to fix librados-config linking +02a353e fix buffer::list::zero(unsigned o, unsigned l) to act on all buffer::ptr +b7b9af5 debian: start/stop ceph-all event on install/uninstall +690ae05 ceph-disk-activate: catch daemon start errors +5bd85ee udev: trigger ceph-disk-activate directly from udev +d1904b2 ceph-disk-activate: auto detect init system +f06b45e ceph-disk-activate: specify full path for blkid, initctl, service +1af749e upstart/ceph-osd: make crush update on start optional +ccdcae3 doc/release-notes: v0.56.3 +1334a42 PG,OSD: convert write_info users to write_if_dirty +34ed5da OSD: init infos_object in OSD::init() +93b3da6 PG: place biginfo on the infos object next to the info and epoch keys +f4b70c8 PG: minor style change for append_log and read_info +f3bc8df PG: use helpers to generate info and epoch keys +7e19207 libcephfs: Fix shutdown segfault +6879e8b doc: Minor clarification. +760b5ff OSD: dirty big_info in build_past_intervals_parallel +e011ad1 upstart: ceph-hotplug -> ceph-osd-activate +792e45c upstart/ceph-hotplug: tell activate to start via upstart +b2ff6e8 ceph-disk-prepare: refactor to support DIR, DISK, or PARTITION for data or journal +64ec2d4 doc: Made a few clarifications from feedback. +191d5f7 ceph-disk-activate: detect whether PATH is mount or dir +fd4a921 ceph-disk-activate: add --mark-init INITSYSTEM option +0765528 ceph-disk-activate: factor mounting out of activate +23ad3a4 debian: put ceph-mds upstart conf in ceph-mds package +e80675a debian: include /var/lib/ceph/bootstrap-mds in package +809143f ceph-create-keys: create mds bootstrap key +4698b6a upstart/ceph-hotplug: drop -- in ceph-disk-activate args +c8f528a init-ceph: iterate/locate local sysvinit-tagged directories +b8aa476 init-ceph: consider sysvinit-tagged dirs as local +50cbd10 debian: implement purge postrm script for ceph, ceph-mds +af2372c ceph-disk-prepare: align mkfs, mount config options with mkcephfs +617bde9 doc: Added many Q/A sections to the FAQ. +670a148 qa: fix mon/osd.sh +7aefe92 specfile: Add ceph-coverage to list of binaries +612f65b Objecter.cc: use !empty() instead of size() to check for emptiness +722d12c ObjectCacher.cc: use empty() instead of !size() to check for emptiness +475967f ReplicatedPG.cc: use empty() instead of size() to check for emptiness +d9a0638 PG.cc: use empty() instead of size() to check for emptiness +5d89996 OSD.cc: use empty() instead of size() to check for emptiness +f94f797 LFNIndex.cc: use !holes.empty() instead of 'size() > 0' +4893def HashIndex.cc: use empty() instead of size() to check for emptiness +f65679b FileStore.cc: use empty() instead of size() to check for emptiness +b0ec071 DBObjectMap.cc: use empty() instead of size() to check for emptiness +dd855b3 monmaptool.cc: use empty() instead of size() to check for emptiness +0b31234 PGMonitor.cc: use !empty() instead of size() to check for emptiness +6f0175e OSDMonitor.cc: use !empty() instead of size() +8fcd31f Monitor.cc: use empty() instead of size() +f7078b4 MonCaps.cc: use !empty() instead of size() +d7705ed OSDMonitor.h: use !reporters.empty() instead of size() +180cae5 AuthMonitor.cc: use !pending_auth.empty() instead of 'size() > 0' +6b8458d CInode.h: use !old_inodes.empty() instead of size() +a3970e5 CephxProtocol.h: pass CryptoKey by reference to decode_decrypt() +9d6eccb osd/PG: initialize info_struct_v in ctor +7c2e2b9 java: make CephMountTest use user.* xattr names +977ba79 doc: clarified ceph id vs. ceph name, and fixed a typo. +188f3ea osd/PG: store pg_info_t in leveldb (omap), purged_snaps separately +0e98527 doc: Added some of the troubleshooting steps into the libvirt procedure and removed path for virsh edit. +fe28381 librbd: unprotect any non-unprotected snapshot +c036dc7 doc: fix command syntax +376cca2 deb: Add ceph-coverage to ceph-test deb package +78ff229 mds: Setting pool on a file requires latest osdmap +d8c6b08 mds: Add retry field to MDRequest +ed6c3ff qa/workunits: Add vxattr set pool test script +5517000 cephtool: Add add_data_pool command to help +1b05517 msg/Messenger: rename option +302b26f osd: only share maps on hb connection of OSD_HBMSGS feature is set +afda30a osd: tolerate unexpected messages on the heartbeat interface +1e68ccf msg/Messenger: do not crash on unhandled message +a88f9be .gitignore: fix ceph_filestore_dump name +2cb6bcc Revert "Makefile: name binary ceph-filestore-dump" +0c65cd5 mds/LogEvent.h: change print() signature to const +e2b8e0f modified the perl file name Signed-off-by: tamil +411770c FileStore: set replay guard on create_collection +b184ff5 FileStore: _split_collection should not create the collection +d8891d5 os/FileStore: do not tolerate ENOENT on collection_add +66ddffb osd: make coll_t::is_pg() correctly validate the snapid suffix +7edf8ac os: use coll_t:is_pg_prefix() check instead of is_pg() +ea98fbb doc: Removed legacy comment regarding Keystone integration. +522a81e doc: Added link to reference. Added minor clarifications. +77799a5 auth: cephx: KeyServer: add 'has_secrets()' function +5659a4e mon: Remove global version code introduced around bobtail's release +bd6d498 ceph-filestore-dump: Improve error message +f0b2e32 Makefile: name binary ceph-filestore-dump +2922287 doc: Added procedures for using libvirt VMs with Ceph. +1b7fc30 .gitignore: fix typo and missing vstart.sh output +2783fce work unit for rbd cli tests Signed-off-by: tamil +f923c8c doc: document hadoop replication config +7c8d3d0 added new cli tests Signed-off-by: tamil +a62d519 Unit tests for chain_xattr.cc +31e911b osd: update snap collections for sub_op_modify log records conditionaly +715d871 osd: include snaps in pg_log_entry_t::dump() +54b6dd9 osd: unconditionally encode snaps buffer +8b05492 osd: improve debug output on snap collections +ab89e93 Revert "rgw: plain format always appends eol to data" +133295e libcephfs: fix for #4068 +755b4bb .gitignore: add local ones for ocf and man +3d5969d qa/rbd: +x on map-snapshot-io.sh +b26dc4e test: fix run-rbd-tests +c52dbd5 .gitignore: re-add vstart dirs and tags, fix typo +ebe70d7 Mutex.cc: fix implicitly-defined namespace 'std' +c7970bb ceph_authtool.cc: fix implicitly-defined namespace 'std' +d6b205f librados/librados.cc: fix implicitly-defined namespace 'std' +69552ff test_mon_workloadgen.cc: fix -Wgnu +1f0fd50 src/osd/PG.h: use empty() instead of size() +76798ea src/osd/OSD.h: use empty() instead of size() +99f2175 src/msg/Messenger.h: pass function parameter by reference +72ff806 src/mon/PGMonitor.cc: remove unused variable +aad71df src/log/Entry.h: pass function parameter by reference +6986707 common/WorkQueue.h: use empty() instead of size() +3b77687 common/AsyncReserver.h: use empty() instead of size() +d427d98 src/msg/msg_types.h: pass function parameter by reference +79c95a6 common/config.h: declaration of config_option as struct +f213669 .gitignore: cleanup and sort entries +125cb71 ceph-test.install: updated filelist +6cecdd8 spec/debian: don't install rest-bench twice +7b89ee6 ceph-test: give binaries from ceph-test package useful names +749218f buffer::ptr self assignment bug + patch +89df090 rgw/rgw_rest.cc: fix 4K memory leak +f0ba807 SyntheticClient.cc: fix some memory leaks in the error handling +e6591db wireshark: fix some memory leaks +d48cc78 rgw/rgw_xml.cc: fix realloc memory leak in error case +c92a0f5 os/FileStore.cc: fix realloc memory leak in error case +f26f147 common/fiemap.cc: fix realloc memory leak +4d054e2 qa: fix iogen script +41537d4 osd: do not spam system log on successful read_log +abc80ff java: make CephMountTest use user.* xattr names +c31aff5 rgw: plain format always appends eol to data +3e4d79f rgw: change json formatting for swift list container +b19b6dc osd: fix load_pgs collection handling +1f80a0b osd: fix load_pgs handling of pg dirs without a head +073f58e OSD::load_pgs: first scan colls before initing PGs +0d68f3a test/crypto: fix narrowing conversion warning +20255d9 doc: update commands for fetching release PGP keys +7761233 mds: enable SnapInfo, snaplink_t, sr_t dencoder usage +d414875 mds: remove very dead commented-out code +f1e08e6 mds: add ENCODING to the incompat set +e7bc4b8 mds: cap_reconnect_t uses modern encoding +38dd59b doc: Removed unnecessary/contradictory options. +19c9466 doc: Fixed order of option. +07b24cf mds: SessionMap now uses modern encoding +7cbae70 mds: mds_load_t now uses modern encoding +5c81221 mds: dirfrag_load_vec_t now uses modern encoding +6a6f75e mds: inode_load_vec_t now uses modern encoding +4123d01 mds: use modern encoding for LogEvent +3fb1b21 mds: EUpdate more modernization for dencoder +05461e8 mds: EUpdate event now uses modern encoding +8f75db3 mds: ETableServer more modernization for dencoder +ac8f25c mds: ETableServer event now uses modern encoding +f82dce8 mds: ETableClient more modernization for dencoder +d727b12 mds: ETableClient event now uses modern encoding +d557bcf mds: ESubtreeMap more modernization for dencoder +7998524 mds: ESubtreeMap event now uses modern encoding +1842f46 mds: ESlaveUpdate more modernization for dencoder +70bc6af mds: rename_rollback more modernization for dencoder +85c67fe mds: rmdir_rollback more modernization for dencoder +637e99f mds: link_rollback more modernization for dencoder +a64153f mds: ESlaveUpdate event now uses modern encoding everywhere +3cea0ca mds: ESessions more modernization for dencoder +8e8ecb4 mds: ESessions now uses modern encoding +709ff3d mds: ESession more modernization for dencoder +3f469ba mds: ESession event now uses modern encoding +b578ef2 mds: EResetJournal modernization for dencoder +5db5433 mds: EResetJournal event now uses modern encoding +a1ed741 mds: EOpen event now uses modern encoding +de9c1a1 MDS: EMetaBlob more modernization for encoder +821b74e MDS: EMetaBlob::dirlump more modernization for encoder +196313b mds: EMetaBlob::nullbit modernization for dencoder +09a2d66 mds: EMetaBlob::remotebit more modernization for dencoder +deb0d45 mds: EMetaBlob::full_bit more modernization for dencoder +6073027 mds: EMetaBlob and its sub-parts use modern encoding now +83c1a3c mds: EImportStart event uses modern encoding +a25683f mds: EImportFinish event uses modern encoding +b079733 mds: EFragment event uses modern encoding +8906ae9 mds: remove unused EString event +f886f31 mds: EExport event uses modern encoding +d21de81 mds: ECommitted now uses modern encoding +7bad507 SnapServer: use modern encoding for server_state +6e797e0 InoTable: use modern encoding for encode_state and decode_state +eb060bb CInode: use modern encoding for encode_export/decode_import +d8a7b87 CInode: use modern encoding for encode_store +95cee97 AnchorServer: use modern encoding for server state +d5a6a25 DecayCounter: use modern encoding +0fe7a08 mds: old_rstat_t now uses modern encoding +ff63530 mds: Capability (and sub-structs) now uses modern encoding +3cf3710 mon: fix typo in C_Stats +2bdf753 mon: assert valid context return values +4837063 mon: retry PGStats message on EAGAIN +1782776 mon: handle -EAGAIN in completion contexts +1b05b0e radosgw-admin: fix cli test +2eaa728 keys: renew autobuild.asc key +278dfe5 rgw: stream get_obj operation +3383618 throttle: optional non perf counter mode +ed2bb38 OSD: check pg snap collections on start up +55f8579 OSD::load_pgs: first scan colls before initing PGs +70532d1 rgw: get bucket_owner from policy +f6af1e7 rgw: fix bucket_owner assignment +e345dfe Feature 3667: Support extra canned acls. +fa47e77 ReplicatedPG: check store for temp collection in have_temp_coll +a18045f rgw: a tool to fix clobbered bucket info in user's bucket list +a00c77a rgw: bucket recreation should not clobber bucket info +36cf4d0 ceph: fix 'pg' error message to direct user toward better input +1042060 mds: error messages for export_dir said 'migrate_dir' +c44846e ceph: ceph mon delete doesn't exist; ceph mon remove is the command Fix up cli test as well (doc is already correct) +eb9d6ca osd: fix name of setomapval admin-daemon command +73872e7 ceph: use "config set" consistently in help/error msgs +5896b97 modified the script to run on both argonaut and bobtail. Signed-off-by: tamil +dbce1d0 PG: dirty_info on handle_activate_map +9432353 mds: rename mds_traceless_replies to mds_inject_traceless_reply_probability +af95d93 osd: flush peering queue (consume maps) prior to boot +75c40fa qa: fix iogen script +46d7dbd client: trigger the completion in _flush when short-cutting +08b82b3 mds: add "mds traceless replies" debug option +9871cf2 logrotate.conf: Silence rgw logrotate some more +d02340d silence logrotate some more +c0e1070 test: fix Throttle unit test. +1948a02 osd: do not spam system log on successful read_log +3acc4d2 rbd-fuse: fix for loop in open_rbd_image() +db0dbe5 msg/Message.h: fix C-style pointer casting +b1fc10e messages/MOSDRepScrub.h: initialize member variable in constructor +22e48b5 include/xlist.h: fix C-style pointer casting +d54bd17 include/types.h: change operator<< function parameter +0327cba include/buffer.h: fix operator= +ad526c0 obj_bencher.cc: use vector instead of VLA's +a4042cc ceph_crypto.cc: remove unused shutdown() outside crypto ifdef's +4268296 WorkQueue.h: fix cast +27fb0e6 rgw: a tool to fix buckets with leaked multipart references +50c1775 rgw: radosgw-admin object unlink +3b63542 mon: move list_rules into CrushWrapper method +9f4d4ac crush: add list_rules() method +7f237be Makefile: Add rgw/logrotate.conf source tarball +99ea303 logrotate.conf: Remove unneeded loop and update new rgw version. +c8eace6 rgw: create a separate logrotate file for radosgw +b79067a qa: add workunits/mon/crush_ops.sh +2c559a7 mon: 'osd crush rule rm ' +a19cdd4 osdmap: method to check if a crush ruleset is in use +b9bd482 crush: remove_rule() method +43a01c9 crush: factor out (trivial) crush_destroy_rule() +c370d85 mon: 'osd crush rules list|ls' +b6036a5 mon: 'osd crush dump' +9da6290 crush: factor out dump_rules from dump +a04d3f0 mon: 'osd crush rule create-simple ' +1a386d6 crush: add_simple_rule() command +d7ada58 crush: fix get_rule_id() return value +4f992ea crush: add rule_exists() +3105700 mon: 'osd find ' command +c058285 mds: uninline Capability encoders +90d93d9 mds: build dencoder with more stuff +ad40bdd MDSMap: mds_info_t now uses modern encoding +50ab924 mds: MDSMap now uses modern encoding +771204b mds: move conditional MDSMap encoding into single encode method +21901d2 mdsmap: uninline encode/decode +78632ad mds: modernize SimpleLock on-wire encoding +924fb18 mds: mds_table_pending_t now uses modern encoding +49b0be5 mds: rename MDSTableServer::_pending to mds_table_pending_t +72c7bcd mds: MDSCacheObjectInfo now uses modern encoding +d580a58 mds: string_snap_t now uses modern encoding +f57f424 mds: session_info_t now uses modern encoding +91555e2 mds: move durable Session bits into session_info_t +4486580 mds: fnode_t now uses modern encoding +bd4897b mds: old_inode_t now uses modern encoding +7e85a17 remove common/types.cc +843a352 mds: inode_t now uses modern encoding +87da20b mds: fold byte_range_t into client_writeable_range_t +49eb4d6 mds: client_writeable_range_t now uses modern encoding +9cf9c54 mds: nest_info_t now uses modern encoding +cda5590 mds: rename struct default_file_layout to file_layout_policy_t +a892671 mds: frag_info_t now uses modern encoding +2888830 mds: default_file_layout now uses modern encoding +34f7c71 mds: inode_back{trace,pointer}_t now uses modern encoding +f1baa79 mds: move SnapRealm into its own h/cc files +3e72893 client: rename client/SnapRealm files to avoid automake build conflict +08124fc mds: SnapInfo, snaplink_t, sr_t now use modern encoding +e35b89e mds: Anchor now uses modern encoding +ccba2ce mds: add CEPH_FEATURE_MDSENC feature bit +43468a3 osd: remove DecayCounter header +ece1c0f mon: check correct length of command +64ded02 Relax Throttle::_reset_max conditions and associated unit tests +ca2d645 os: default to 'journal aio = true' +d41b541 Edit endpoint-create in ./doc/radosgw/config.rst +6e60330 Edit rgw keystone url in ./doc/radosgw/config.rst +af8cac1 Note on host in ./doc/radosgw/config.rst +4b4dba3 doc: Updated to note bobtail supports RGW + Keystone. +e2e1de2 cli test: add pg deep-scrub option to test +eba8697 cli test: add pg deep-scrub option to test +4a6924a install: remove perl dependency +804ffc6 Add "pg deep-scrub..." missing from ceph usage output +9019fbb rgw: fix setting of NULL to string +e0acc33 xattr_bench.cc: remove twice included +c81a9d4 ceph-filestore-dump.cc: remove twice included +558b238 testmsgr.cc: remove twice included +60432d9 perf_counters.cc: remove twice included header files +b70d563 testxattr.cc: remove twice included +b22d641 workload_generator.cc: remove twice included "common/debug.h" +9421041 test_idempotent.cc: remove twice included "os/FileStore.h" +d141f79 tp_bench.cc: remove twice included +c8aeb93 small_io_bench*.cc: remove twice included +8197990 MDS.cc: remove twice included common/errno.h +4e29c95 mon: enforce reweight be between 0..1 +b970d05 qa: smalliobenchrbd workunit +d050fe1 doc: Minor edits. +0797be3 rgw: key indexes are only link to user info +fd1512f Build: Add -n to files and description for rbd-fuse in ceph.sepc.in +de01bdd Makefile: Install new rdb-fuse.8 man page +16cf9dc build: Add new rbd-fuse package +7d1e825 Revert "Don't install rbd-fuse binary" +334568e rbd-fuse: quick and dirty manpage +91f8c3c rbd-fuse: quick and dirty manpage +340b1cf ceph-filestore-dump.cc: don't use po::value()->required() +1ee46c5 doc: Added more detail to SSD section. Links to performance blogs. +2292fa6 Add important note in doc/radosgw/config.rst +129a660 ceph-filestore-dump.cc: don't use po::value()->required() +9235271 ceph.spec.in: fix file section for ceph-resource-agents +6e09cb9 ceph.spec.in: extend fix for libedit-devel on special SUSE versions +4c1d8d0 ceph.spec.in: don't move libcephfs_jni files around +9b16036 ceph.spec.in: move libcephfs_jni.so to ceph-devel +3f53c3f Validate format strings for CLS_ERR/CLS_LOG +97c6619 qa: update the rbd/concurrent.sh workunit +0758fab Add ceph-filestore-dump to the packaging +ab778cb doc: v0.56.2 release notes +3c8d7d7 osd: create tool to extract pg info and pg log from filestore +4a950aa Move read_log() function to prep for next commit +b571f8e PGMap: fix -Wsign-compare warning +b0d4dd2 test_libcephfs: fix xattr test +c782d2a qa: add test for rbd map and snapshots +e253830 cls_rbd, cls_rgw: use PRI*64 when printing/logging 64-bit values +77f5741 mds: move lexical_cast and assert re-#include to the top +35e5d74 Don't install rbd-fuse binary +23923ee mds/Server.cc: fix warring assert.h's +25e9a0b mon: require name for 'auth add ...' command +e9a6694 client: return errors to the user if fsync fails +84a024b init-ceph: make ulimit -n be part of daemon command +61fbe27 qa: add layout_vxattrs.sh test script +db31a1f mds: allow dir layout/policy to be removed via removexattr on ceph.dir.layout +ebebf72 mds: handle ceph.*.layout.* setxattr +09f2854 mds: fix client view of dir layout when layout is removed +8475148 client: note presence of dir layout in inode operator<< +ba32ea9 client: list only aggregate xattr, but allow setting subfield xattrs +3f82912 client: implement ceph.file.* and ceph.dir.* vxattrs +febb965 client: move xattr namespace enforcement into internal method +ad7ebad client: allow ceph.* xattrs +e51299f mds: open mydir after replay +3bc2114 ObjectCacher: fix flush_set when no flushing is needed +59ac4d3 qa: add rbd/concurrent workunit +7cd4e50 client: Wait for caps to flush when flushing metadata. +907c709 mds: Send created ino in journaled_reply +cf7c3f7 client: Don't use geteuid/gid for fuse ll_create +0b66994 (origin/wip-3930) ceph.spec.in: package rbd udev rule +a7d15af mon: smooth pg stat rates over last N pgmaps +ecda120 doc: fix overly-big fixed-width text in Firefox +3f6837e mon/PGMap: report IO rates +208b02a mon/PGMap: report recovery rates +76e9fe5 mon/PGMap: include timestamp +a2495f6 osd: track recovery ops in stats +4aea19e osd_types: add recovery counts to object_sum_stats_t +193dbed rbd-fuse: fix warning +1e24ce2 doc: Removed indep, and clarified explanation. +829aeba mds: clear inode dirty when slave rename finishes. +5884177 mds: mark export bounds for cross authority directory rename +abc4c78 mds: allow handling slave request in the clientreplay stage +e69e7e5 mds: fix 'discover' handling in the rejoin stage +0e9c812 mds: add projected rename's subtree bounds to ESubtreeMap +77946dc mds: fetch missing inodes from disk +f4abf00 mds: rejoin remote wrlocks and frozen auth pin +710bba3 mds: move variables special to rename into MDRequest::more +4fc68a4 mds: properly clear CDir::STATE_COMPLETE when replaying EImportStart +9a0cfcc mds: don't journal opened non-auth inode +0cf5e4e mds: journal inode's projected parent when doing link rollback +c93cf2d mds: fix for MDCache::disambiguate_imports +baa6bd6 mds: fix for MDCache::adjust_bounded_subtree_auth +e0aa64d mds: don't replace existing slave request +85294a5 mds: always use {push,pop}_projected_linkage to change linkage +3a66656 mds: send resolve messages after all MDS reach resolve stage +a42a918 mds: split reslove into two sub-stages +844cd46 mds: fix slave rename rollback +1a6626f mds: preserve non-auth/unlinked objects until slave commit +9944d9f mds: don't journal non-auth rename source directory +fb49713 mds: force journal straydn for rename if necessary +ce431eb mds: splits rename force journal check into separate function +c9ff21a mds: fix "had dentry linked to wrong inode" warning +cd8d910 mds: don't set xlocks on dentries done when early reply rename +b429a3a doc: Updated to add indep and first n to chooseleaf. Num only used with firstn. +f41010c rgw: fix crash when missing content-type in POST object +09522e5 rgw: fix crash when missing content-type in POST object +b955a59 mon: set limit so that we do not an entire down subtree out +2b8ba7c osdmap: implement subtree_is_down() and containing_subtree_is_down() +75f6ba5 crush: implement get_children(), get_immediate_parent_id() +97b7892 doc: update ceph man page link +91a0bc8 ceph, rados: update pool delete docs and usage +1a6197a qa: fix mon pool_ops workunit +818e9a2 rbd-fuse: fix printf format for off_t and size_t +21673e8 rbd-fuse: fix usage of conn->want +f74265b configure: fix check for fuse_getgroups() +fb85c7f rbd: don't ignore return value of system() +014fc6d utime: fix narrowing conversion compiler warning in sleep() +0ded0fd mon: Monitor: rework timecheck code to clarify logic boundaries +3a08942 doc: fix rbd create syntax +659d1a3 mds: properly set error_dentry for discover reply +6daec53 mds: introduce XSYN to SYNC lock state transition +6714497 mds: allow journaling multiple root inodes in EMetaBlob +919df3b mds: lock remote inode's primary dentry during rename +5176cb7 mds: check deleted directory in Server::rdlock_path_xlock_dentry +6bd676e mds: fix end check in Server::handle_client_readdir() +c547816 mon: Elector: reset the acked leader when the election finishes and we lost +d74b31b mon: Monitor: force timecheck cleanup on finish_election() +fa421cf configure: remove -m4_include(m4/acx_pthread.m4) +32276e9 configure: fix RPM_RELEASE +341e676 osdmaptool: fix clitests +54c392e osd: dump/display pool min_size +1ba4c80 qa/workunits/rbd/copy.sh: use non-deprecated --image-format option +bbb86ec mon: safety interlock for pool deletion +700bced Revert "mon: implement safety interlock for deleting pools" +6c40794 Added libexpat dependency +2a6dcab rbd-fuse: add simple RBD FUSE client +7daf372 rbd-fuse: Original code from Andreas Bluemle +aec2a47 s3/php: update to 1.5? version of API +b2a473b workunit for iogen +17cd549 mon: Monitor: timecheck: only output report to dout once +13fb172 mon: Monitor: track timecheck round state and report on health +b49440b doc: Added new, more comprehensive OSD/PG monitoring doc. +5f21050 doc: Trimmed some detail and added a x-ref to detailed osd/pg monitoring doc. +95cfdd4 doc: Added osd/pg monitoring section to the index. +d36a208 doc: Added x-ref links. +1af3578 doc: fixed description for pg in control section. +248835d doc: wider sidebar, larger font, cleaned tip CSS +037900d sharedptr_registry: remove extaneous Mutex::Locker declaration +8bd306b doc: Added Subdomain section. +8fef6fa osd/PG: include map epoch in query results +e359a86 osd: kill unused addr-based send_map() +5e2fab5 osd: share incoming maps via Connection*, not addrs +1bc419a osd: pass new maps to dead osds via existing Connection +76705ac osd: requeue osdmaps on heartbeat connections for cluster connection +a7059eb msgr: add get_loopback_connection() method +a6ed62e common: fix cli tests on usage +5f9ab93 Revert "filestore: disable extra committing queue allowance" +38871e2 os/FileStore: only adjust up op queue for btrfs +d95b431 adminops.rst: revert changes for as-yet-unimplemented features +bb860e4 rados: remove unused "check_stdio" parameter +234becd rados: obey op_size for 'get' +0c1cc68 FileStore: ping TPHandle after each operation in _do_transactions +e0511f4 OSD: use TPHandle in peering_wq +4f653d2 WorkQueue: add TPHandle to allow _process to ping the hb map +79d599c java: remove extra whitespace +6f0e113 libcephfs-java test: use provided environment +40ae8ce common: only show -d, -f options for daemons +7e7130d doc: Syntax fixes. +b51bfdf doc: Updated usage for Bobtail. +1d71d05 doc: Updated usage for Bobtail. +b0a5fe9 java: support ceph_get_file_pool_name +42d92b7 doc: Added example of ext4 user_xattr mount option. +b3a2e7e rgw_rest: Make fallback uri configurable. +352652b libcephfs: document ERANGE rv for get_file_pool_name +487bacd java: fix exception name typo +9cefa96 java: add missing chmod unmounted test +0c6d5a9 java: support fchmod +4b3bcb9 java: support stat() +00cfe1d common/HeartbeatMap: fix uninitialized variable +b9f58ba libcephfs-java test: jar files are in /usr/local/share/java, it seems +f9f31aa wireshark: fix indention +3e9cc0d wireshark: fix guint64 print format handling +67c7757 PendingReleaseNotes: pool removal cli changes +8a97eef ReplicatedPG: handle omap > max_recovery_chunk +c3dec3e ReplicatedPG: correctly handle omap key larger than max chunk +09c71f2 ReplicatedPG: start scanning omap at omap_recovered_to +62a4b96 ReplicatedPG: don't finish_recovery_op until the transaction completes +20278c4 ReplicatedPG: ack push only after transaction has completed +4d6ba06 ObjectStore: add queue_transactions with oncomplete +a972fd4 mds: fix end check in Server::handle_client_readdir() +c061e84 rados: safety interlock on 'rmpool' command +c993ac9 mon: implement safety interlock for deleting pools +132045c common/HeartbeatMap: inject unhealthy heartbeat for N seconds +657df85 os/FileStore: add stall injection into filestore op queue +a4e7865 osd: do not join cluster if not healthy +c406476 osd: hold lock while calling start_boot on startup +ad6b231 osd: do not reply to ping if internal heartbeat is not healthy +61eafff osd: reduce op thread heartbeat default 30 -> 15 seconds +0d172b9 packaging: add smalliobenchrbd +9388f94 Update src/rgw/rgw_admin.cc +db48caf osd: debug support for omap deep-scrub +509a93e osd: Add digest of omap for deep-scrub +cfb1aa8 osd: Add missing unregister_command() in OSD::shutdown() +e328fa6 test/bench: add rbd backend to smalliobench +c3266ad config: helper to identify internal fields we should be quiet about +0ee5ec7 common/Throttle: fix modeline, whitespace +89072fb test/bench: don't alias bl from above +c50f5f5 test/bench: use uint64_t for uniform distribution +451cc00 doc: Modified usage for upgrade. +73a9693 osd: improve sub_op flag points +23c02bc osd: refactor ReplicatedPG::do_sub_op +a1137eb osd: make last state for slow requests more informative +24d0d7e osd: dump op priority queue state via admin socket +33efe32 osd: simplify asok to single callback +514af15 common/PrioritizedQueue: dump state to Formatter +6e3363b common/PrioritizedQueue: add min cost, max tokens per bucket +c549a0c common/PrioritizedQueue: buckets -> tokens +128fcfc note puller's max chunk in pull requests +b685f72 osd: add OpRequest flag point when commit is sent +a1bf822 osd: set PULL subop cost to size of requested data +e8e0da1 osd: use Message::get_cost() function for queueing +bec96a2 osd: debug msg prio, cost, latency +40654d6 filestore: filestore_queue_max_ops 500 -> 50 +1233e86 osd: target transaction size 300 -> 30 +44dca5c filestore: disable extra committing queue allowance +cfe4b85 os/FileStore: allow filestore_queue_max_{ops,bytes} to be adjusted at runtime +101955a osd: make osd_max_backfills dynamically adjustable +9230c86 osd: make OSD a config observer +6401abf qa/workunit: Add iozone test script for sync +72147fd objectcacher: Remove commit_set, use flush_set +00b1186 testing: add workunit to run hadoop internal tests. +359d0e9 config: report on log level changes +c5e0951 config: clean up output +d7d8192 config: don't make noise about 'internal_safe_to_start_threads' +2e39dd5 mds: fix default_file_layout constructor +e461f09 mds: fix byte_range_t ctor +1716084 osd: calculate initial PG mapping from PG's osdmap +2491f97 workunits/cephtool: add tests for ceph osd pool set/get +4830895 Clarify journal size based on filestore max sync +aea898d ceph: reject negative weights at ceph osd reweight +7d9d765 workunit/cephtool: Use '! cmd' when expecting failure +0cb760f OSD: do deep_scrub for repair +5e00af4 osd: set pg removal transactions based on configurable +4712e98 osd: make pg removal thread more friendly +bc99404 os: move apply_transactions() sync wrapper into ObjectStore +f6c69c3 os: add apply_transaction() variant that takes a sequencer +4bdcfbf client: Respect O_SYNC, O_DSYNC, and O_RSYNC +045af95 qa: remove xfstest 068 from qemu testing +1f911fd ceph: allow osd pool get to get everything you can set +49726dc os/FileStore: only flush inline if write is sufficiently large +8ddb55d os/FileStore: fix compile when sync_file_range is missing; +b8d5e28 doc/rados/operations/crush: need kernel v3.6 for first round of tunables +736966f java: support get pool id/replication interface +40415d1 libcephfs: add pool id/size lookup interface +76e715b doc: Added link to rotation section. +e1741ba doc: Added hyperlink to log rotation section. +612717a doc: Added section on log rotation. +8332658 doc: Modified index to include mon-osd-interaction. +d6fc92d doc: Added a section describing mon/osd interaction. +bebdc70 build: Add perl installation dependency to rpm and debian packages. +ff7c971 doc: Added an admonishment for SSD write latency. +6f28faf mds: open mydir after replay +dd7caf5 mds: gracefully exit if newer gid replaces us by name +2e11233 mon: enforce unique name in mdsmap +ca2d9ac doc: Updated OSD configuration reference with backfill config options. +e330b7e mon: create fail_mds_gid() helper; make 'ceph mds rm ...' more generic +d81ac84 rbd: fix bench-write infinite loop +60db6e3 crushtool: warn usefully about missing output spec +e776b63 crushtool: consolidate_whitespace() should eat everything except \n +efa595f doc/rados/operations/authentication: update for cephx sig requirement options +91a573a mon: enforce 'cephx require signatures' during negotiation +50db10d msg/Pipe: require MSG_AUTH feature on server if option is enabled +4a49a09 cephx: control signaures for service vs cluster +c236a51 osdmap: make replica separate in default crush map configurable +c6f8010 mon: Monitor: drop messages from old timecheck epochs +b0162fa osdmaptool: more fix cli test +5bd8765 osdmaptool: fix cli test +98a7631 osd: leave osd_lock locked in shutdown() +faa62fa radosgw: increate nofile ulimit in upstart +19ee231 ceph: adjust crush tunables via 'ceph osd crush tunables ' +85eb8e3 osdmaptool: allow user to specify pool for test-map-object +37dbf7d rgw: copy object should not copy source acls +70c3512 ReplicatedPG: ignore snap link info in scrub if nlinks==0 +381e258 osd/PG: fix osd id in error message on snap collection errors +665577a osd/ReplicatedPG: validate ino when scrubbing snap collections +e65ea70 ReplicatedPG: compare nlinks to snapcolls +5735235 ReplicatedPG/PG: check snap collections during _scan_list +b856874 osd_types: add nlink and snapcolls fields to ScrubMap::object +39bc654 PG: move auth replica selection to helper in scrub +9e44fca ReplicatedPG: correctly handle new snap collections on replica +88956e3 ReplicatedPG: make_snap_collection when moving snap link in snap_trimmer +625c3cb rados.cc: fix rmomapkey usage: val not needed +3f0ad49 librados.hpp: fix omap_get_vals and omap_get_keys comments +cb5e2be rados.cc: use omap_get_vals_by_keys in getomapval +44c45e5 rados.cc: fix listomapvals usage: key,val are not needed +fb4bb5d osd: better error message for request on pool that dne +9a1f574 osd: drop newlines from event descriptions +0efb9c5 test: add cram integration test for formatted output +f6dabc8 rbd: always output result for formatted output +d7cdcc0 rbd: regenerate man page and cli test +4e5a07b XMLFormatter: fix pretty printing +8fea6de rbd: add --pretty-format option +6934ac3 rbd: move Formatter construction to main +98487b5 rbd: fix long lines +84c5d85 rbd: support plain/json/xml output formatting +8e33a8b mon: note scrub errors in health summary +a586966 osd: fix rescrub after repair +c1a86ab configure.ac: fix problem with --enable-cephfs-java +1d50aff mds: fix usage typo for ceph-mds +2dc2b48 mds: use #defines for bits per cap +d56af79 osd: note must_scrub* flags in PG operator<< +2baf125 osd: based INCONSISTENT pg state on persistent scrub errors +26a63df osd: fix scrub scheduling for 0.0 +389bed5 osd: note last_clean_scrub_stamp, last_scrub_errors +2475066 osd: add num_scrub_errors to object_stat_t +d738328 osd: add last_clean_scrub_stamp to pg_stat_t, pg_history_t +6f6a419 osd: fix object_stat_sum_t dump signedness +2995480 osd: change scrub min/max thresholds +16d67c7 osd/PG: remove useless osd_scrub_min_interval check +a148120 osd: move scrub schedule random backoff to seperate helper +62ee6e0 osd/PG: trigger scrub via scrub schedule, must_ flags +1441095 osd/PG: introduce flags to indicate explicitly requested scrubs +796907e osd/PG: move scrub schedule registration into a helper +be0c4b3 ac_prog_javah.m4: Use AC_CANONICAL_TARGET instead of AC_CANONICAL_SYSTEM. +13cb196 java: add fine grained synchronization +85c1035 java: remove all intrinsic locks +2b9da45 java: remove unnecessary synchronization +fb8a488 java: remove create/release synchronization +017b6d6 Revert "osdmap: spread replicas across hosts with default crush map" +410906e mon: OSDMonitor: don't output to stdout in plain text if json is specified +7ea5d84 osdmap: spread replicas across hosts with default crush map +3610e72 mon: OSDMonitor: only share osdmap with up OSDs +1f72180 rbd: Fix tabs +3413899 doc: Updates to CRUSH paper. +e94b06a rbd: make 'add' modprobe rbd so it has a chance of success +15bb00c rbd: call udevadm settle on map/unmap +66eb93b OSD: only trim up to the oldest map still in use by a pg +8cf79f2 OSD: check for empty command in do_command +0f161f1 Correct typo in mon docs 'ceph.com' to 'ceph.conf' +aeb0206 qa/run_xfstests.sh: use cloned xfstests repository +8d0fa15 mon: Monitor: only schedule a timecheck after election if we are not alone +58e03ec mon: Monitor: unify 'ceph health' and 'ceph status'; add json output +bc57c7a mon: Monitor: use 'else if' on handle_command instead of bunches of 'if' +7a7fff5 mon: Monitor: move a couple of if's together on handle_command() +ff1c254 mon: Monitor: reduce indentation level; make code more readable +684d4ba mon: Monitor: add timecheck infrastructure to detect clock skews +aa40de9 messages: add MTimeCheck +e6f284e doc: Added -a option. Should work without from server, as described. +de6633f doc: Normalized to term "drive" rather than disk. Changed "(Manual)" entry on remove OSD. +988f359 rados: add truncate support +44625d4 config_opts.h: default osd_recovery_delay_start to 0 +0f42c37 ReplicatedPG: fix snapdir trimming +035caac Revert "rgw: fix handler leak in handle_request" +797b3db Added python wrapper to rados_cluster_stat +59aad34 configure.ac: check for org.junit.rules.ExternalResource +61437ee configure.ac: change junit4 handling +aedbb97 configure.ac: remove AC_PROG_RANLIB +d8c4fc5 ceph.spec.in: fix libcephfs-jni package name +f027d02 ceph.spec.in: rename libcephfs-java package to cephfs-java +9b167b4 ceph.spec.in: fix handling of java files +12af11a src/java/Makefile.am: fix default java dir +00898c1 rbd: allow copy of zero-length images. Includes simple test. +1c3d684 doc/install/debian.rst: fix typo in link ref; broke doc build +48f1394 ReplicatedPG: increment scrubber.errors rather than errors +62e721a librados: add aio stat tests +879578c librados: implement aio_stat +5b12b51 osd: make missing head non-fatal during scrub +e1da85f rgw: Fix crash when FastCGI frontend doesn't set SCRIPT_URI +eba314a rgw: fix handler leak in handle_request +4483285 librbd: Allow get_lock_info to fail +77ddf27 doc/release-notes: v0.48.3argonaut +f07921b doc/install: new URLs for argonaut vs bobtail +72674ad doc/release-notes: v0.56.1 +26e8438 test: enforce -ENOTCONN contract in libcephfs +5c58aa9 libcephfs: return -ENOTCONN when call unmounted +f83fcf6 PG: set DEGRADED in Active AdvMap handler based on pool size +c412109 libcephfs: clarify interface return value +d16ad92 msg/Pipe: prepare Message data for wire under pipe_lock +40706af msgr: update Message envelope in encode, not write_message +6258688 osdc/Objecter: fix linger_ops iterator invalidation on pool deletion +4c9f4c3 ceph-fuse: rename ceph_ll_* to fuse_ll_* +4cfc490 msg/Pipe: encode message inside pipe_lock +a058f16 msg/Pipe: associate sending msgs to con inside lock +2a1eb46 msg/Pipe: fix msg leak in requeue_sent() +ce49968 os/FileJournal: include limits.h +e9efa33 java: add stripe unit granularity tests +ececcf5 java: update javadoc comments +cdd138d java: fix whitespace +6954bf3 java: add support for get_stripe_unit_granularity +abcda95 libcephfs: expose stripe unit granularity +988a521 osd: special case CALL op to not have RD bit effects +d3abd0f Revert "OSD: remove RD flag from CALL ops" +3a94087 libcephfs: delete client after messenger shutdown +0978dc4 rbd: Don't call ProgressContext's finish() if there's an error. +e89b6ad ReplicatedPG: remove old-head optization from push_to_replica +acfa0c9 mds: optimize C_MDC_RetryOpenRemoteIno +acbe6d9 mds: don't issue caps while inode is exporting caps +ca4dc4d mds: check if stray dentry is needed +3705c7c mds: drop locks when opening remote dentry +ea2fd12 mds: check null context in CDir::fetch() +420f335 mds: rdlock prepended dest trace when handling rename +248e4ab mds: fix cap mask for ifile lock +f9280cb mds: fix replica state for LOCK_MIX_LOCK +5995325 mds: keep dentry lock in sync state as much as possible +b03eab2 mds: forbid creating file in deleted directory +d379ac8 mds: disable concurrent remote locking +28d59d3 os/FileStore: fix non-btrfs op_seq commit order +f1e0305 doc: Removed the --without-tcmalloc flag until further advised. +88af7d1 doc: Added defaults for PGs, links to recommended settings, and updated note on splitting. +4ae4dce OSD: for old osds, dispatch peering messages immediately +73bc8ff doc: Added comments on --without-tcmalloc option when building Ceph. +37b57cd Update doc/rados/configuration/filesystem-recommendations.rst +43ef677 doc: Added some packages to the copyable line. +333ae82 doc: Fixed syntax error. +224a33b qa/workunit: Add dbench-short.sh for nfs suite +a32d6c5 osd: move common active vs booting code into consume_map +0bfad8e osd: let pgs process map advances before booting +5fc94e8 osd: drop oldest_last_clean from activate_map +67f7ee6 osd: drop unused variables from activate_map +a14a36e OSDMap: fix modifed -> modified typo +43cba61 log: fix locking typo/stupid for dump_recent() +64d2760 doc: Added a memory profiling section. Ported from the wiki. +5066abf doc: Added memory profiling to the index. +0e9a0cd qa/workunit: Update pjd script to use new tarball +d8940d1 fuse: Fix cleanup code path on init failure +c4370ff librbd: establish watch before reading header +483c6f7 test_filejournal: optionally specify journal filename as an argument +c461e7f test_filejournal: test journaling bl with >IOV_MAX segments +dda7b65 os/FileJournal: limit size of aio submission +e0858fa Revert "librbd: ensure header is up to date after initial read" +8229770 doc: Minor edits. +d3b9803 doc: Fixed typo, clarified usage. +8422474 mds: fix rename inode exportor check +5e8642a mds: call maybe_eval_stray after removing a replica dentry +f5ea5c3 mds: don't defer processing caps if inode is auth pinned +fe5936b mds: remove unnecessary is_xlocked check +b2d5005 mds: fix lock state transition check +b3796f4 mds: indroduce DROPLOCKS slave request +7e04504 mds: fix on-going two phrase commits tracking +2f96b47 mds: fix anchor table commit race +a79493d mds: skip frozen inode when assimilating dirty inodes' rstat +61da9b1 mds: mark rename inode as ambiguous auth on all involved MDS +3b13d3d mds: only export directory fragments in stray to their auth MDS +d9d7147 mds: don't trim ambiguous imports in MDCache::trim_non_auth_subtree +fcb9f98 mds: use null dentry to find old parent of renamed directory +7a52016 mds: don't journal null dentry for overwrited remote linkage +5ae715b mds: xlock stray dentry when handling rename or unlink +2627957 mds: don't trigger assertion when discover races with rename +e10267b mds: fix Locker::simple_eval() +7e23321 mds: don't renew revoking lease +1a32f0a (tag: v0.56) v0.56 +49ebe1e client: fix _create created ino condition +a10054b libcephfs: choose more unique nonce +e2fef38 client: fix _create +82cec48 doc: add-or-rm-mons.rst: Add 'Changing Monitor's IPs' section +379f079 doc: add-or-rm-mons.rst: Clarify what the monitor name/id is. +8bbb4a3 doc: fix rbd permissions for unprotect +d0a14d1 librbd: fix race between unprotect and clone +958addc rbd: open (source) image as read-only +47bf519 librbd: open parent as read-only during clone +c67c789 librbd: add {rbd_}open_read_only() +91e941a OSD: remove RD flag from CALL ops +85e9d4f cls_rbd: get_children does not need write permission +4aa6af7 doc/release-notes: link to upgrade doc +7b0dbeb doc/install/upgrading: edits to upgrade document +6711a4c Revert "mds: replace closed sessions on connect" +82f8bcd msg/Pipe: use state_closed atomic_t for _lookup_pipe +a5d692a msgr: inject delays at inconvenient times +e99b4a3 msgr: fix race on Pipe removal from hash +6339c5d msgr: don't queue message on closed pipe +7bf0b08 msgr: atomically queue first message with connect_rank +c2a7525 test: mon: workloadgen: debug when message fsid != monmap fsid +b30ab51 test: mon: workloadgen: assert if monmap's fsid is zero after authenticate +3583684 doc: update Hadoop documentation +942c714 init-ceph: ok, 8K files +0a5d6d8 msg/Pipe: remove broken cephs signing requirement check +65b787e msg/Pipe: include remote socket addr in debug output +9e5e08f doc: Added a new upgrade document. +1553267 doc: Minor edit. +02b8bcd doc: Added upgrade link to index. +076b418 os/FileJournal: logger is optional +3debf0c client: fix fh leak in non-create case +67bc849 mds: Return created inode in mds reply to create +7f35e5d client: Make ll_create use _create +813787a log: broadcast cond signals +ca34fc4 osd: allow RecoveryDone self-transition in RepNotRecovering +1867b81 docs: fix typo in release-process doc +3a8bf3a doc/release-notes: document new 'max open files' default +ea13ecc osd: less noise about inefficient tmap updates +672c56b init-ceph: default to 16K max_open_files +948e752 ceph-fuse: Avoid doing handle cleanup in dtor +ff2d4ab ceph-fuse: Pass client handle as userdata +9967cf2 release-notes: rgw logging now off by default +1c3e12a doc: warn about using caching without QEMU knowing +f6ce5dd rgw: disable ops and usage logging by default +64b845f features is uint64_t +856f32a ceph-fuse: Split main into init/main/finalize +c0fe381 java: remove deprecated libcephfs +6c7b667 init-ceph: fix status version check across machines +774a54c docs: update release process documentation. +6356739 osd: fix recovery assert for pg repair case +f230603 osd: only calculate OpRequest rmw flags once +f1dfd64 messages/MOSDOpReply: remove misleading may_read/may_write +03f6dfa osd: move rmw_flags to OpRequest, out of MOSDOp +998f719 dropping xfs test 186 due to bug: 3685 +98e7b59 docs: remove extra release-process2 file. +82c7171 osd: drop 'osd recovery max active' back to previous default (5) +6f1f03c journal: reduce journal max queue size +0d2ad2f mds: use set to store MDSMap data pools +2137d5c mds: wait for client's mdsmap when specifying data pool +9da6d88 doc: document mds config options +916d1cf doc: journaler config options +cedea13 docs: Merge changes from release-process2 document. +850a056 mds: add waiting_for_mdsmap queue +c764935 mds: do not check for pool existence in osdmap +4929fc7 qa: remove xfstests 172 and 173 from qemu testing +f5403f9 doc/man/8/mkcephfs: update --mkfs a bit +8b59908 mds: replace closed sessions on connect +d18f3c2 mds: don't force in->first == dn->first +a1485f9 mds: compare sessionmap version before replaying imported sessions +0002546 mds: fix race between send_dentry_link() and cache expire +efbca31 mds: fix file existing check in Server::handle_client_openc() +f5e86ec mds: delay processing cache expire when state >= EXPORT_EXPORTING +1174dd3 mds: don't retry readdir request after issuing caps +dd44157 mds: take export lock set before sending MExportDirDiscover +96f48aa mds: re-issue caps after importing caps +a3e70ae mds: always send discover if want_xlocked is true +69f9f02 mds: fix error hanlding in MDCache::handle_discover_reply() +e6b8f0a mds: set want_base_dir to false for MDCache::discover_ino() +b7e698a mds: no bloom filter for replica dir +0ab0744 mds: properly mark dirfrag dirty +48d8ae5 mds: alllow handle_client_readdir() fetching freezing dir. +8efcf54 mds: *_pg_pool -> *_pool +d2f5890 client, libcephfs: add method to get the pool name for an open file +32ab274 client: specify data pool on create operations +3f45821 mds: verify that the pool id is valid on SET[DIR]LAYOUT +99d9e1d mds: allow data pool to be specfied on create +697ed23 client: remove set_default_*() methods +850d1d5 osd: fix dup failure cancellations +61d43af osd: make MOSDFailure output more sensible +9df522e mon: make osd failure report log msgs sensible +8362e64 monclient: fix get_monmap_privately retry interval +d843a64 Makefile: fix 'base' rule +a09f5b1 init-ceph,mkcephfs: default inode64 for mounting xfs +5f25f9f init-ceph: default osd_data path +f6b2ca8 OSD: always do a deep scrub when repairing +ad9bcc7 PG: don't use a self-transition for WaitRemoteRecoveryReserved +2e96bb1 PG: Handle repair once in scrub_finish +6325a48 import_export.sh: sparse import export +5905d7f rbd: harder-working sparse import from stdin +410903f rbd: check for all-zero buf in export, seek output if so +4a55804 librbd: move buf_is_zero() to new common/util.cc and include/util.h +8f5de15 osd: fix pg stat msgs vs timeout +2bf4f42 doc: Added new journaler page to CephFS section. Needs descriptions. +53afac1 doc: Added Journaler Configuration to toc tree. +757902d doc: Added --mkfs options. +46d0334 doc: Added running multiple clusters. Per Tommi. +e3d0756 doc: Updated the Configuration File section. +00ed665 PG::scrub_compare_maps increment scrubber.fixed for missing repairs +c9e0517 PG::_compare_scrubmaps: increment scrubber.errors on missing object +4a03939 release-notes: add more user-visible changes +b39928d release-notes: remove bug fix that does not affect argonaut +048567e release-notes: fix typos +3076e45 release-notes: pgnum is required now +b564fdb release-notes: remove warning about osd caps +09d4f03 doc: Added sudo the ceph health for when cephx is on. +085992f doc: minor fix to syntax. +206ffcd mkcephfs: error out if 'devs' defined but 'osd fs type' not defined +4a40067 doc: update ceph.conf examples about btrfs default +999ba1b monc: only warn about missing keyring if we fail to authenticate +5d5a42b osd: clear CLEAN on exit from Clean state +b3e62ad auth: use none auth if keyring not found +4d661e0 PG::sched_scrub: only set PG_STATE_DEEP_SCRUB once reserved +7c56d8f PG::sched_scrub: return true if scrub newly kicked off +ae044e6 osd: allow transition from Clean -> WaitLocalRecoveryReserved for repair +670afc6 PG: in sched_scrub() set PG_STATE_DEEP_SCRUB not scrubber.deep +19e44bf osd: clear scrub state if queued scrub doesn't start +feb0aad doc: Moved path to individual OSD entires. +e765dcb osd: only dec_scrubs_active if we were active +ada3e27 osd: reintroduce inc_scrubs_active helper +129a49a cephtool: mention ceph osd ls, fix ceph osd tell N bench +a36d1db rgw: remove noisy log message +5b5a19a rgw: fix daemonize initialization +754fc20 release notes: Mention new cephtool commands +50914e7 log: fix flush/signal race +c0e2371 ReplicatedPG::remove_notify : don't leak the notify object +b5031a2 OSD,ReplicatedPG: do not track notifies on the session +719679e doc: Added package and repo links for Apache and FastCGI. Added SSL enable too. +04eb1e7 doc: Fixed restructuredText usage. +ea9fc87 doc: Removed foo. Apparently myimage was added and foo not removed. +a803159 rgw: configurable exit timeout +92b59e9 rgw: don't try to assign content type if not found +08c6424 rgw: don't initialize keystone if not set up +799c59a rgw: remove useless configurable, fix swift auth error handling +5497d22 doc: Modified the demo configuration file for Bobtail. +40fdd77 doc: Added Gateway Quick Start. +5281ee2 doc: Added Gateway Quick Start configuration file. +84fb371 Updated Getting Started index to include Gateway Quick Start. +5e95510 doc: Added REST Gateway link to 5-minute Quick Start. +c2b231e doc: Updated the 5-minute Quick Start for Bobtail. +f596cee doc: Updated Block Device Quick Start for Bobtail. +60b2857 doc: Updated CephFS Quick Start for Bobtail. +d17bd38 doc: Added authentication and mkcephfs settings for Bobtail. +cd5c82d doc: Added javascript code block tag. +6122a9f OSDMonitor: remove temp pg mappings with no up pgs +2395af9 OSDMap: make apply_incremental take a const argument +2e49d5c cephtool: add qa workunit +d9c2396 ceph.spec.in: Improve finding location of jni.h for sles11. +b2eb8bd osd: implement 'version' tell command +4634410 ceph.spec.in: Add packages for libcephfs-jni and libcephfs-java +85763f0 ceph: report error string to stderr, not stdout +5f24e23 ceph: fix error reporting when tell target is invalid or down +b00eb6f mon: 'ceph osd ls' +212f6b5 OSDMap::dump: tag pg_temp mappings with pgid +04e7a5c rgw: configurable exit timeout +6c7ec2d crushtool: nicer error message on extra args +dbe6fb7 crushtool: only dump usage on -h|--help +fd482a2 ceph.spec.in: Update pre-reqs for ceph-fuse pacakge. +1b67a43 Revert "objecter: don't use new tid when retrying notifies" +bdc998e mon: OSDMonitor: add option 'mon_max_pool_pg_num' and limit 'pg_num' accordingly +21c47c6 osd: debug EMSGSIZE / OSD_WRITETOOBIG +f81ca89 doc/release-notes: don't use format 2 rbd images until after osds upgrade +3c24622 crushtool: add --set-chooseleaf-descend-once to help +874b273 doc/release-notes: 'mon max pool pg num' +e8b8531 doc: fix typo in config file +e9231fe Makefiles: Two new packages needed in the debian build depdencies. +bc9d9d8 Refactor rule file to separate arch/indep builds. +4bf9078 osdc/Objecter: prevent pool dne check from invalidating scan_requests iterator +6f978aa doc: draft bobtail release notes +5061481 doc: correct meaning of 'pool' in crush +1ec70aa qa: add a workunit for fsync-tester +286dcbe test: remove underscores from cephfs test names +a7de975 lockdep: Decrease lockdep backtrace skip by 1 +641b077 mkcephfs: fix == -> = +bf01b7b map-unmap.sh: use udevadm settle for synchronization +02aca68 ceph-disk-activate: mark dir as upstart-managed +96f40b1 upstart: make starter jobs consistent +e597482 upstart: only start when 'upstart' file exists in daemon dir +6ab7db6 ReplicatedPG: use default priority for Backfill messages +7e13356 ReplicatedPG: do not use priority from client op +8d73f3e Fix comment in sample.ceph.conf +9f05102 crush-map.rst: add info about multiple crush heirarchies +f16e571 client: Add config option to inject sleep for tick +8cf367c rbd.py: check for new librbd methods before use +c9894ff osd: up != acting okay on mkpg +e3ed28e mon: OSDMonitor: don't allow creation of pools with > 65535 pgs +8103414 rbd: handle images disappearing while in ls -l +2452391 rgw_op: enforce minimum part size in multi-part uploads +aa2214c mds: document EXCL -> (MIX or SYNC) transition decision +97cc55d OSD: put connection in disconnect_session_watches as well as the session +f2c083e OSD: disconnect_session_watches obc might not be valid after we relock +c17d628 clarify/correct some of sample.ceph.conf +e6dd068 qa: echo commands run by rbd map-unmap workunit +975003b auth: guard decode_decrypt with try block +448db47 mount.fuse.ceph: strip out noauto option +ae100cf mount.fuse.ceph: add ceph-fuse mount helper +ac92e4d /etc/init.d/ceph: fs_type assignment syntax error +4605fdd filestore: Don't keep checking for syncfs if found +8e25c8d (tag: v0.55.1) v0.55.1 +dba0960 OSD: pg might be removed during disconnect_session_watches +047aecd PG,ReplicatedPG: handle_watch_timeout must not write during scrub/degraded +0dfe6c8 ReplicatedPG:, remove_notify, put session after con +695bb3b ReplicatedPG: only put if we cancel evt in unregister_unconnected_watcher +fdf66b6 ReplicatedPG: watchers must grab Connection ref as well +5f55b38 doc: Updated per comments in the mailing list. +9d71456 docs: better documentation of new rgw feature +3a95d97 rgw: configurable list of object attributes +8708724 rgw: option to provide alternative s3 put obj success code +bece012 doc: document swift compatibility +88229a4 docs: add rgw POST object as supported feature +64cefe2 PG,ReplicatedPG: move write_blocked_by_scrub logic into a helper +54618af docs: fix spacing in radosgw config-ref +8e6a535 qa: exclude some more xfstests +caea0cb os/JournalingObjectStore: un-break op quiescing during journal replay +6a8a58d doc: document swift compatibility +cf28e78 docs: add rgw POST object as supported feature +3950182 st_rados_watch: tolerate extra notifies +29307d3 mds: shutdown cleanly if can't authenticate +c310700 objecter: don't use new tid when retrying notifies +9a40ef0 mds: fix journaling issue regarding rstat accounting +b9d717c fix build of unittest_formatter +be37276 include/atomic.h: add stdlib.h for size_t +1699b7d OSD: get_or_create_pg doesn't need an op passed in +6a4fa89 LFNIndex: fix move_subdir comments +fdcdca7 HashIndex: fix typo in reset_attr documentation +7eac968 HashIndex: init exists in col_split_level and reset_attr +12673c2 PrioritizedQueue: increment ret when removing items from list +80cca21 PrioritizedQueue: move if check out of loop in filter_list_pairs +a50c7d3 config: do not always print config file missing errors +6fb9a55 config: always complain about config parse errors +2e7cba7 doc: fixed indent in python example. +788992b config_opts.h: adjust recovery defaults +f4be3c8 doc: Added sudo to ceph -k command. +3709519 doc: Fixed typo. +47c81a3 Makefile.am: add missing flags to some tests targets +333b3f4 mon: fix leak of pool op reply data +f66fe77 os/JournalingObjectStore: simplify op_submitting sanity check +a88b584 os/JournalingObjectStore: remove unused ops_submitting +ad4158d os/JourningObjectStore: drop now-useless max_applying_seq +d9dce4e filestore: simplify op quescing +d4c6a22 rgw: document admin api web interface. +25ea069 osd: make pool_stat_t encoding backward compatible with v0.41 and older +e227c70 crush/CrushWrapper: do not crash if you move an item with no current home +1acb691 mon: Elector: init elector before each election +f302983 init-ceph: =, not == +8816b39 debian: add ceph.postinst to remove /etc/init/ceph.conf on update +fc58299 PG: remove last_epoch_started asserts in proc_primary_info +81fdea1 auth: set default auth_client_required +a3908a6 auth: changed order of test for legacy and new authentication +907da18 auth: improve logging +8355733 rbd: use ExportContext for progress, not cerr +e0761fb doc: Added sudo to the service start command. +778bad1 doc: Moved sudo to before ssh instead of before tee. +413b5d0 doc: inverted the steps per doc feedback. +07b3699 mds: move from EXCL to SYNC if nobody wants to write +636048d mds/locker: Add debugging for excl->mix trans +fa5a46c test/libcephfs: Add a test for validating caps +10bf150 client: Add routine to get caps of file/fd +efc6614 librbd: change internal order parameter to pass-by-value +57d5c69 librbd: clean up after errors in create +c1bf229 librbd: bump version for new functions +bc6f726 mon: PGMonitor: erase entries from 'creating_pgs_by_osd' when set is empty +f81d720 doc/install/os-recommendations: fix syncfs notes +4d43c86 doc: fix bobtail version in os-recommendations +e1c27fe mon: Monitor: rework 'paxos' to a list instead of a vector +27071f3 OSD: store current pg epoch in info and load at that epoch +9f169ac OSD: account for split in project_pg_history +15d8993 PG: update info.last_update_started in split_into +338f368 OSDMonitor: require --allow-experimental-feature to increase pg_num +fb73850 PG: set child up/acting in split_into +3f412e8 OSD: do _remove_pg in add_newly_split_pg is pool if gone +19e6861 osd/: dirty info and log on child during split +9835e19 osd/: mark info.stats as invalid after split, fix in scrub +5f8a363 PG: split ops for child objects into child +9981bee OSD: add initial split support +58890cf librados: watch() should set the WRITE flag on the op +f2914af HashIndex: fix list_by_hash handling of next->is_max() +0c01094 rbd: remove block-by-block messages when exporting +ef24f53 doc: Change per doc request. +ca1a4db release: add note about 'ceph osd create' syntax +214c7a1 client: Allow cap release timeout to be configured +0a137d7 mkcephfs: fix fs_type assignment typo +4c31598 upstart: fix radosgw upstart job +47266cd upstart: rename ceph -> ceph-all +b7b7242 rbd: update manpage for import/export +e9653f2 librbd: hold AioCompletion lock while modifying global state +b2ccf11 librbd: handle parent change while async I/Os are in flight +64ecc87 Striper: use local variable inside if() that tested it +a55700c librbd: hold AioCompletion lock while modifying global state +41e16a3 librbd: handle parent change while async I/Os are in flight +917a6f2 Striper: use local variable inside if() that tested it +2a5549c qa: add script for running xfstests in a vm +2779325 rgw: fix rgw_tools get_obj() +cb19e99 doc: ceph osd create takes a uuid, not an osd id +993ff14 PG: add split_into to populate child members +6e67a27 osd/: splitting a pg now triggers a new interval +36c0fd2 PrioritizedQueue: allow caller to get items removed by removed_by_filter +b6c49b4 mon/OSDMonitor: enable split in Monitor +b8a37fd PGMonitor,OSD: don't send creates on split +f4f6bd7 OSD: dispatch_context only discard transaction if contexts empty +fec47ca OSD: don't wait for superblock writes in handle_osd_map +fdc5e5d os/: Add CollectionIndex::prep_delete +a48dee5 os/: Add failure CollectionIndex failure injection +bd46386 test/store_test: add simple tests for collection_split +f2a2391 os/: add filestore collection_split +a83d13a OSD: ignore queries on now deleted pools +3986564 Dropping xfs tests 179 and 183 as they are causing nightly failures +727c37a mds: journal remote inode's projected parent +3f69f72 mds: don't create bloom filter for incomplete dir +3cf2197 doc: write descriptions for the remaining msgr options +724d5aa doc: added some descriptions in ms-ref and filestore-config-ref +0756052 PG: remove last_epoch_started asserts in proc_primary_info +b76f12d doc: Edited striping section. Modified stripe graphic to pretty print. Also modified replication graphic to pretty print. +2ba9c87 mds: journal remote inode's projected parent +8cd8f25 mds: don't create bloom filter for incomplete dir +3ace9a7 logrotate: do not spam stdout +a74a4ac doc: Added a striping section for Architecture. +690f817 (tag: v0.55) v0.55 +234cc08 ceph.spec.in: Add SLES and remove Fedora from debug package list. +2604557 test_rados_api_misc: fix dup rmmkey test +f2c7a60 doc: Fixed many hyperlinks, a few typos, and some minor clarifications. +a7a3cbf doc: Clarified example for root user. +5bea57b config: we still want osd_thread_recovery_timeout +e686cb1 config: Remove unused options +6b105ae client: Fix ceph_mount() when subdir is specified +f57a798 osd: EINVAL on unknown TMAP op code +4870b43 mds: use TMAP_RMSLOPPY op when removing dentries +272e89d osd: add TMAP_RMSLOPPY op +9961640 osd: ENOENT on TMAP_RM on non-existent key +85574a3 os/JournalingObjectStore: applied_seq -> max_applied_seq +5281084 os/FileStore: only wait for applying ops to complete before commit +c10958e osd: fix RepModify when past last_peering_reset +880a185 OutputDataSocket: fix uninit var +3a064dc rgw: fix uninit var +648c7f0 test/osdc/FakeWriteback: fix uninit var +0dac9e6 osd: fix missing unlock; simplify +0fa4875 mds: fix freeze inode deadlock +2a50689 mds: use rdlock_try() when checking NULL dentry +1203cd2 mds: allow open_remote_ino() to open xlocked dentry +587aec1 mds: fix assertion in handle_cache_expire +961bc0c mds: fix open_remote_inode race +3fa2582 mds: consider revoking caps in imported caps as issued +4cd8ea9 mds: drop locks if requiring auth pinning new objects. +9bfe540 mds: don't forward client request from MDS +8f67489 mds: call eval() after caps are exported +ff170ec mds: clear lock flushed if replica is waiting for AC_LOCKFLUSHED +946b263 mds: Don't acquire replica object's versionlock +5620f3d mds: allow try_eval to eval unstable locks in freezing object +8dcc6c3 msg/Pipe: flush delayed messages when stealing/failing pipes +7794de6 rbd: report striping as a feature in rbd info +dccf6ee ceph-osd: put g_ceph_context before exit +49f32ce ReplicatedPG: only increment active_scrub on primary for final push +a928b6d OSDService: make messengers private +47699f3 osd/: make OSDService messenger helpers return ConnectionRef +494711e mon: PaxosService: cancel proposal timer after election +9cd730b doc: update kernel recs +dc93132 logrotate: fix rotation +909b92e mds: assert segements not emtpy in get_current_segment() +f0c2920 mds: be explicit about MDRequest killed state +41ef9bb mds: drop redundant mdr->committing = true +44bc687 mds: fix request_kill() +0ffafb3 Revert "osd: fix leak of heartbeat con on reset" +abd9e36 client: only dump cache on umount if we time out +6d65fa4 msg/Pipe: release dispatch throttle on delayed queue discard +158260b msg/Pipe: start delay thread *after* we know peer type +f0bf616 msg/Pipe: drop queue helpers +f454bb5 msg/Pipe: refactor msgr delays +b97aaca msgr: add a delay_until queue that is used to delay deliveries. +01059e9 msgr: clear out the delay queue when stop()ing +0e92f89 msgr: move the delay queue initialization into start_reader +90f6698 messenger: add the shell of a system to delay incoming Message delivery +bea3ecf rgw: treat lack of swift token as anonymous user access +6a69083 radosgw-admin: close storage before exit +774d5bf osd: move next_osdmap under separate lock +b31a99a osd: fix leak of heartbeat con on reset +3ceaec4 osd: use safe con helpers for scrub +f865f26 osd: use safe con helpers from do_{infos,queries,notifies} +30832f5 osd: make _share_map_outgoing() use a Connection +7d27e2e client: Fix for #3490 and config option to test +f9056f5 test/libcephfs: Test reading an empty file +5c8cbd2 PG: scrubber.end should be exactly a boundary +206f39e ReplicatedPG: remove from snap_collections even without objects to trim +8218d8a OSD: get_or_create_pg return null if pool is gone +f4f93f8 OSD: history.last_epoch_started should start at 0 +e2c4e2f PG: maintain osd local last_epoch_started for find_best_info +82517f1 hobject_t: make max private +0b55fbd Script to install and configure radosgw. +079dd19 mon: Monitor: don't allow '+' or '-' prefixed values on parse_pos_long() +c6cc476 mon: OSDMonitor: return -EINVAL on not-a-uuid during 'osd create' +a87361e osd: fix Connection leaks +e18f9ee osd: add Connection-base send_map(), send_incremental_map() +5bc10ec osd: use OSDService send_message helper from PG context +bd03234 osd: simplify active_committed +e165330 osd: use safe OSDService msgr helpers for heartbeats +ea65dff osd: helpers to blacklist messages to down osds +4c3d5dc test_cls_rgw.c: Call to cls_rgw_bucket_complete_op() needs new parameter. +24d61fa mon: add WARN_UNUSED_RESULT to the MonitorStore functions that return error codes +c762f91 mon: remove the silly write_bl_ss write_bl_ss_impl distinction +399f269 mon: convert store users with unchecked return codes to just assert on issues +ab312f8 mon: update Paxos::read()'s successful read check +3fe7c6c mon: add new get_bl_[sn|ss]_safe functions +60f60ff mon: In MonitorStore, wrap all uses of ::close and assert success +dd3a24a create qa/workunits/rbd/map-unmap.sh +5d6da25 rgw: bucket check --check-objects +e5dc46f rgw: check_disk_state() removes multipart parts from index +78286b1 log: 10,000 recent log entries +4de7748 log: fix log_max_recent config +39b93f5 mon: check all uses of fsync in the MonitorStore for errors +88a3e7d Makefile: fix libcephfs for gcov and cleanups +80c506d rbd: fix import from stdin, add test +fcebe04 rbd: allow export to stdout, add tests +a176800 mon: fix compiler warning +653f134 os/DBObjectMap.h: remove twice included +e7f8e56 mds/journal.cc: remove twice included common/config.h +1f3e5ad mon/Monitor.cc: remove twice included osd/OSDMap.h +ec2f261 messages/MClientRequest.h: remove twice included sys/types.h +34f6d29 mount/canonicalize.c: remove twice included string.h +54da979 common/pipe.c: remove twice included unistd.h +1341e6d crushtool.cc: remove twice included sys/stat.h +0718c15 rgw/rgw_rest.cc: remove twice included rgw_formats.h +947b33a os/DBObjectMap.cc: remove twice included headers +a0d978f remove twice included linux/types.h +238f932 rados.cc: remove twice included headers +428d974 osdmaptool.cc: remove twice included sys/stat.h +93ff160 os/IndexManager.cc: remove twice included FlatIndex.h +aee71e1 osd/OSD.h: remove twice included OpRequest.h +03a4c8c tools/common.cc: remove twice included headers +82c1f48 mds/Resetter.h: remove twice included msg/Messenger.h +428f300 mds/Migrator.cc: remove twice included Migrator.h +abc8cb6 mds/Dumper.h: remove twice included msg/Messenger.h +e1431b8 librados/RadosClient.cc: remove twice included sys/stat.h +1ca3d75 include/buffer.h: remove twice included stdio.h +9ac063a monmaptool.cc: remove twice included sys/stat.h +8a19b89 client/SyntheticClient.cc: remove twice included headers +f814afa fusetrace_ll.cc: remove twice included sys/time.h +3fa561e ceph_syn.cc: remove twice included sys/stat.h +8a6278e ceph_osd.cc: remove twice included sys/stat.h +5fb2185 client/MetaRequest.cc: remove twice included client/Dentry.h +f8ef4a8 client/Client.cc: remove twice included headers +c753f58 ceph_mds.cc: remove twice included sys/stat.h +1c0c055 ceph_fuse.cc: remove twice included sys/stat.h +f65307a ceph_mon.cc: remove twice included sys/stat.h +43ef8c1 mon: do not crash on invalid 'mon tell N ...' target +c99d9c3 rbd: fix import from stdin, add test +a738f44 rbd: allow export to stdout, add tests +cf2a045 config: make $pid a metavariable +aa37fe7 test_rados_api_misc: fix TMAPPUT sorting test +8850b3c ceph.spec.in: Fix typo. +a1e0868 README: add the libboost-thread-dev dep to the list +054f761 ceph.spec.in: Add new test programs to package. +dbb3fb1 Makefile: Add test/osdc/FakeWriteback.h to noship-headers. +10b68b2 osd: detect (some) misordered ondisk tmaps +bc77e52 osd: verify TMAPPUT data is sorted +29fae49 osd: do not ENOENT on missing key on remove +8e91d00 osd: tolerate misordered TMAP updates +a4439f0 osd: move tmapup into a helper +919db19 rbd workunit: Add tests for clones across pools +5164075 rbd workunit: Make "remove_images" silent +ca5549e rbd workunit: Add tests for cross-pool rename +bbd343a rbd: tests for copy with explicit/implicit pool names +e612afc rbd: fix import pool assumptions +81d3830 rbd: change destpool assumptions. +724cfd1 rbd: --size fixes +66b148e rbd: allow parsing image@snap even if --pool given +37adf2a packaging: Add ceph-test debian package +76e2601 ObjectContents.h: Fix compiler warning by adding parenthesis +af5d9e4 Makefiles: Use AM_CXXFLAGS for crypto library compiler options +1dc0fce ceph.spec.in: Enable rest-bench and debug configure options +c04fcaa ceph.spec.in: Add rest-bench and ceph-test packages. +10a35ca Makefiles: Update noinst_headers +3112cd8 test: mon: run_test.sh: helper script for the mon's workloadgen +2a68105 qa: workunits: mon: add workloadgen's workunit +e1820d8 test: mon: workload generator +f502907 messages: MLog: make ctor's uuid argument a const +3177774 mon: Monitor: use existing strict_strtol() on parse_pos_long() +f7276de crush: relax the order by which rules and buckets must be defined +1fcccd3 crushtool: rework how verbosity works +9e8c861 rgw: unaccount multipart parts when completing upload +d4bc372 fix syncfs handling in error case +ece11b0 rbd workunit: Add tests for clones across pools +0be9b15 rbd workunit: Make "remove_images" silent +a96ede9 rbd workunit: Add tests for cross-pool rename +3918043 rbd: tests for copy with explicit/implicit pool names +c219698 rbd: fix import pool assumptions +3b0c360 rbd: change destpool assumptions. +08f47a4 rbd: --size fixes +e452df6 rbd: allow parsing image@snap even if --pool given +854a786 mds: don't add not issued caps when confirming cap receipt +642ffc9 mds: check parent inode's versionlock when propagating rstats +a3aad3c mds: fix anchor table update +5731026 mds: don't expire log segment before it's fully flushed +3e988d4 osdc/ObjectCacher: touch Objects in lru +16215d9 osdc/ObjectCacher: remove unused waitfor_{rd,wr} +011d1e7 osdc/ObjectCacher: *do* pin object during write +6efe977 mon, osd: adjust msgr requires for CRUSH_TUNABLES2 feature +0cc47ff crush: introduce CRUSH_TUNABLES2 feature +88f2181 crush: for chooseleaf rules, retry CRUSH map descent from root if leaf is failed +0beeb47 rgw: document ops logging setup +6bc32b2 rgw: usage REST api handles cateogories +94423ac perfcounters: fl -> time, use u64 nsec instead of double +3a0ee8e perfcounters: add 'perf' option to disable perf counters +b1c7108 logrotate on systems without invoke-rc.d +a37c34d Search for srcdir/.git in check_version +d72c2c8 Removing ceph dirs while scrubbing ceph off the system +74b2a2d rgw: POST requests not default to init multipart upload +1f8c323 java: add ceph_open_layout interface +f0c608c client: add ceph_open_layout interface +365ba06 qa: add script to run objectcacher tests +525f942 init-ceph: do not make noise about missing devs +bc32fc4 syncfs: check for __NR_syncfs too +6890675 monmap: fix crash from dup initial seed mons +7602a05 osdc/ObjectCacher: fix BufferHead leak on ENOENT +df550c9 make mkcephfs and init-ceph osd filesystem handling more flexible +96b82eb mon: Monitor: wake up contexts based on paxos machine's state +3b061ab mon: AuthMonitor: increase log levels when logging secrets +7527a1e auth: Keyring: increase log levels when logging secrets +deabdc8 auth: cephx: increase log levels when logging secrets +d6cf77d crush: CrushWrapper: don't add item to a bucket with != type than wanted +95e1fe8 mon: PGMonitor: check if pg exists when handling 'pg map ' +1c715a1 mds: child directory inherits SGID bit +55081c2 crush: prevent loops from insert_item +b706945 Try using syscall() for syncfs if not supported directly by glibc +189d073 rgw: fix usage accounting +5126bd7 rbd: make snap purge fail if removing a snap fails +ddf377a rgw: fix cleanup +820911b msgr: use get_myaddr and set_myaddr to set the nonce +5c27bc4 rgw: fix cleanup +f40f715 rgw: signal shuts down fcgi socket +24fde54 crypto: fix nss related leak +7f221a5 rgw: fix xml parser leak +b3b77b6 rgw: fix memory leaks +c31f94d set the nonce unconditionally on bind +afd4da7 doc: Added FAQ back into toc tree. +0dbf6e8 test_librbd_fsx: Add OP_FLATTEN +7021f1a test_librbd_fsx: consume saved-image files as test runs +b35e37f osdc/Striper: fix handling for sparse reads in add_partial_sparse_result() +328d72d rgw: signal shuts down fcgi socket +4eb50e6 crypto: fix nss related leak +436baa0 java: add Java exception for ENOTDIR +700b5c0 qa/run_xfstests.sh: drop tests 174 and 181 +57c8116 doc: filename change to fix a link. +15f7713 doc: fixed links that broke due to new IA. +f86522c rgw: fix xml parser leak +98a04d7 rgw: fix memory leaks +394768b doc: Removed "deprecated" from toctree. Confused some users. +739bca1 doc: Removing old/unused images. +288db95 mon: shutdown async signal handler sooner +45c652d mon/AuthMonitor: refactor assign_global_id +92d6b8e mon/AuthMonitor: reorder session->put() +82042ad msg/Pipe: remove useless reader_joining +c07c93e msg/Pipe: join previous reader threads +c4caf87 msg/DispatchQueue: fix message leak from discard_queue() +183953e msg/SimpleMessenger: use put() on local_connection +3e2eb3a mon: clean up Subsription xlists +005967d mon: drop con->session reference in remove_session() +6d3afce mon: sessions get cleaned up before dtor +e0e9a2d msg/Pipe: don't leak session_security +d005732 mon: Monitor: make MSG_MON_PAXOS case a bit more consistent +bbe2e1a mon: Paxos{,Service}: finish contexts and put messages on shutdown +9e3ceca mon: Monitor: finish contexts on shutdown +900a0fa mon: Monitor: drop election messages if entity doesn't have enough caps +988f92a mon: remove all sessions on shutdown +5cf6c7e ceph_mon: cleanup on shutdown +68491af rgw: add -lresolv flags to Makefile.am +7903aab mon/MonClient: use thread-safe RNG for picking monitors +07c831a upstart: fix limit lines +b4a769d upstart: add ceph-osd-all-starter.conf +ff0a44b upstart: make ceph-osd-all, ceph jobs +3610754 Makefile.am: fix LDADD for test_objectcacher_stress +12eb797 client: fix lock leak in lazio_*() failure paths +be11c31 upstart: set high open file limits +25f003b msg/Accepter: only close socket if >= 0 +30373ce osd: default journal size to 5GB +a562518 librbd: take cache lock when discarding data from cache +2e862f4 ObjectCacher: fix off-by-one error in split +fdadefe ObjectCacher: begin at the right place when iterating over BufferHeads +20a0c56 ObjectCacher: add debug function to check BufferHead consistency +5d760b7 ObjectCacher: more debugging for read completions +c054ad6 ObjectCacher: assert lock is held everywhere +7570e6c ObjectCacher: debug read waiters +8c96161 ObjectCacher: don't needlessly increment iterator +b948e4c ObjectCacher: retry reads when they are incomplete +29a96cf rgw: ops log can also go to socket +7b96807 doc: Added links to APIs. +feb8451 doc: don't use 'pool=data' as an example +c42af80 doc: Added documentation for using CPU profiler. +84eac86 doc: Added documentation for installing CPU profiler. +3ccaaa0 doc: Added librbd to the RBD toc. +9ea2609 doc: Added libcephfs to the CephFS section and moved librbd to RBD section. +8da6dde common/ceph_argparse: fix malloc failure check +e82ca0d mon/MonClient: initialize ptr in ctor +8f1f36d os/FileStore: fix fd leak in _rmattr +426b58d os/FileStore: fix fd leaks in _setattrs +1df38fd osdc/ObjectCacher: faux use-after-free +9a10ebb test: add ObjectCacher stress test that does not use a cluster +fd928b9 ObjectCacher: more debugging for BufferHeads +8b187bd build: update for boost_thread library. +493049b mon: OSDMonitor: clarify some command replies +0b28ef6 mon: OSDMonitor: fix spacing when outputting items on command reply +f0c7bb3 build: update for boost_thread library. +c707568 doc: fix crush set syntax +71cfaf1 os/FileStore: only try BTRFS_IOC_SUBVOL_CREATE on btrfs +3ca947e mon: clean up 'ceph osd ...' list output +344c4fd mon: correctly identify crush names +592a894 mon: use parse_osd_id() throughout +918c58c PrioritizedQueue: remove internal lock, not used +b53e06c DispatchQueue: lock DispatchQueue when for get_queue_len() +659d4c2 run_xfstests.sh: activate more tests that now work +22cb135 doc: add Hadoop configuration parameters +63c5128 smalliobench: fix init-only, add don-not-init +b40387d msg/Pipe: fix leak of Authorizer +12c2b7f msg/DispatchQueue: release throttle on messages when dropping an id +5f214b2 PrioritizedQueue: allow remove_by_class to return removed items +98b93b5 librbd: use delete[] properly +4a7a81b objecter: fix leak of out_handlers +ef4e4c8 mon: calculate failed_since relative to message receive time +9267d8a rgw: update post policy parser +f6cb078 mon: set default port when binding to random local ip +ce28455 rgw: relax date format check +0a2a0c0 doc: config-cluser move to new IA. +5c302eb doc: Move of cluster ops for new IA. +8430210 doc: add-or-rm-mons.rst: fix typo +4a34965 client: register admin socket commands without lock held +4db9442 objecter: separate locked and unlocked init/shutdown +d395131 osd/: add config helper for min_size and update build_simple* +d5bc66a doc/release-notes: fix heading +74f7607 doc: release-notes for v0.54 +0d42e97 doc: update crush weight ramping process +131d15a rgw: fix warning +a0eb891 osd: default pool min_size to 0 (which gives us size-size/2) +1d00f3a mon: default min_size to size-size/2 if min_size default is 0 +9d979d7 osd: default min_size to size - size/2 +735df02 mon: helpful warning in 'health detail' output about incomplete pgs +1679a55 osd: start_boot() after init() +65961ca vstart.sh: support -X by adding 'auth required = none' entries +60b84b0 (tag: v0.54) v0.54 +5d27f3d rgw: compile with -Woverloaded-virtual +1be9923 rgw: fix RGWCache api +e0e33d2 rgw: fix RGWCache api +9a38059 osd: remove dead rotating key code from init +eee0982 osd: defer boot until we have rotating keys +193e2ea PG: persist divergent_priors in ondisklog +fcbbebc PG::merge_old_entry: fix case for divergent prior_version +f299be0 PrioritizedQueue: use iterator to streamlink SubQueue::remove_by_class() +95cb6cf PrioritizedQueue: avoid double-lookup on create_queue() +57a6255 osd/: de-prioritize recovery ops relative to client ops +bd4707a msg/: use PrioritizedQueue to handle DispatchQueue queueing +5d47db2 OSD: queue ops based on message priority +a62d778 OSD: use PrioritizedQueue for OpWQ +f02c75e WorkQueue: Add WorkQueueVal for passing params by val +25eb1fb common: Add PriorititizedQueue +bbdae98 Pipe: we don't queue DispatchQueue codes on an actual pipe +d129112 common: add RefCountedObj.cc with intrusive_ptr hooks +1c20ea9 rgw_cache: change call signature to overwrite rgw_rados put_obj_meta() +da0ea9f rgw: unquote etag for if-match +096c8ac rgw: use thread safe version of gmtime +cc06090 rgw: don't convert object mtime to UTC +c4981b8 java: remove redundant src.dir +efdb209 doc: reorder some openstack/rbd instructions +caed0e9 osdc/ObjectCacher: do not take Object ref for bh writes +8b4bdda client: Remove object from oset before deleting +0b85e43 java: fix build.xml formatting +8970e81 java: fix javadoc builds +a11940f osdc/ObjectCacher: only return ENOENT if ObjectSet is flagged +16db00d client: unregister commands on shutdown +7d1974c client: fix null dentry crash on dump_cache +ad3063a client: dump mds session info +fc6b82f client: add dump_cache asok command +2c28e5d common: dumpers for ceph_{file,dir}_layout +69c47d3 client: add mds_requests asok command +809d0e5 Makefile: fix hadoop lib build +ef71f32 Makefile: use libclient.la for libcephfs +2f24168 client: fix null put in ~MetaSession +8b1f547 librbd: fix create existence checking +614cf34 librbd: debug when copy occurs +9c31d09 mon: kick failures when we lose leadership +e43f9d7 mon: process failures when osds go down +763d348 mon: ignore failure messages if already pending a failure +23531c2 osd: add 'osd debug drop op probability' +efa03ce mon: require pgnum in 'ceph osd pool create []' command +cda9e51 librbd: return actual error when detecting format fails during creation +3d76e67 java: add symlink/readlink tests +6dd7925 test_libcephfs: fix, add symlink loop tests +3902a01 debug: adjust default debug levels +6c0be02 client: simplify/fix symlink loop check +d037ff4 client: fix path_walk for directory symlinks +cd14453 OSDMonitor: remove max_devices and max_osd interdependency +ae1f46c mds: re-try_set_loner() after doing evals in eval(CInode*, int mask) +07b4f8f si_t was not properly converting values < 100KB +8f49de0 osdc/ObjectCacher: only call flush callback if we transitions to clean +0cfe632 cleaned up scripts Signed-off-by: tamil +54f6c17 client: ensure we don't leak MClientReply +a8053c1 ceph-fuse: fix leak of args +b305fc8 osdc/ObjectCacher: fix leak on readahead +1c9ec26 ceph.spec.in: Build debuginfo subpackage. +de2cd18 test: add cli test for missing args to rbd +34ebda2 rbd: check for second argument to mv/rename +9aae0ee rbd: check for second argument to mv/rename +5ef16ed test.sh: Adding LD_LIBRARY_PATH so JUnit can find .so files. Removing useless java.library.path references. +9e9feff doc/cluster-ops/pools.rst: Added documentation for min_size +b5ce4d0 client: fix SnapRealm leak +56a152b client: debug SnapRealm reference counting +a34a9af vstart: allow minimum pool size of one +88cdde3 client: fix leak of Cap +5e564f9 client: fix leak of session release msg on session close +c352edd client: only start invalidator thread if cb != NULL +44a7017 ceph-fuse: deallocate messenger, g_ceph_context on stop +fe6e426 doc: add-or-rm-mons.rst: fix a formatting typo +5b32664 doc: add-or-rm-mons.rst: make paths clearer +66e6a63 client: give get_caps() out-arg a less confusing name +ad4bd4e client: do not gratuitously drop FILE_CACHE ref in _read() +128fed8 client: assert cap refs don't go negative +dc907e2 librbd: take parent lock when examining fields it protects +a183fe7 OSDMap.cc: Add pool name to OSDMap dump +faf23ca rbd: fix snap unprotect, which was succeeding while clones existed +77b4237 librbd: no need to scan snapshots for parents during remove +c45a415 script clean up +9ea95a0 Added a function get_cmd_op Signed-off-by: tamil +fc0d6d3 docs: add keystone documentation +5fda39e rgw: change configurable +a99b0fa rgw: fix build +8fcd351 rgw: use a different boost thread library +ff8c238 rgw: keystone tokens revocation thread +b69da4b json_spirit: thread safe +feb24af rgw: decode pki tokens +02c2c32 rgw: invalidate revoked tokens +1f05b1a rgw: keep pki tokens by hash +8249d7b rgw: decode revocation message +0d164da rgw: use thread safe version of gmtime +ff5ee98 build: Add RPM release string generated from git describe. +82ebbab doc: Clarified text to reflect requirement for majority, not odd number of monitors. +a39110d ceph.spec.in: Remove ceph version requirement from ceph-fuse package. +e37c192 rgw_admin: do not throw error when start-date and end-date are not passed to usage::trim() +b7da8bb libcephfs_jni.cc: mtime and atime are Long data types. Changing the accessor methods to reflect this fact +1581db9 configure: fail when missing junit dependency +a47a966 Makefile: include Java test suite artifacts +2dfc103 Makefile: include Java unit test runner +55483d7 Makefile: only add source files to EXTRA_DIST +74cc299 Makefile: use real file for make target +4f215b0 Makefile: remove redundant EXTRA_DIST +c3129a2 Changing build.xml to produce a jar instead of class files Adding a TestSuite class to run all tests Remove the libcephfs-test.jar when running ant clean +7701542 Adding libcephfs-java.jar to .gitignore +791a822 Adding a simple workunit that executes one libcephfs-java test +5dec917 Moving test java files into a proper heirarchy. Moving the compilation of tests classes from build.xml to Makefile and editing configure.ac to look for the junit4 jar in the default location of /usr/share/java. It is still possible to build and run tests from build.xml as well as Makefile. +08ee736 java: fix return type on JNI function +b1b9f0a vstart.sh: allow shorter MON, OSD, MDS count env vars +8ccccbb osdmap: make flag names match +f2bf7aa mon: make osdmap flags incur a health warning +9373452 doc: Rewrote index for install section per new IA. +f2fbe7a doc: Removed source/index from top-level toc tree per new IA. +6f6df5c doc: Moved doc/source files to doc/install per new IA. +059294c doc: Syntax cleanup for new IA. Fix tip. Clean up for generating keys. +631075d doc: Syntax cleanup for new IA. Added reference to repo. +7a1e952 doc: Syntax cleanup for new IA. +e11cafb doc: Syntax cleanup for new IA. Removed steps for building docs. +b5ae387 doc: Syntax cleanup for new IA. Removed info for building documentation. +9eb0b2b doc: Syntax cleanup for new IA. +e144582 doc: update the rest of the table for debian wheezy +cdd73bb doc/: document recovery reservation process +0ed0d2a pg: recovery reservations +9d9a222 doc: Wheezy is now using kernel 3.2.0; say so +e7c02b3 doc: Fix per-daemon public/private settings: "network" -> "addr" +eac614a doc: Clarify "pool size", copies, and replicas more +52bada5 doc: fix Hadoop config option typo +97c19da rgw: unquote etag for if-match +d3553a5 doc: Made changes to the CSS to make admonitions more prominent. +067953f doc: Added lines between title and body. Pre IA cleanup. +282ac92 doc: Updated syntax for consistent usage prior to IA updates. +d1404c3 doc: Updated index for removal of legacy openstack install. +9127ebd doc: Minor edit to admonitions. +04f661f doc: Updated syntax prior to IA updates. +d38df17 doc: Updated syntax usage prior to IA updates. +ee07b22 doc: Added new info per Ross's request. +a1b2f58 doc: Fix and minor edit for admonitions. +e1195fd doc: Minor edits for admonitions. +6731b55 doc: Edits from Peter Reiher's feedback, and minor edits for admonitions. +2260e15 doc: Minor edits for admonitions. +07f60d4 doc: Added topic for adding OSDs and adjusting CRUSH weights. +0a939d0 doc: Removed legacy OpenStack installation. +5ef58d3 doc: Added topic for adding an OSD and adjusting CRUSH weights. +50d3598 rgw: don't convert object mtime to UTC +c357474 ceph.spec.in: Remove ceph version requirement from ceph-fuse package. +cca606f Update log file when rgw is not running +1348685 osd/: add pool min_size parameter for min acting set size +60a9816 qa: Script to run fio and template file +456c90b Makefile: add missing rgw_resolve.h to dist tarball +ca89880 client: kick waiters for an mds session to open on mds recovery +f0927cb qa: disable xfstest 45 until mount issue is resolved on precise +02527d4 qa: disable xfstest 45 until mount issue is resolved on precise +0baa927 cls_rbd: send proper format of key to "last_read" for dir_list +fe9a441 rgw: document cname configurable +951c6be rgw: resolve hostname dns cname record +6aa9cff java: use accessors for mode flag tests +84299e1 rgw: fix multipart overwrite +be6d563 rgw: don't reset multipart parts when updating their metadata +488b019 rgw: break out of read loop if we got zero bytes +138262f doc: fixed some inccorrect syntax. +2a69627 mds: move to from loner -> mix if *anyone* wants rd|wr +4b3f97d mds: base loner decision on wanted RD|WR|EXCL, not CACHE|BUFFER +307fd24 librbd: fix memory leak on read +241569c rbd: allow removal of image even if rbd_children deletion fails +4b4e0fa rbd: allow removal of image even if rbd_children deletion fails +3162f13 rgw: configurable swift token ttl +0f7dada client: Add symlink loop checking in path_walk() +60e54d6 client: Fix path_walk() to support dir symlinks +beaafe8 test: Add tests for symlink pathological cases +15b3d98 doc: Minor edits and added reference to Cephx intro. +85cd694 osd/: encode LOST_REVERT reverting_to in prior_version pos +bad0114 PG: use remove_object_with_snap_hardlinks for divergent objects +699e54d rbd: stripe count is not measured in bytes +0db11c7 chain_xattr: use sys_* methods +8c3481d os/FileStore: chain_*() methods return error codes; don't check errno +9cf0be7 chain_xattr: comment about how xattrs are named +2bf6a2b os/chain_xattr: whitespace, constify *end +be438dc os/chain_xattr: do not double memory buffer (again) +b7f89cb os/chain_xattr: fix listxattr buffer size +5496600 os/FileStore: introduce lfn_close() +51d3faa os/FileStore: remove lfn_*xattr helpers +044be91 os/FileStore: recast _rmattr on top of chain_f* +6a6699b os/FileStore: recast _setattrs() on top of chain_f* methods +41bc77f os/FileStore: drop _getattr() helpers +d59cf33 os/FileStore: use new helpers from collection_{get,set,rm}attr[s] +b6bfeed os/FileStore: use _fgetattr() from getattr() +307fd42 os/FileStore: remove unused _getattrs() methods +1862ddd os/FileStore: use _fgetattrs() from collection_getattr() +a367e6e os/FileStore: use _fgetattrs() from _rmattrs() +cab1d63 os/FileStore: use _fgetattrs() for _setattrs() +ad5ac17 os/FileStore: use _fgetattrs() for CLONE +769f473 os/FileStore: use _fgetattrs() for GETATTRS op +68377f9 os/FileStore: add _fgetattr(), _fgetattrs() helpers +bb127bd os/FileStore: use f*xattr() methods to test xattr support +4e55303 os/chain_xattr: move chained xattr helpers into separate file/module +e49969a test script for s3 tests Signed-off-by: tamil +7e57c5f librbd: better debug output +8d8726a osdc/ObjectCacher: wake all rx waiters on ENOENT +7731d47 test_librbd: add additoinal clone test +41812c2 osdc/ObjectCacher: trigger copy-on-write before read +674d266 osdc/ObjectCacher: return ENOENT +cde4dd0 osdc/ObjectCacher: remove BufferHeads on ENOENT +1a7caa4 osdc/ObjectCacher: clear complete if may-cow and !exists +f8e92a1 osdc/ObjectCacher: add object exists flag +890e492 librbd: remove parent logic from reads beneath the cache +09dc191 osdc/WritebackHandler: add may_copy_on_write() +f6d2e9a osdc/Striper: more debug +e506362 librbd/AioCompletion: ensure read result assembly happens last +8712958 librbd: complete Context on error from ObjectCacher::readx +72a710a client: return EBADF for invalid file desc +132fb34 doc: describe Hadoop configuration options +342c2c7 PG::merge_old_entry: fix case for divergent prior_version +7e26467 PG: use remove_object_with_snap_hardlinks for divergent objects +7483d1f msg/Accepter: use derr +769bac8 msgr: change port range from 6800-6900 -> 6800-7100 +623553d msgr: make bind port range configurable +49bd8ab librados: move misc tests into test/librados/ dir +5893dd5 librados: test/rados-api/* -> test/librados/* +80880ee client: always follow non-trailing symlinks +4fc67c5 client: simplify path_walk() loop +6f7a632 client: Support for fchown +e4aa6d7 cls_lock: reorg test_cls_lock +0eedc78 cls_rgw: reorg test_cls_rgw +a1402b5 fix cls_rbd reorg +ddf096b librbd: reorg rbd tests +b749323 cls_rbd: move into new location +bcefc0e msg/Pipe: fix leak of AuthSessionHandler +4bff87d doc: Added qemu caching section. +f171aba doc: Added Commandline Usage and a few fixes. +f7412fe crypto: add cms utility function +c51e1f9 test script for s3 tests Signed-off-by: tamil +a7e1368 test: Add symlink test for absolute paths +4cd47c4 client: Fix state of symlink with absolute path +bc4e6b9 doc: Changed term "kernel object" to "kernel module". Added hyperlink to cephx. +019fee8 doc: Improved the landing page for RBD. +536d764 doc: Clarified text and added reference back to main RBD pages. Added sidebar. +2b2ac13 doc: Changed RBD to librbd cache for accuracy. +a01b112 doc: changed --user to --id, and fixed a typo. +a7551e4 run_xfstests.sh: add optional iteration count +dfc57c4 doc: minor edits to the index. +968b315 doc: Added layering to the snapshot section. +6c5de99 osd: add PG state recovery_wait +d2c6d44 message: add MRecoveryReserve +23dbe3e message: add missing print statement for REJECT message +614cb50 PG: correct sub-state names in ReplicaActive +15ada1c doc: update notes on new rpm-based platforms +45005d3 doc: fix os-recommendations table +2d52d7c doc: Index entry for OS Recommendations +049e7fb doc: update os-recommendations +c435d31 ceph-disk-activate: avoid duplicating mounts if already activated +da9aed9 osd/: add pg_log_entry_t::reverting_to for LOST_REVERT +29a03f0 rgw: parse keystone token expiration +3f08e96 PG: requeue snap_trimmer after scrub finishes +1bb6537 PG: requeue snap_trimmer after scrub finishes +c62f3dd rgw: cache keystone tokens +310796a doc: tiny syntax fix. +eac443e doc: Added internal anchor references. +3c034ae doc: using remote copy +1351e76 README: add libboost-program-options-dev +f944386 rgw: map keystone tenant id to rgw user +6bbe7db configure.ac: add program_options header check +88f4823 rgw: handle keystone roles +421c352 rgw: auto create rgw user for new keystone users +845e862 rgw: handle keystone tokens +9df953c rgw: extend rgw json parser api +9608a88 ReplicatedPG: actually delay op for backfill_pos +550ef50 Finisher: add perf counter for queue len +8d27eda FileJournal: rename queue_lock to finisher_lock +1a5b626 FileJournal: write_cond is not used +c6c8fce FileJournal: break writeq locking from queue_lock +2646a8f Throttle: reduce lock hold periods +bc91f9d os: instrument submit lock, apply lock, queue_lock, write_lock +2ed667a FileStore: add op_throttle_lock +542e134 FileStore: don't lock op_tp in queue_op +a8ac453 perf_counters: add dec() +9601b29 JournalingFileStore: move apply/commit sequencing to apply_manager +1d9f5d2 JournalingFileStore: create submit_manager to order op submission +117ac90 JournalingObjectStore: remove force_commit, no longer needed +2d180e7 JournalingObjectStore: whitespace fix +c2c912b FileStore: remove trigger_commit +5326c22 JournalingFileStore: pass -1 as the alignment if unimportant +f7727dd FileStore: next_finish is not used +a268afa test/bench: add tp bench +e814d8f test/bench: small io benchmarker +fe2814e Mutex: Instrument Mutex with perfcouter for Lock() wait +184a676 msg/SimpleMessenger: start accepter in ready() +c830a9b mon: separate pre- and post-fork init +5dd5471 msg/Pipe: fix seq # fix +1db4bd9 osd: verify authorizers for heartbeat dispatcher +6d3cafc rgw: refactor curl functionality +44818eb rgw: configurable swift auth url +a12bc43 doc: fix typo in cinder upstart config name +06c62c5 doc: Added syntax fixes to Peter's session authentication doc. +402e1f5 ceph-disk-prepare: poke kernel into refreshing partition tables +2e32a0e ceph-disk-prepare: fix journal partition creation +8921fc7 ceph-disk-prepare: assume parted failure means no partition table +a4db58f msg/Pipe: whitespace cleanup +02f6262 msg/Pipe: only randomize start seq #'s if MSG_AUTH feature is present +3a48cbf doc: update fs recommendations +1a236e1 cephx: don't check signature if MSG_AUTH feature isn't present +56bce3b auth: include features in cephx SessionHandler +100fcca Fixed problem with checking authorizer in accept(). +5324d2d librbd: Fix 32-bit compilation errors +2157bcb Temporary patch to a problem in Pipe related to monitor initialization. +b9eccdf osd: make pool_snap_info_t encoding backward compatible +7239e80 dep-report.sh: ceph package dependency report. +1638f62 client: Fix ref counting double free with hardlink +49ca7d5 test: Functional test for hardlink/unmount pattern +84c7a34 osdc/ObjectCacher: remove dead locking code +17c8589 librbd: clip requests past end-of-image. +86de1fa librbd: size max objects based on actual image object order size +07e7bc3 rgw_cache: change call signature to overwrite rgw_rados put_obj_meta() +3384431 mds: Fix SnapRealm differ check in CInode::encode_inodestat() +eafe0a8 mds: allow try_eval to eval replica locks +f0c2e12 mds: Send mdsdir as base inode for rejoins +ceeebaf mds: Fix stray check in Migrator::export_dir() +d2ac024 mds: fix stray migration/reintegration check in handle_client_rename +2f09d47 mon: fix leading error string from 'ceph report' +9cea181 doc: updated front page graphic. +65ed99b PG: Do not discard op data too early +047f58d java: use unique directory in test +0a1e0b7 java: add tests for double mounting +be94fb4 java: add AlreadyMounted exception +13f76df java: remove deprecated ceph_shutdown +16a4c92 java: clean-up in finalize() +d88c60c java: enable ceph_release +5c91428 java: enable ceph_unmount +7e7e06f java: mkdirs returns IOException +9c9c247 java: log listdir contents in java client +4a5abc6 java: remove tabs to fix formatting +1c45775 java: add O_WRONLY open flag +712bfa5 java: add FileAlreadyExists exception +d4da4dc doc: fix warning in JavaDoc +1de3305 osdc/ObjectCacher: handle zero bufferheads on read +94a84d2 osdc/ObjectCacher: add ZERO bufferheads from map_read() +fde7fe6 osdc/ObjectCacher: add zero bufferhead state +4fb6a00 test_librbd_fsx: sleep before exit +45946c2 osdc/ObjectCacher: some extra debugging +fdf556a osdc/ObjectCacher: fill in zero buffers in map_read() on miss if complete +9dc887d osdc/ObjectCacher: improve debug output for readx() +b9b1be6 osdc/ObjectCacher: set complete flag when we observe ENOENT +94d2b91 osdc/ObjectCacher: clear complete on trim, release +ab56e41 osdc/ObjectCacher: add complete flag +f3db940 osdc/ObjectCacher: refresh iterator in read apply loop +e287296 osdc/ObjectCacher: do read completions after assimilating read result +9407046 osdc/ObjectCacher: do not close objects explicitly +8920f41 osdc/ObjectCacher: make trim() trim Objects +f241e22 osdc/ObjectCacher: check lru_is_expireable() in can_close() +cd8e991 osdc/ObjectCacher: add LRU for Object +46897fd osdc/ObjectCacher: take Object ref for bh writes +21dc0e0 osdc/ObjectCacher: take refs for inflight lock ops +57e18a7 osdc/ObjectCacher: take Object ref when there are buffers +a34a8b8 osdc/ObjectCacher: add ref count to Object +24d07e8 osdc/ObjectCacher: rename lru_* -> bh_lru_* +57a4cbb librbd: fix race in AioCompletion that are still being built +e225767 doc: add JavaDoc to Sphinx +ffb8c60 Various cleanup changes to session authentication code. +67bc92a client: add ceph_release, ceph_shutdown +f1eef53 client: double mount returns -EISCONN +c9ca3c9 client: do not reset session state on reopened sessions +3153ec7 mds: fix handling of cache_expire export +4ac4520 mds: do not mark closed connections disposable +ad839c7 mds: use connection on closed sessions in force_open_sessions +53b354d doc: update copyright to include contributors, CC +c33f93d rgw: abort multipart upload uses part manifest +c0df832 osd: fix populate_obc_watchers() assert +3eda37a mds: check getcwd() return value +1afa8ff leveldb: fix accidental submodule revert +a5eb72b doc: note raw format required for openstack/rbd +ee2ce73 rgw: multipart manifest uses parts built manifest +43caeeb rgw: multipart uses striping +f085708 rgw: remove objects on failed upload +19a7f5a rgw: atomic object data is being split over multiple parts +1ebf0b7 rgw: fix multipart overwrite +38f4d6a rgw: don't reset multipart parts when updating their metadata +5c1252f rgw: break out of read loop if we got zero bytes +345bcac mds: fix #include for getcwd(), simplify +8c16a83 doc: Added hyperlink. +da8bb88 doc: Fixed usage and deleted legacy values. +e510677 vstart.sh: Use ./init-ceph instead of CEPH_BIN +1921a06 Script that generates perl wrapper for teuthology tests +18731b4 rgw_admin: do not throw error when start-date and end-date are not passed to usage::trim() +bfc4904 rgw: better error responses, logging for specific error cases +30d11f4 rgw: POST fixes, policy range, policy expiration +7bb3504 rgw: handle expiration and content length policy conditions. +ca1e177 rgw: implement POST key can use ${filename} +d7b5942 rgw: return correct responses with POST +3faf6ab rgw: handle success_action_redirect +846bb34 rgw: handle policy as case insensitive where required +391775b rgw: handle missing content length in POST +fc05b63 rgw: handle x-ignore- in POST request +52b78d5 rgw: verify that request variables are in policy +86b06f1 json_spirit: update grammar +ccd757f rgw: add policy decoding code +5b90d10 rgw: basic policy functionality +81f257d rgw: add a test tool for json parser +c2b702f rgw: adjustments for 100-continue +d6d3bf0 rgw: handle content_type, meta +9f9bc77 rgw: helper functions to parse multipart form +1bafe7c rgw: Create JSON parser +256bd62 rgw: Implement POST object to publicly writeable buckets. +7c67230 osd/osd_types: make stat osd_op print nicely +4240846 librbd: use assert_exists() to simplify copyup check +e609c8a librados: add assert_exists guard operation +59839a8 librbd: validate copy size against proper snapshot id +eed28da osd: return EOPNOTSUPP on bad class or method name +31260a3 leveldb: fix accidental revert +b85cde5 rgw: dump an error message if FCGX_Accept fails +d4f0a88 workqueue: make debug output include active threads +4d20b60 msg/Pipe: fix tight reconnect loop on connect failure +54cab4d throttle: less default log noise +3dffa6d rbd: document defaults for rbd bench-write +ac07afa test: Dont check initial permissions +84a35f8 Makefile: include java in dist tarball +3cc39f5 rgw: check client write status on swift get_obj +a755674 rgw: don't continue processing of GET request on error +2248822 osd: drop conditional check in populate_obc_watchers +4156b98 osd: populate obc watchers even when degraded +a135352 run-cli-tests: Include rationale for cram patch and pointer to issue. +a7a6850 doc: Changed rack, row text to row, rack. Fixed some syntax. Added note. +3d0a522 vstart.sh: cephx on by default, -X to disable +2d20f3a objecter: move map checks to helper +da5b244 mds: avoid copy in SessionMap::get_or_add_session() +7a3ccef librbd: init layout in ImageCtx ctor +2c45d1c librbd: init vars in AioRequest ctor +d2f07cc mon: pass by ref +0fedc28 monmap: pass by ref +7d9ee17 client: release import caps we don't have +66bda16 auth: change default: require 'cephx' for daemons +91a2492 mds: fix typo, build +5fb8a22 mds: make dup session close an error; make case consistent +e6cbcb2 mds: deal with the case where you have a Session close event without a Session. +5e221a4 doc: Added clarification from Peter's feedback. +3870ce2 doc: Added backward compatibility text. Additional cleanup. +50bb659 man: update ceph-debugpack, ceph man pages +c18e17d rbd: update man page build +69a96bb doc: clean up doc build directions +ebcad66 Stopped logging keys in session authentication code. +b3cc40a java: update deb bits from ceph-devel feedback +ad3482b java: add test for mount with bad root +941ac2f Makefile: add src/include to #include path for libcephfs_jni_la +4a0398d do_autogen.sh: add -j flag to enable java stuff +9feb4af debian: add libcephfs-java package +68e0164 automake: setup autotools to build cephfs-java +3504335 java: add Java and C++ source files +d2f0f89 libcephfs: return error when not mounted +233b0bd test/libcephfs: Fix telldir/seekdir test +cc8b9e2 mds: use const ref instead of large pass-by-value +ae8aaa4 mds: annotate switch case fall-thru +667fb72 mds: fix coverity warnings on NULL deref +1e987ea mds: fix possible inode_t::get_layout_size_increment() overflow +96ff10a mds: init cap_reconnect_t::flock_len +091d16a mds: init in cap_reconnect_t ctor +46054ce mds: init inode_t::dir_layout +86b4317 rbd: implement bench-write command +04d32e7 rbd: print useful error message if striping is specified for format 1 +58e920b client: Fix permissions checking for O_WRONLY +352a7e2 test: Make the test filename unique to test +b19ac61 client: Fix permissions error on open with O_CREAT +0571cb7 S3 test scripts +f6b7b5c doc: minor fix on user name for GW script. +43e8f76 Cleaned up +1c38286 addr_parsing: make , and ; and ' ' all delimiters +e0b3213 vstart.sh: log client to out/$name.log +03887e0 client: fix signed/unsigned comparison warning +1fc18c4 mon: MonitorStore: fix error checks for mkdir operations +e8df212 leveldb: revert accidental rewind +85a26ad client: initialize tid in MetaRequest ctor +676db60 test/libcephfs: Fix telldir/seekdir test +51858b7 test: Add libcephfs tests for stat, lstat, chmod +c68c516 client: Fix stat of relative symlinks +b4bfade doc: Fix wrong wording for symlink xattrs calls +809587c client: Implement lchown in Client and libcephfs +39fcd7e test: Add libcephfs tests for stat, lstat, chmod +9b0c88b client: Implement stat and correct lstat +14ef165 client: Support for fchmod +a0f65a1 mon: MonitorStore: check return value of 'rename' for errors +e41caa1 mon: MonitorStore: check mkdir return value for errors +2549bb8 mon: MonitorStore: check return value for errors on 'open' +6d7dea3 mon: AuthMonitor: check return values +0292349 mon: LogMonitor: check return value when writing to file +47a4a7c mon: Monitor: unlock before returning +52dedc8 mon: Monitor: fix potential null-pointer dereference +64bf7f9 leveldb: update .gitignore +bcd6aea monclient: drop now-unused MonClient::is_latest_map() +8ed86ee test: Add func. test for chmod in libcephfs +328bf48 client: Add permissions checking to open +ee20cd0 rbd: reject negative size (can make image that is hard to delete) +8791db7 qa: run multiprocess rados tests +935d579 testrados_watch_notify: fix most tests, disable one +c9de24f testrados_list_parallel: fix +cce58a3 objecter: refactor pool dne checks +dc2ec37 objecter: fix handling for pool DNE on pgls +ed46a85 version: drop 'commit:' prefix on sha1 +6f74e6b radosgw: fix compile warning +ab4d8b7 doc: Updated the cephx section of the toc for cluster ops. +256c665 doc: Did a little clean-up work in the cephx guide. +0818e1e doc: Added a new intro for cephx authentication. +d2afddd rgw: multiple coverity fixes +58020d4 test: Add a workunit for chmod +db97666 mds: explicitly queue messages for unconnected clients +2542dd5 client: fix implemented caps update on release/flush +b290dc3 MClientRequest: fix mode formatting +2528b5e (tag: v0.53) v0.43 +0d3a53d msg/Pipe: correctly read from peers without MSG_AUTH +96e365b radosgw-admin manpage: Fix broken quotes +412efc1 admin_socket: fix '0' protocol version +a43ba9a rbd: fix striping feature bit addition +7957500 librbd: log why create failed when striping features missing +b7682c5 librbd: use map-based stripe method to avoid fragmenting io +d68a806 striper: expose method that works directrly from a map<> +5599eb7 Striper: move from Filer +ff304c8 librbd: implement user-facing image to image copy +6242059 librbd: factor out copy from image create/open/close +5d5863c librbd: rename get_size() -> get_current_size() +c7b5cdf filer: trivial unit test +17bb2c5 osd: include buffer_extents in ObjectExtent operator<< +e6c98e9 filer: more debug output +b4f2829 filer: fix add_partial_sparse_result +059ebac test_librbd_fsx: randomly vary striping on clone +a736cb0 librbd: allow striping to be specified for clones +819f939 filer: add debug printability for striped read result stuff +80ebcee filer: uninline StripedReadResult +fd8013a librbd: avoid read copy for c++ api read +ecb040c librbd: read_from_parent into a bufferlist +b1b3324 librbd: use bufferlist target for read_iterate() +a8042c7 librbd: make read methods target buffers or bufferlists +94de63a librbd: kill unused get_block_osd() +e9e197b librbd: kill legacy striping helpers +d556eda librbd: reimplement flatten in terms of child objects +cdb165e librbd: write sync read over an extent list +2660129 librbd: make rollback use new striping accessors +113f698 librbd: make trim_image() behave with new world striping order +0aeedf6 librbd: generate format_string in ImageCtx +3ae9f57 librbd: make read_iterate iterate over periods +e114cbf librbd/ImageCtx: accessors +6151899 librbd: reimplement striping +9e109e1 filer: add sparse result into a striped read result +08d1eb5 filer: make tail zeroing in stripe result assembly optional +6cd51fe librbd: remove callback from handle_sparse_read +3d010fc objecter: use StripedReadResult for scatter/gather read +3c2024d filer: helper to assemble striped read results into a single result +36a2245 buffer: add claim_prepend() +827ad53 filer: add optional buffer offset +c85b901 filer: add helper to map from object extent to file extents +c3f186e filer: use vector> instead of map<> for buffer extent map +058c24f filer: include (numeric) objectno in ObjectExtent +a7f634a librbd: update python bindings for striped image creation +ae7271e rbd: document stripe unit options on man page +d7b912f librbd: document create3 +79a365a librbd: populate struct ceph_file_layout for image +d54ca67 filer: generalize file_to_extents to take a format string +848a942 rbd: show striping parameters with 'info' command +efa1bea librbd: expose image striping properties +e0b4638 cls_rbd: fix snap key filtering +8143206 rbd: allow striping to be specified on image creation +d6501db librbd: allow striping to be specified on image creation +4ef9a3d librbd: load striping information when opening image +2e403ef cls_rbd: add stripe_unit, stripe_count metadata +18a3cee client: avoid possible null deref +0095a13 client: fix shadowing in inode ctor +d8bb685 client: init readdir fields +5511564 Makefile: Add CRYPTO_C(XX)FLAGS to librdb +4c134a4 Makefiles: Add ar-lib to .gitignore. +f525534 autogen.sh: On some platforms, the m4 is created earlier. +d28ba52 autogen.sh: Create m4 directory for leveldb submodule. +0cc828b Makefiles: Update submodule reference to latestes for leveldb. +3ecd289 Makefile: update submodule reference for leveldb. +0219b66 leveldb: fix-up submodule entry. +071fdc2 Makefile: Improve test for boost system library. +7ea734c Makefiles: Missing boost library should not be fatal. +151d940 Makefiles: ignore the m4 macro directory +3658157 Makefile: Updates to eliminates warnings, add test for boost system lib. +a1d8267 cls_rgw: init var in ctor +8d7c8e3 rgw: don't add port to url if already has one +662c69e ceph-disk-prepare, debian/control: Support external journals. +4db1251 logrotate: fix bash syntax +251649c doc: remove cephfs warning +168bd10 doc: fix file system recs +e0bc555 cephx: simplify signature and check code +d123e31 msg/Pipe: avoid duplicated code to randomize out_seq +389fac7 rgw: replace bucket creation with explicit pool creation +0ec4520 rbd: don't issue usage on errors +7477a08 doc: Added radosgw temp remove. +041081c doc: Minor clean-up. +94aec21 doc: minor clean-up. +fc34f16 rgw: fix compilation +15775f8 mon: drop command replies on paxos reset +06a8d95 doc: Editing and cleanup. +410ebac test: Allow randomized tests to be repeatable +baf54b2 client: Reset cache_name pos on dirp +8518115 rbd cli tests: copy.sh was looking for old version of rbd ls -l output +0442607 clean up of rbd functionality script +73462f0 cleaned up the perl module +bd47169 cleaned up the script +11c51dc radosgw-admin: don't try to parse date if wasn't specified +f268d4e ceph-debugpack: updates +9810517 doc: separate config from I/O in openstack diagram +4ebe8c2 doc: clarify rbd openstack docs +8fab972 gitignore: Update to match packaging changes and additions, rest-bench addition. +dd462ce configure.ac: Typo in human-readable description. +7ef0df2 mon: Monitor: resolve keyring option to a file before loading keyring +4eabe57 doc: simplify wording for rbd-openstack config +b83d38a doc: Add doxygen style documentation for libcephfs +9da5b53 test: Refactored testceph.cc into gtest framework +a00a240 test: Allow readdir test to be repeated +3b5b9ef libcephfs: Check that buffer is non-null +323a52e mds: Fix removexattr ENODATA error +629cad5 osdmap: fix null deref in dump +0406d0c osdmap: fix osdmap dump null check +5129620 mds: note fall-thru to please coverity +d68985f test_cfuse_cache_invalidate: check for errors +75bed10 mon/Elector: fix leak on monmap from peer +1a28cce test_cfuse_cache_invalidate: zero buffer +97c2f19 FileJournal: ignore osd journal size for block devices +df1d17f rgw: switch perm to uint32_t +f4a0b2d rgw: flexible attr fields +d4725c0 rgw: get bucket logging stub +c0b5370 rgw: check_disk_state also updates other object metadata +acb3053 rgw: set null termination explicitly +8731d0d cls_rgw: return returned ret code +58ad3bf rgw: add missing parantheses +b13a36c rgw: check NULL before dereference +148ba6e rgw-admin: pass object by reference +091bf45 rgw: fix leaks in certain error paths +ce94875 rgw: fix (im)possible leak +79b15a2 rgw: catch possible exception +5dbda13 rgw: initialize member variables at req_state +5a615f1 rgw: initialize data members +ddb1bb0 rgw: RGWObjState() initialize memebers +7eb366c rgw: initialize members at RGWRados() +d16e25f cls_rgw: check pointer before dereferencing +7ab3d2a rgw: multiple coverity fixes of uninitialized fields +b5ed23d rgw: trivial fix +e042d6b rgw: change size_t to ssize_t for string.rfind() result +d2159bf rgw: fix resource leak +e233dff Revert "admin/build-doc: Use installed Sphinx and its dependencies, when possible." +3091b5f rgw: virtual bucket affects resource lookup +0344c6b rgw: document admin, usage api +cb1fdb9 rgw: fix chunked object PUT for small objects +3d1dee2 rgw: abort_early should initialize formatter if needed +511e639 rgw: configurable set of enabled apis +d22aa6c rgw: add user caps +d8223fa rgw: usage trim +ed04755 rgw: usage show accepts more params +42d873e rgw: different formatters for different services +2b6a27d rgw: add a flusher to handle output data, simplify client api +cecd7af Formatter: fix XML formatter +02f7870 rgw: add rest-usage handler +fca6d3b rgw: REST resources init uses configurables +cea28f8 rgw: refactor protocol stacking +85f137d rgw: tie callbacks in different handlers directly to REST +b71b8b0 rgw: sed 's/_REST/_ObjStore/g' * +e153bce rgw: start moving usage management functions +a9c9f96 rgw: hide fcgi details from client code +c038c3f doc: Added admonishments to use separate host for clients. +fa66eaa mds: Reset session stale timer at end of open +48fc340 upstart: OSD journal can be a symlink; if it's dangling, don't start. +8d718ca osd: Make --get-journal-fsid not really start the osd. +435a5c1 osd: Make --get-journal-fsid not attempt aio or direct_io. +88fc8b7 ceph-disk-prepare: Use the OSD uuid as the partition GUID. +d6b065c debian/control, ceph-disk-prepare: Depend on xfsprogs, use xfs by default. +2e9afc2 ceph-disk-{prepare,activate}: Default mkfs arguments and mount options. +b40b2d6 ceph-disk-prepare: Avoid triggering activate before prepare is done. +79320ff ceph-disk-activate: Add a comment about user_xattr being default now. +ab84949 ceph-disk-activate: Use mount options from ceph.conf +8eeebe8 ceph-disk-activate: Refactor to extract detect_fstype call. +d94e421 ceph-disk-activate: Unmount on errors (if it did the mount). +a146f05 ceph-disk-prepare: Allow setting mkfs arguments and mount options in ceph.conf +0b934e1 ceph-disk-prepare: Allow specifying fs type to use. +18d1580 doc: clarify osd journal as a block device +075c321 rbd: ls -l format tweaks: +8a484be rbd: Make lock list adapt 'number' of msg (1 lock, 2 locks) +19147c0 rbd: set_conf_param() rewhack: +88ea027 Add si_t type for large-number "just the suffix, no space" +082746d client: Fix assert when stale arrives before open +0405a44 ceph-disk-activate, upstart: Use "initctl emit" to start OSDs. +1f3a50a ceph-create-keys: Refactor to share wait_for_quorum call. +4302f12 ceph-create-keys: Create a bootstrap-osd key too. +a53a4a2 client: Don't keep sending SESSION_REQUEST_OPEN +2d6953a Revert "rbd: gracefully handle extra arguments" +20496b8 OSD: separate class caps from normal read/write +0d48879 rbd: gracefully handle extra arguments +aed3612 MOSDBoot: fix compatibility with ~argonaut +f1ad419 qa: report success if race is not detected +37ffb27 qa scripts: Replace cut -f 1 with awk '{print $1;}' +bed5536 rbd: Use TextTable for showmapped and lock list +c109329 librbd: simplify math +61b2e4d rbd: use TextTable to implement ls -l +fb88683 Add TextTable class for table output +9889d81 librbd: fix error handling in get_parent_info +3ba7ab2 doc: Whitespace cleanup. +790b508 doc: rst syntax fixes. +36f1698 rbd.py: Fix docstring syntax of list_lockers(). +2411ba6 rbd.py: Docstring syntax. +c65ffe9 admin/build-doc: Use installed Sphinx and its dependencies, when possible. +d5c3c47 mon: Elector: clean ack set on election start +35f5eff mon: Elector: bootstrap on new monmap from elector +a6ba95f mon: dump formatted crushmap on report +36efcb5 mon: do not tick() until all paxos instances recover +fec1912 client: Fix #2215 with cache inval in thread +847728e client: Remove unnecessary checkafter parameter +68fbbea ceph-fuse: Test for fuse cache issue (#2215) +2de5670 mds: make migrate_stray() specify full path +74ea0cb doc: update release-process.rst +9cabbb2 mds: fix stray reintegration check in handle_client_rename +2519bd3 doc: Added description of ceph release process. +67a201d Avoid sign-extension of non-magic Message* values +fcc987b release: note possible osd caps incompatibilities +9362f72 doc: add rbd example to ceph-authtool man page +2e366ea OSD: deprecate CLS_METHOD_PUBLIC flag +7ea8f16 doc: update ceph-authtool man page for new osd caps +13ba5ec objclass: require each class method to have a flag set +135c85a OSDCap: add separate caps for class read and class write +bf333d8 OSDCap: allow runs of spaces anywhere +9e8f69a qa: try to reproduce a race more times +e8df6a7 mds: Avoid creating unnecessary snaprealm +5673523 mds: Properly re-calculate mdsdir inode's auth bit +60b93a7 mds: Trim non auth subtree directory +d2861d9 mds: Properly update dirty dir fragstat during log replay +f8110cb mds: Allow export subtrees in other MDS' stray directory +1cc28d5 mds: Avoid save unnecessary parent snaprealm +824e593 mds: Set metablob.renamed_dirino in do_rename_rollback() +35dc221 mds: Fix xlock imports +bc1e52f mds: Allow rename request for stray migration/reintegration +c6c6de5 mds: Add finish callback to waiting_for_base_ino wait queue +7004829 mds: Consider stopping MDS when finding peer inode +b8aeb76 mds: Don't drop client request from MDS +60a5d78 doc: first draft of full OpenStack integration +e2f6ae0 filejournal: check lseek() return value on darwin +13b841c osdmap, mon: optional dump 'osd tree' in json +14de7a5 client: Resolves coverity NULL dereference issue +d250bb8 libcephfs: destroy cmount on ceph_shutdown() +965ab90 filestore: check ioctl SYNC return code +8237f68 obj_bencher: fix leak in error path +709ff14 PG: assert auth is not end in _compare_scrubmaps +7ca754b FileStore: copy paste error _do_copy_range +106dc66 doc: Removed languages from librados in tech-specific stack diagrams. +763ae7c doc: Added stack diagram for rgw. Noted NO MDS. Corrected namespace comment. +2e78047 doc: Removed a setting we can ignore for now. +c3f158f doc: Minor updates to filesystem settings. +8799ef6 doc: Added journal settings to the config TOC. +d962e89 doc: Completed a journal configuration reference. Journaler is separate. +1166f3a Compatibility code for session authentication; mostly passing keys around to where they're needed. +2b56e80 Code to allow pipes to be prepared to sign messages and to call the authentication methods for signing and checking. +27974c4 Changes to cephx protocol to handle session authentication. +cc5d05b Changes to existing None and Unknown authentication protocols to handle null session authentication. +7cce4d4 Changes to basic authentication class to enable session authentication +3548806 New documentation about Cephx protocol and session authentication. +12bba4a OSDCap: parse spaces explicitly +b57b86a test: remove commented out test cases +32a6394 logrotate: check for executables to avoid cron errors +2bf3f8c filestore: check lseek64 return value +409fbb7 filestore: check ioctl WAIT_SYNC return value +15ebc0f filejournal: check lseek64 return value +ef393b5 mon: fix large pass by value +5defa92 mon/PGMap: fix nearfull check +72ca956 test_libcephfs: fix test +7af24bb libcephfs: fix test workunit +1ad339f mon: fix recovered_peon assert +238b497 mon: debug recovered_{peon,leader} +b8cbe26 mon: fix recovered_peon assert +1708cf8 mon: debug recovered_{peon,leader} +6f7067f mon: avoid large pass by value in MForward +4878fdc mds: fix MDSCacheObject pin printer * logic +a3e42d8 mdsmap: init fields in ctor +1cebd98 mds: fix potential overflow +694a4f0 mds: init atid in context +18668ba mds: init log layout in MDCcahe ctor +7594e9c mds: simplify get_dirfrag() +bef66e0 mds: fix mlogger shutdown +4aef86f mds: fix leak from get_current_dir_name +c517fde librbd: simplify math +7779901 mds: add assert to lock path +816bb7e mds: fix uninit Dumper fields in ctor +e9f350f mds: fix fd leak in dumper +e604de1 mds: fix uninit Capability::last_issue +82aeced mds: fix uninit field in CInode +1acd109 mds: fix typo in rsubdirs warning +310e486 mds: init CDir fields +5e51f55 mds: avoid useless have_inode() call +6047325 osd: pass by value +af11531 osd: fix coverity NULL warning +ada0db3 osd: logger is never NULL +020856b osd/PG: remove redundant NamedState +0769a1d osd: init all vars in PG::NamedState +09f602d ceph tool: fix cli test +7827c56 mon: fix uninit var warning in session startup +f4c34c0 filstore: fix leak of fd in write error paths +e0820d2 filestore: fix fd leak +dfac9b3 mds: dentry always has dir +d5f8e42 librbd: init value in CopyProgressCtx ctor +e43f4ff librbd: fix overflow assert check +5a0461a ceph tool: update url in man page +f1f7ac7 ceph tool: document 'ceph osd map ...' command +2e1ea3f OSDCap: parse 'pool=' in addition to 'pool ' +c925ce8 FileStore: use fresh vector for calls for listing collection +67ab965 Makefile.am: recompile small file instead of libosd for unit test +524a438 test: add more OSDCap unit tests +142d902 OSDCaps: fix allow_all() +3090366 OSDCap: fix output operators for caps +47a2f41 OSDCap: fix typo in comment +42a63f3 OSDCap: remove grants added during failed parsing +e61b965 osdmap: restore stream format +70e35ba cephtool: fix resource leak +779e0f0 cls_refcount: fix uninit vals in ctor +67cacee rados: fix error paths in do_put() +903f60a osdmaptool: fix pg_t::parse() return value check +d5b4f9a osdmaptool: check return values +0b3c5dc objecter: fix dereference after null check +b1d8513 objectcacher: fix uninit var in ctor +62273b5 objectcacher: fix uninit it ctor +e5103b4 objectcacher: avoid confusing coverity +a1f9dbc journaler: uninit var in ctor +7b90139 journaler: uninit var in ctor +50460f9 filer: fix overflow +d2cbe1f MOSDFailure: avoid big pass by value +cb0d969 MMonJoin: avoid large pass by value +e92b92b MRoute: avoid pass by value +02e4839 messages: uninit values +b5fb298 msg/Messenger: avoid large pass by value +797d3cc msg/Accepter: check getsockbyname() return value +ae1c38f LogEntry: fix uninit in ctor +2381f12 utime: restore ostream state +95dca98 stringify: use const ref +884daeb addr_parsing: fix memory leak +98da9f9 pidfile: fix fd leak from pidfile_remove() +687d6d5 crushtester: fix uninit var +b7cf603 crushtester: avoid divide by zero +ffe0e09 crushtester: avoid divide by zero +7490032 adminsocket: fix sock-fd leak in failure path +af5f143 PrebufferedStream: avoid dereferencing end() +cf6639a perfcounters: remove unused members +5846e27 obj_bencher: protect with lock +f577c82 obj_bencher: possible divice by zero +ce06339 lockep: fix leak in failure/assert path +4bd2799 ipaddr: fix buffer overrun on ipv6 prefix of 128 +6f89765 config: don't leak buf on dump config +66f7c41 buffer: init data val in ctor +05dc45f buffer: restore stream state after hexdump() +9bd673f adminsocket: init vars in ctor +dfb9488 adminsocket: change failure test +3ec32c9 adminsocket: check return value +73d8549 workqueue: reset heartbeat timeout under lock +bdadc4e MemoryModel: init in ctor +8d4e6e2 LogEntry: init in ctor +6984037 doc: Added commentary for BMC and VLAN. +3223b3d ceph.spec.in: Build rpms with nss instead of cryptopp. +53c1db9 vstart.sh: let you specific specific ip to bind to +0ee6a95 doc: Added commentary for BMC and VLAN. +cc4dcf6 test: add more OSDCap unit tests +de6e0d8 OSDCaps: fix allow_all() +e903ca7 OSDCap: fix output operators for caps +1d747d1 OSDCap: fix typo in comment +30e10a9 doc: RST cleanup for RPM dev package installs. +2fc29fe doc: Removed old ops directory structure and redundant files. +ff96789 client: add WARN_UNUSED_RESULT to client init func +27c7c71 client: Remove unmaintained ldceph.cc from tree +a1cfe74 client: Mods to fix #3184 for messenger shutdown +1d231f9 Refresh manpages from .rst sources +3c1e2e1 manpage-howto.txt: note that man/Makefile.am may need update too +eb27f9a Add howto for changing man pages +d37ca79 mon: update 'auth' help/usage +1d552a4 rados: fix man page +8740ddf doc: fix rpm url (part deux) +6c5c939 librbd: fix includes for portability +c9266d6 rgw: check that realloc succeeded +4513397 ReplicatedPG: track incoming pushes with perf counters +3f952af PG: explicitely delay ops on backfill_pos +0a2f827 PG: last_complete might be outside of the log +4c4c9d5 doc: fix rpm url +214327e rgw: copy_object should not override ETAG implicitly +25a9620 FileJournal: correctly check return value of lseek in write_fd +303f640 OSDCap: remove grants added during failed parsing +3144690 doc: fix injectargs syntax +e488594 (tag: v0.52) v0.52 +9e9c5f2 osd: make 'pg revert ...' command idempotent +175465b cephfs: Fix breakage of cephfs link +8c3bfaa doc: update ceph-authtool man page +3b0e120 doc: clarify rbd caching +fa3a747 doc: fix typo in dev layering notes +f0a5c56 doc: small fixes to the OpenStack page +8964f10 doc: remove MDS from diagram describing RBD and OpenStack +f586add doc: extend QEMU/RBD docs +4ea9b9f doc: minor fixups to rpm install doc +85b0151 doc: draft rpm installation +cc9d7da cephfs: Fix warning - use err instead of errno +e8c734b client: Fix compile error: bad {0} initializers +67535f2 rgw: different test for multi object delete +cd15405 client: Fix coverity UNINIT_CTOR defects +844ffd6 client: Fix coverity 716909 [FORWARD_NULL] +68dea67 client: Add asserts for coverity bugs +10186fe client: Fixes coverity defect 716891 +7945f8b client: Fixes coverity defect 716890 [DEADCODE] +65700fc client: Coverity fixes for 716841-716844 +bc45cde cephfs: Fixes for coverity bugs 716840 and 716970 +bba1766 rgw: copy_object should not override ETAG implicitly +a9e3041 mds: Move check for empty path lookup to getattr +c689556 PG, OSD: reject backfills when an OSD is nearly full +a6b0d55 timer: add unsafe callbacks option +5b232a6 doc: Fixed typo. +9f6ee01 JournalingObjectStore: lock journal_lock at top of journal_replay +e022585 FlatIndex: terminate dir_name buffer passed to strncpy +d3bd9cb FileStore: uninit var in ctor OpSequencer::parent +0e73313 FileStore: fix omap_store and dbomap leaks in mount +3bef5eb FileStore: don't leak r in mount +f9c5ac3 FileStore: fix fd and tmpfd leaks in _detect_fs() +b99979c FileStore: fix leaked fd and check lseek in _test_fiemap +620701d FileStore: fix filedescriptor leak in mkfs +33f9618 FileStore: fix statfs,fstatfs,fstat ret val checks +ea91ee5 FileJournal: uninit var in ctor aio_ctx FileJournal +147e90c FileJournal: uninit var in ctor FileJournal +8ec08c2 FileJournal: check return value of lseek in write_fd +66b1eb2 rgw: better protocols separation +35cd5f3 rgw: clean up ops initialization, completion +47983df client: Fix for #3184 cfuse segv with no keyring +f310a1c mds: fix ino release on session close +26882da client: Put all libcephfs gtest tests into one bin +c92e1dd mds: Handle empty relpath from client getattr +5c8aea7 FileJournal: fix potential overflow in create() +5bf6d22 FileJournal: fix memory leak in _open_file +2455147 doc: Added an anchor to enable linking from CRUSH map section. +c8be464 doc: Clarified descriptions, and improved IA and navigation. +2b54391 client: Fix to client filepath initializing +d5bcf41 mon: include auth mon's paxos version on latest gv calculation +6b35b88 DBObjectMap::_get_header fix shadowed var causing dead code +8a3efbb osd_types: uninit var in ctor pg_query_t +3e4f379 osd_types: typo in object_info_t::decode for struct_v==6 +4f621a1 ReplicatedPG: add assert to snapset.clones search +10e1ac7 PG: uninit var in ctor Scrubber +8e214ed PG: big param passed by value, C_PGActivateCommitted +7808e50 OSDMap: clear setprecision in print_osd_line +c683fa8 OSD: big parameter passed by value, send_still_alive +61545de librados: cleanup: use Mutex::Locker +b581464 librados: protect lookup_pool, get_pool_name with lock +681f614 mds: Adjust mydir auth when starting MDS that was stopped cleanly +37881a3 mds: Fix SessionMap::is_any_state() +cd78cd2 rbd: fix leak of dir handle in get_rbd_seq +84fa74e rbd: fix leak of fd on error when reading an entire file +2d44a1a rbd: fix leak of fd when importing an image from a file +dd10b1e secret: close fd on error +2371352 librados: always free buffer allocated by md_config_t::_get_val +e6ced04 librados: fix use without NULL check in rados_pool_list +f35ab0f librados: init everything in default IoCtxImpl ctor +68b1fd6 rbd: make sure we have a device before trying to unmap +399fc01 librbd: fix list for more than 1024 format 2 images +52943a6 librbd: don't allow order to be more than 64 +74b85e7 librbd: use 64-bits to shift order +11da12f librbd: init cookie in WatchCtx ctor +404d45b librbd: init m_req in LibrbdWriteback::C_Read ctor +38aeb00 librbd: initialize on-disk header in ImageCtx ctor +efb2a57 librbd: init everything in default AioRequest constructors +eccf60e librbd: fix coverity warnings for AioCompletions +b841df0 doc: fix broken link in command reference +24ef2ef librados: init all variables in ctors +4015343 PG,osd_types,PGMonitor: make backfill state names more descriptive +1fafd99 PG: add CEPH_FEATURE for backfill reservation +3ebf52d doc/: added documentation for backfill_reservation +796b9b6 osd/: add PG_STATE_BACKFILLING +b54a0a2 osd/: add backfill reservations +fa21924 test_librbd_fsx: add missing break statement +c2cf8eb librbd: assert overflow will not happen +e653816 rgw: url_decode should allocate extra byte for dest +200ed2b mds: Adjust mydir auth when starting MDS that was stopped cleanly +0571535 mds: Fix SessionMap::is_any_state() +1747c1c rbd: fix leak of dir handle in get_rbd_seq +55f7230 rbd: fix leak of fd on error when reading an entire file +5b22c1d rbd: fix leak of fd when importing an image from a file +2c1b7f2 secret: close fd on error +4567a6d librados: always free buffer allocated by md_config_t::_get_val +a677f47 librados: fix use without NULL check in rados_pool_list +a5c7776 librados: init everything in default IoCtxImpl ctor +ee1fe15 rbd: make sure we have a device before trying to unmap +a204058 librbd: fix list for more than 1024 format 2 images +7df76de librbd: don't allow order to be more than 64 +118c212 librbd: use 64-bits to shift order +cd3d3aa librbd: init cookie in WatchCtx ctor +073786e librbd: init m_req in LibrbdWriteback::C_Read ctor +dea894d librbd: initialize on-disk header in ImageCtx ctor +c1ffe08 librbd: init everything in default AioRequest constructors +3486050 librbd: fix coverity warnings for AioCompletions +86b3e8a OSD: add init and shutdown for OSDService +e177680 librbd: ensure header is up to date after initial read +5cba778 librados: note that watch's version param is ignored +7782ccb doc: Added messaging section to ref. Placeholders. Definitions needed. +8853469 doc: Added space for Emacs users. +446e68c doc: Added journal section placeholders. Definitions needed. +04ddd14 doc: Fixed hyperlink. +abf1bf4 doc: Clean up and added placeholders for new definitions. +78439e9 doc: Fixed hyperlink. +873ccdf doc: Fixed hyperlink. +441ae00 doc: Restored "Differences from Posix" to /doc/dev +153fb3b doc: Adds package deps to list in README +e32ee37 librados: cleanup: use Mutex::Locker +d1de1f1 librados: protect lookup_pool, get_pool_name with lock +720a301 mon: tolerate no session on no_reply() +a794c93 ReplicatedPG: set op return version to pg version on ENOENT +53b18e3 osd: catch decoding errors from client ops +ef29d90 osd: some whitespace +a73777a osd: return -EPERM on insufficient caps +3b4f754 msg/Accepter: assert that listen_sd always >= 0 +f13eaf4 msg/Accepter: fix race in accepter shutdown +0c7637d rgw: prepare_update_index should not error on system bucket +9aa467d ceph-object-corpus: update with v0.52 objects +58ad4dd uuid: include unistd to make encode testing work +0c07607 qa: move all rados class unit tests into qa/workunits/cls +420baa9 Makefile: rename test_rados_api_cls_lock -> test_cls_lock +69743c1 vstart.sh: Alternative fix for vstart.sh -n +c9e81fd Makefile.am: librdb_fsx test needs math library on some platforms +93cd73f doc: link to full 0.48.2 changelog +8276fa2 mds: Clean up finished two phase commits +4d39553 cfuse: Define CEPH_INO_DOTDOT (3) for top-level parentdir +671c4c3 ceph_common.sh: 'hostname -s' (instead of cut ...) +51d5815 doc: v0.48.2argonaut release notes +fd205da cfuse: Add the parent entry (..) for a top-level readdir +d5a048c doc: Removed legacy doc. Not needed. +9fa5720 doc: Removed legacy doc. Not needed. +64198f8 doc: Removed legacy doc. Not needed. +d50aab8 doc: Added enabling Swift access to rgw config. +4958063 doc; Added troubleshooting to index. +a83f503 doc: Copied contents of rgw troubleshooting over to the new ops section. +280aeaf doc: Reverted so that we don't force yes or non-interactive. +9c8061f doc: Removed legacy usage. +b3651da doc: Cleanup, spell check, grammar check mostly. +b311a40 doc: Updating the index to remove legacy and uneeded entries. +5e9158e Fix description for --nodaemon +0a83cb9 mon: clean up recovered_leader() checks +50e7251d Abort on failure +31f430a Fixup usage to reflect options available +faddb80 Swap current dir (.) with CEPH_BIN for OOT builds +0f7c516 Move keyring option to global section +259fffbe mon: require MON_GV protocol feature +879ce01 mon: move setting of ondisk GV feature into helper +414cd1b mon: do not issue global versions if quorum does not support the feature +3baae15 mon: set new incompat GV feature when paxos stabilizes for the first time +db04ce4 mon: make MRoute encoding backwards-compatible +e068bd7 rbd/copy.sh: fix typo +ed43d4d rbd/copy.sh: fix typo +7a3d1e6 librbd: bump version +855dff6 cls_rbd: remove locking methods +8f2a0d9 rbd: add locking commands +b66ef43 qa: update rbd tests and runner +3a9e665 librbd: use generic cls_lock instead of cls_rbd's locking +69ee9af cls_lock_client: add ObjectOperation-based get_lock_info +6dcbbbb cls_lock_types: add missing include +67bbcf2 cls_lock_client: return error when decoding fails +d1252ea cls_lock_client: fix indentation +bf2e489 cls_lock_client: change modified reference parameters to pointers +2dca3a8 cls_lock_client: clean up reference parameters +e71fdc7 cls_lock: fix some spacing +b69a959 cls_lock: specify librados namespace explicitly +55673ba radosgw-admin: fix cli test +3372f14 rbd: only open the destination pool for import +ad2ba8e qa: test args for rbd import +d14a31d rbd: make --pool/--image args easier to understand for import +a583a60 librbd, cls_rbd: close snapshot creation race with old format +a4833bb librbd: fix delete[] +3401f00 doc: clarify rbd man page (esp. layering) +582001e rbd: add --format option +a112419 librbd: prevent racing clone and snap unprotect +e85a238 rbd: add "children" command, update cli test files +bd94058 librbd: add {rbd_}list_children() methods +f6b2f79 mon: make heartbeat grace and down out interval scaling optional +be50391 mon: add tunable to control laggy probability weighting. simplify decoding. +5499778 mon: apply grace period scaling to mon_osd_down_out_interval +2ad62d5 mon: decay laggy calculations over time +abd2ae7 mon: factor reporter lagginess into grace adjustment +adf0fe6 mon: scale heartbeat grace based on laggy probability, interval +3f51d31 mon: check failures in tick +09b251c mon: clean up osd failure logging +a3e8ed1 mon: reply to all reporters when an osd is failed +7952c35 mon: locally apply osd heartbeat grace to failure checks +3eb7341 mon: no_reply() to failure messages we don't reply to +d328a28 mon: send 'null' reply to requests we won't reply to +e06818b mon: refactor osd failure report tracking +66f31c1 mon: adjust or decay laggy probabilities on osd boot +e9f051e osdmap: include osd_xinfo_t to track laggy probabilities, timestamps +b64641c osd: include boot_epoch in MOSDBoot +4f1792d osd: include failed_for in MOSDFailure reports +6f5c4a9 PG: need pg lock to read osdmap_ref +59f8587 OSD: in enqueue_op, cannot read *pg since we don't hold the pg lock +78a322b OSD: remove some commented out pg->unlock calls +ed18eea :doc: Changed rados.gateway to radosgw.gateway. Start with /etc/init.d. +900e4ce workqueue: allow thread pool size to be adjusted dynamically +5e095ec :doc: Trimmed up the stack diagram and fixed a few hyperlink refs. +5350830 :doc: Modified hostname to hostname -s. +7c178be :doc: Modified hostname to hostname -s. +5936ded :doc: Modified hostname to hostname -s. +fa93ea1 rgw: fix unused warning message +496c5d4 rgw: fix uninitialized var in error message +6bc1ef0 rgw, cls_rgw: a tool to rebuild bucket stats +11b80ae :doc: Changed title to RBD from RADOS. Clearer. +9829039 :doc: Made notice to stop i/o a warning. Initial format clean up. +84c50dd :doc: Added discussion and stack diagram. Initial format cleanup. +171fcd8 :doc: Remove legacy usage. Initial format cleanup. +08e9fc0 rgw: obj_stat() returns object version (epoch), use it +15e97d7 cls_rgw: complete_op() only skip update if epoch is non zero +3167228 cls_rgw: update index stats based on correct category +0f82a39 rgw: fix suggested object size +6a054ea rgw: set exists flag when suggesting existing bucket entry +b12c147 cls_rgw: change scoping of suggested changes vars +c11e05f test/rgw: add a test for index suggest +1217538 cls_rgw: configurable tag timeout +64b9a89 test/rgw: add bucket index unitest +519ed24 cpeh.spec.in: Don't package boto_tool. +6ff23bb cls_rgw: client api for bucket index init +b03adda cls_rgw: add client api calls for index suggest +1bf345e doc/config-cluster/*: update recently added/changed config options +91f3893 :doc: Title change for clarity. Initial formatting cleanup. +88dd90e :doc: Removed old rec section. +2f73c07 docs: add radosgw internals and usage testing section +3369ea3 :doc: Notes to add data directory. Notes to address key with escape char. +0398b9f :doc: Added note to clarify use of host=shortname. +3d86194 :doc: Rewrote architecture paper. Still needs some work. +fafb195 :doc: Removing old control.rst. New one is in ceph/docs/cluster-ops.rst +f60ea38 :doc: Removing old init section. +4f3642c rbd: only open the destination pool for import +46883a5 ceph.spec.in: Add new rados libraries, libcls_kvs.so and libcls_refcount.so. +cb49823 osd: default journal size to 1 GB +6b0c9ff filejournal: do not enforce that bdev size >= osd journal size +de93044 remove obsync +f1819f0 :doc: Changed from bullet list to section titles. +18cf1b6 :doc: Usage consistent with Tyler's notes. +da1a9f9 :doc: Corrected a path. +00e58a5 :doc: Addresses DOCUMENTATION #3155 +4251d78 rgw: update cache interface +6756f9a rgw-admin: add cluster info command +7fe1f0b rgw: simplify create_pool +ff0f88a rgw: store cluster params in a special object +a150cf3 rgw: document how refcount objclass works +539a8c7 cls_refcount: add a unitest +93218ae rgw_rados: adjustments for refcount objclass +cfe4830 rgw: set atomic context for copy operation src and dest +3cd17fb rgw: copy of objects using refcount +20c7852 rgw: use refcount put instead of obj delete where needed +78d6a60 qa: test args for rbd import +fd4b294 rbd: make --pool/--image args easier to understand for import +0bf7723 doc: fix indentation +cf6899d Adding RBD CLI test automation script, RbdLib and cephscrub.sh +539786a osd: move permissions check into pg op thread +221fc78 osd: drop unnecessary can_discard_request() in PG::queue_op() +2223ac7 osd: introduce PG::_qlock to protect queuing +1425281 mon: share quorum features on election victory +ebdfd4b mon: refactor monitor feature checks +e84f2e4 mon: move feature read/write into helpers +fa86f7a mon: move start-up feature check into static helper +4d333ad mon: track when peon paxos machines activate +e91b16a mon: fix paxos completions +85ed24a mon: share global version with proposal, collect, commits, slurp, etc. +39e5138 mon: specify/allocate a global version at begin time +f4210f8 mon: include global versions in paxos, slurp messages +8619d87 mon: provide global paxos version helpers +6a1d34a mon: allow all paxos instances to recover before going writeable +247ba35 mon/MonitorStore: store global version (gv) alongside paxos values +d697b54 test/rados-api/aio.cc: use read operation for omap cmp test +c1372f9 osd/OSD.cc: Fix typo in OSD::heartbeat_check() +e89cab6 osd/ReplicatedPG: set truncate_seq when handling CEPH_OSD_OP_APPEND +c73c440 Makefile: rename 'core' -> 'base', add a few things +24c3cae librbd, cls_rbd: close snapshot creation race with old format +31560ca Rejig the way the shared libraries are processed so that manual postinst/postrm scripts are not required for lib* packages, ensuring that the .so's in the ceph package are not detected +9474765 upstart: Give everything a stop on stanza. +60e273a upstart: Start mds,mon,radosgw after a reboot. +fb6c5c3 upstart: Use "ceph osd crush create-or-move". +d8cb19d upstart: Add ceph-create-keys.conf to package. +ced6c2c :doc: Fixed typo. +de811db obsync: if OrdinaryCallingFormat fails, try SubdomainCallingFormat +4e5283d ReplicatedPG: do not start_recovery_op if we are already pushing +656ab15 osd: fill in user log entry last after snapdir tran +a4fb9c1 :doc: Added tunables to cruch-map.rst. +911433f :doc: Removed old pg tuning. New section was added. +9256a29 :doc: Trimmed the old ops tree. Will remove when all porting verified. +203ba59 :doc: Trimmed the tree for failures/troubleshooting. RGW remains. +662fd03 :doc: removed. RBD now has its own section. +e614100 mon: adjust number of req args for loc +344fef7 mon: move loc map parsing into a helper +50c957d crush: constify loc map arguments +9636991 crush: add const string& versions of accessors +babef41 doc/control.rst: add 'osd crush create-or-move ...' +dd9819e doc: make note of crush usage change +0817b94 mon: make redundant osd.NNN argument optional +01a8146 ceph tool: add 'osd crush create-or-move ...' to help +44fa233 :doc: Deleting this. Wrote a new one, but will be revised a bit soon. +32f30f9 :doc: Removed old ops pool section. +0313365 :doc: Removed old authentication section. +d1053d9 :doc: Removed old resize OSD section. +ad909f3 :doc: Removed old mon resize section. +7d881dc :doc: Removed from old ops doc. Still needs to be composed though. +bf342d1 :doc: New cluster ops section addresses the todo. +e844989 :doc: Removed old OSD troubleshooting. New version to be updated shortly. +72f802c :doc: Removed old monitor troubleshooting. New version to be revised shortly. +fe609b7 :doc: Removed old mds troubleshooting. Still needs to be composed. +a4733b8 :doc: Removed old cephfs disucssion. +d4e00bc :doc: Trimmed toctree to last bits of legacy data. +922c59f :doc: Updated FAQ with a friendlier message. +f1b605c mon: parse '' or 'osd.' for 'osd crush create-or-move ...' +1da73e5 mon: fail on trailing characters after parsing numbers +b2409a2 mon: 'osd crush create-or-move ' +adedd6b crush: create_or_move_item() +588b263 crush: get_item_weight[f]() +f8d9f86 osdmap: 4 decimal places for osd tree +d51d7b3 rgw: fix rgw_dir_suggest_changes() to set header_changed +f8c365e rgw: add missing ret code check +0cfac6d librbd: bump version +d77205d objecter: remove the now-unused "registering" flag on LingerOps +33def83 cls_rbd: remove locking methods +eeaa92c rbd: add locking commands +fd1c634 qa: update rbd tests and runner +18427ec librbd: use generic cls_lock instead of cls_rbd's locking +c4c4b20 rgw: encode total usage for backwards compatibility +06290f6 rgw: configurable swift auth entry point +03136d0 osd: fill in user log entry last after snapdir tran +928865b PG: create macro for simple events +e2129ab :doc: Fixed broken hyperlinks. +9bbe73c :doc: Addresses Documentation #3096. Also added new information. +793bebb rgw: rgw-admin filter usage by categories +9d878bf gitignore: Remove "nbproject", no idea what that even is. +ddaac56 rgw: usage now account categories +a5b9ba7 rgw: fix usage +3fed44a :doc: Minor tweak to heading text. +6957ae7 :doc: Modified the index page to point to the new cluster-ops section. +4ff60c7 :doc: Made minor changes to restructuredText headers. +8fa81ab :doc: Added comment redirecting editors to new page location. +c22ca72 :doc: Added index/toctree page for cluster ops. +b8dfe82 :doc: Added new auth settings to reference doc. +199dc5d :doc: Refactored and moved control.rst page. +d90fea6 :doc: Consolidated file system recommendations. +ab020da :doc: Minor syntax update. +64b9e9f :doc: restructuredText syntax corrections. +c94034a :doc: Added index page. This will be refactored again soon. +32398f3 :doc: Refactored and moved to ceph/docs/cluster-ops/pools.rst +c53a110 :doc: Removed. New section is in ceph/doc/cluster-ops/authentication.rst +f1c869c :doc: Fixed heading syntax. +78c844e PG: clear want_acting in choose_acting if want == acting +5868b00 cls_refcount: a new class for objects refcounting +df89c96 osd: initialize pg_log_entry_t::invalid_pool in default ctor +3fd5914 doc: explain what scrub, deep-scrub, and repair actually do +9013efd osd: deep scrub, read file contents from disk and compare digest +a0b04bc buffer: class for efficiently calculating CRC32 of >= 1 bufferlist +a08a28d pg: store scrubber state in its own object +f504679 osd: chunky scrub, scrub PGs a chunk of objects at a time +79b3054 crush: change default type from 'pool' to 'root' +a83fb79 FileStore: get objects whose names fall within a range +8bad708 pg: change _scrub() to take out parameters as pointers +195eda6 Monitor.cc: Added include for limits.h. +2266876 :doc: Added a section for adding and removing monitors. Singificantly re-factored. +c1ff83d :doc: Incorporated Joao's feedback into the reference material. +0c78a03 docs: Add CloudStack documentation +2b8690b :doc: Added recovering from OSD failures. Will be re-factored again soon. +9db84be doc: Added monitor failure recovery. Will be re-factored again soon. +6dff5d5 doc: Re-factored adding an OSD. +32b44cb doc: Minor updates. +d233271 doc: Added admonishments for Ceph FS per http://tracker.newdream.net/issues/3077 +4b774b6 doc: Updated to incorporate Sage's changes. +327969c doc: Added anchor references. +a50f73e doc: Refactored the debug section to point back to reference. +31d6328 doc: Added QA reference to --valgrind option. +ccfd841 Revert "ReplicatedPG: fill in user log entry last after snapdir tran" +fd76083 rgw: use prefetched buffer even when ofs != 0 +4d2a05f rgw: implement user manifest (swift) +40fd6ba OSD::handle_pg_stats_ack: grab pg refcount while processing pg +0aad546 ReplicatedPG: fill in user log entry last after snapdir tran +1db67c4 PG: In Active, don't transition to WantActingChange +035cf96 msg/Pipe: kill useless onconnect arg +31b1c2f doc: Added PG states. +ef6814d doc: Promoting PG concepts into mainline docs. Redundant version still in Internals. +25b7593 doc: New section on placement groups. +3fcdbe4 doc: Moved from configuration to operations. Updated with new info. +9da4966 doc: Created a more robust doc for monitoring a cluster. +743e0b8 doc: Consolidated start and stop. +3e56200 doc: Added a new "Data Placement" overview section for added continuity. +2a1ac68 doc: Added a new CRUSH map section. Will need to incorporate new tunables info. +fc093f8 doc: Moving new auth section from configuration to operations. +e09b265 objecter: fix osdmap wait +c1e000b doc: Fix leftover "localhost" mention. +3302a2d doc: Added debug ref to toctree. Trimmed title names a bit. +4609639 doc: Added "how to" for debug/logging config. Trimmed titles too. +7465dbe doc: Added logging reference under configuration section. +4ab9f02 msg/Pipe: do not special-case failure during connect +7b6c773 doc: Added runtime configuration example. +73d016f test, key_value_store: added distributed flat btree key-value store +bfa9a59 vstart.sh: -r to start radosgw +8578b21 cls_lock_client: add ObjectOperation-based get_lock_info +e06031d cls_lock_types: add missing include +8ac8177 osd: defer backfill with NOBACKFILL osdmap flag is set +e920a61 Clarify CodingStyle with respect to tab compression of space runs Signed-off-by: Dan Mick Reviewed-by: Greg Farnum Reviewed-by: Josh Durgin +fb37917 Fix rados put from '-' (stdin) +49375a0 osd: pause/unpause recovery based on NORECOVER osdmap flag +07ad925 osdmap: add NORECOVER flag +0a28d79 osdmap: add NOBACKFILL flag +b273c37 PG: do not update stats in ReplicaActive from info +5ac52de crushtool: Miscellaneous cleanup. +fd4d567 osd/osd_types.h: fix pg_history_t::merge copy paste error +84216d5 osd/Watch.h: uninit var in ctor Watch +75acb7b osd/ReplicatedPG.h: uninit var in ctor RepModify +0e2efbc osd/ReplicatedPG.h: uninit var in ctor OpContext +f30faca osd/ReplicatedPG: pass PGPool to ReplicatedPG ctor by ref +6fbf9e6 osd/PG.h: uninit var in ctor NamedState +471787f osd/PG.h: uninit var in ctor OndiskLog +f84e776 osd/PG.h: uninit var in ctor IndexedLog +1063673 osd/PG.cc: PG constructor pass PGPool by reference +9a93eb3 osd/OpRequest.h: uninit vars in ctor OpRequest +d41c253 osd/OSDMap.cc: uninit vars in ctor struct qi +d235626 osd/OSD.h: big parameter passed by value, publish_superblock +db9e120 osd/OSD.cc: OSD::shutdown() leaks lock +b041260 osd/ClassHandler.cc: uninit var in ctor +e0b8cb7 osd/ClassHandler: uninit var in ctor +50ed1fc monclient: uninit var in ctor +0b4ddc2 mon/MonitorStore: uninit var in ctor +89add0f paxos: init vars in ctr +ea078e1 msg/DispatchQueue: simplify shutdown() +b7af8d8 msg/Message: fix possible null deref +650ec35 msg: pass by reference +a3bf558 fix accepter bind fix +4eb3146 msg/Accepter: move nonce init to ctor +46c08d6 log: protect m_stop with lock +f51f568 common/LogEntry: pass by value for contains() +929892f LogEntry: pass by reference +ec5133b msg/Pipe: make banner buffer slightly bigger +b960c62 librbd: fix delete[] +08a29f9 ceph-dencoder: don't leak object +7cb3d2e auth: fix uninit vars +3fd13f5 crypto: fix fd leak from get_random_bytes() +1b1a0bf msg/Accepter: check setsockopt return value +484fd0c mds: fix broken EMetablob inode_t* return value +139ba9f client: unconditional teardown +532d1b1 rgw: init RGWRados::cct in ctor +c67eda2 rgw: init RGWGetObj::sent_header in ctor +757457a rgw: init ptr +ca4e060 rgw: add missing ctor, init parent +2214e83 omap_bench: fix uninit var +2037212 test/osd/RadosModel: uninit value +26a822b test/osd/RadosModel: fix uninit value +7c10bdc test/osd/RadosModel: fix uninit values +8d9d4f6 test/osd/RadosModel: fix uninit ptr +1247d4d test/rados-api/aio: fix uninit ptr +220980c cephtool: fix uninitialized scalar in constructor +998e207 test/Object: comment out dead code +97bd084 mds: fix unused value +b9adc27 mds: drop unused value +1355a67 filer: add missing return +a6dfa3e rgw: fix use-after-free +ec0a266 test_librbd: add missing va_end() +dd4b9ca cls_lock_client: return error when decoding fails +1779d5a cls_lock_client: fix indentation +b4298fc cls_lock_client: change modified reference parameters to pointers +9c6752e cls_lock_client: clean up reference parameters +3de0d4a cls_lock: fix some spacing +649bdc1 doc: clarify rbd man page (esp. layering) +dcbb87c rbd: add --format option +1b27a7c client: renew/submit subs on startup +f85863e objclass: add remove operation +a23351e :doc: Added constraints and revised a description per joshd. +f2c4510 upstart, ceph-create-keys: Make client.admin key generation automatic. +0de7195 upstart: Make instance jobs export their cluster and id variables. +3b0e2a2 config: Add a per-name default keyring to front of keyring search path. +8b4a9ad doc: Modified index page with table. Pools and Auth will go to Ops. +b961a66 doc: Some improvements. This still needs review. +c41fa39 doc: Added additional note to mount data disk to data path. +b80a1b7 doc: Added a document for general config settings. +2407b0c doc: Added a doc for filestore settings. +17dee29 doc: Added a document for RBD cache settings. +69e1016 doc: Added substantial detail to OSD setting descriptions. +c0c9fe5 doc: minor edit to use # for comments. +98eaacc doc: Restructured ceph config. Added network and OSD config details. +3c9bc47 librbd: prevent racing clone and snap unprotect +465fcca rbd: add "children" command, update cli test files +78f6975 librbd: add {rbd_}list_children() methods +ac481e8 rgw: cleanup create_bucket +ef92157 rgw: remove static store object +be00f9b rgw: pool names are not global +ed8922d rgw: RGWRados holds domain root info +f71a416 rgw: rgwstore is not global +4d9802c rgw: remove unused block of code +e3834f0 rgw_admin.cc: Prevent clobbering the index when linking a bucket. +82c62bd rgw: clear usage map before reading usage +5f36b8d osd: fix waiting_for_disk assertion +745a3c9 rados_bench: wait for completion callbacks before returning +dfb7f80 Makefile.am: add missing .h +2d79a62 rados_bench: wait for completion callbacks before returning +a7867c2 doc: Completed and reviewed RGW config reference. +8d7912c doc: added admonishment. Updated header syntax, copy semantics and x-ref. +5507665 rgw: fix usage log read +3eea910 doc: Added internal references. Clarified language in disk prepare. +a466dff doc: added sudo for hdparm command. +080e572 doc: added internal hyperlink targets. +dd011ab doc: Clean up quick start to ensure nobody uses "localhost". +9755466 doc: Cleaned up syntax errors, and converted table to list. +2a3b796 objecter: fix skipped map handling +8d1efd1 objecter: send queued requests when we get first osdmap +e59b9da objecter: fix is_latest_map() retry on mon session restart +7d40cba monclient: pass EAGAIN to is_latest_map() callers +0adc228 monclient: document get_version(), and fix return value +0a1f4a9 Implement multi-object delete. +17ceec0 osd: requeue dup ops inline with in-progress ops +d5cacac osd: include notif pointer in notify debug output +0a2ec98 config: add 'fatal signal handlers' option +bc90c9a test/: renamed omap_bench.hpp to .h, fixed histogram formatting +aaeb551 librados,ReplicatedPG: add omap_cmp +7a631f9 cls_rgw_client: fix #include path +6f68ff5 cls_rgw: add cls_rgw unitest, test gc api +a30f714 rgw-admin: get rid of lazy remove option, other fixes +721a6be rgw: implement garbage collector +bd534bf mon: make parse_pos_long() error message more helpful +c7d11cd osd: turn off lockdep during shutdown signal handler +c03ca95 (tag: v0.51) v0.51 +aa91cf8 mon: require --id +5fd2f10 mon: fix int parsing in monmon +31c8ccb mon: check for int parsing errors in mdsmon +304c08e mon: check for int parsing errors in osdmon +3996076 interval_set: predeclare const_iterator +ef4ab90 Makefile: update coverity rules +6b1f23c librbd-dev.install: package new rbd/features.h header file. +d9bd613 mon: describe how pgs are stuck in 'health detail' +bcd4b09 osd: fix use-after-free in handle_notify_timeout +e97f1c5 ceph.spec.in: package new rados library. +551628e obj_bencher: use async remove during slow remove-by-prefix +4bef576 obj_bencher: remove all benchmark files matching a prefix +048c7dc obj_bencher: cleanup files in parallel using aio +9e58d1b obj_bencher: remove benchmark objects by prefix +fab73c3 obj_bencher: store per-benchmark metadata +fb7238e obj_bencher: clean up objects after a write benchmark +4f1b04c obj_bencher: announce prefix during write benchmark +e43ba81 Don't package crush header files. +1cd89d1 ceph.spec.in: package new rbd header and rados library. +e229f84 msg/Pipe: conditionally detect session reset +1c3111f osd: prefer acting osds in calc_acting() +af15ba6 librados: implement aio_remove +fed8aea rbd: force all exiting paths through main()/return This properly destroys objects. In the process, remove usage_exit(); also kill error-handling in set_conf_param (never relevant for rbd.cc, and if you call it with both pointers NULL, well...) Also switch to EXIT_FAILURE for consistency. +f0e746a mon: name cluster uuid file 'cluster_uuid' +cada8a6 objecter: use ordered map<> for tracking tids to preserve order on resend +91d5c19 Don't package crush header files. +4905c06 mon: create cluster_fsid on startup if not present +7fde8e9 mon: create, verify cluster_fsid file in mon_data dir on mkfs +b207b15 cephfs: add 'map' command to dump file mapping onto objects, osds +0f9f63a perf-watch: initial version +1113a6c objecter: use ordered map<> for tracking tids to preserve order on resend +a5901c6 doc: Either use a backslash and a newline, or neither. +ec90d3f cls_rgw: add gc commands handling +e4a78d2 config_opts: add gc configurables +7dd5d06 cls_lock: specify librados namespace explicitly +eda5a76 cls_rgw: cleanups +e7c492b mon: implement 'ceph report ' command +8f95c1f config: remove dead osd options +bfb24a7 Fix compilation warnings on squeeze; can't printf() snapid_t directly +bb1e65e rgw: use sizeof() for snprintf +4a0704e osd: fix requeue order for waiting_for_ondisk +1a09423 rgw: dump content_range using 64 bit formatters +ddbef47 Revert "rgw: dump content_range using 64 bit formatters" +2e8689a mon: fix monitor cluster contraction race +81694c3 Add manpage sections for flatten, snap {un}protect +6a9bcc0 mkcephfs, init-ceph: Warn if hostname "localhost" is seen in ceph.conf. +5ad013b "Removed 274 from xfstests" +5642a5e test_rbd.py: remove clone before image it depends on +cc435e9 rgw: dump content_range using 64 bit formatters +dd4c1dc osd: fix requeue order of dup ops +6ae216e osd: fix warning +60fdb6f init-ceph: use SSH in "service ceph status -a" to get version +5c70392 doc: mkcephfs man page, -c ceph.conf is not optional +7e417bd osd: make notify debug output less noisy +5e761b4 mds: do not return null dentry lease on getattr +19ea312 mon: add MonitorStore::sync() +223d6fa crypto: cache CryptoHandler in CryptoKey +cfe211a doc: fix key export syntax +f965358 Roll up loose ends from a marathon merge/rebase session +380b047 Review: +5a295c8 librbd: snap_protect: verify layering is supported +2b6863e librbd: review: don't call to the OSD to get current protection status +f38dd48 test_rbd.py: actually make unprotect_with_children work, and clean up +491bd8d librbd: change EINVAL to EBUSY on "can't unprotect because children exist" Add pool, number of children in this pool that caused failure to log +ff60940 review: librbd, test_librbd: make "protect protected snap" fail +e21bac9 Update protection methods to use parent_spec, parent_types.h, etc. +bd2e751 test_rbd: add test for denying removal of protected parent +bef9180 get_features requires md_lock and snap_lock to be held +c729e15 librbd: clone return codes: ENOSYS for no layering, EINVAL for no prot +27a4dea librbd, test_librbd: snap_unprotect: refuse if children still exist +460242d test_cls_rbd: get_parent with no parent: should fail and return null-pspec +1b32d78 librbd: cause add_child/remove_child to treat duplicate ops as errors +53868a9 librbd: review: add helper for 'scanning snapshots for this parent' +2ca8fb2 librbd: review: change get_snapinfo to get_parent_spec +31824b6 librbd, cls_rbd: move parent_info and parent_spec to parent_types.h +9a45ffb librbd: memcpy object_prefix must copy terminating NUL +c0c29f8 librbd: remove: keep ictx open until snapshots are scanned +2382425 Review: change to look for parent across base and all snapshots, and remove only if not present in any of them. +dc1e26f Enhance add/remove child tests +f1fc2b4 get_parent on non-layered image no longer fails; remove test case +d09e0e2 Add struct parent_spec Holds poolid,imageid,snapid triple identifying parent Allows for equality comparison of parents +80d4d38 poolid should be signed +a09052f run-rbd-tests: prefer local binaries over $PATH +fd60416 librbd: snap_set and open_image need to refresh parent info +2dc751e librbd: Manipulate rbd_children in flatten, clone, remove, snap remove +397285a librbd: make get_parent_info look at snapshot-specific info when needed +cb74233 Fix some trailing spaces on lines +767fdf1 rados: allow listomapvals to dump keys with nonprintable characters +93fed22 cls_rbd, cls_rbd_client: add/remove/get children +fefdf28 rbd: warn on 0-length secret +4ce0a51 doc: properly document 'rbd map' without touching sysfs +b403db1 rbd: update man page to avoid deprecated --secret, --user +2a36873 rbd: use generic options, keyring for 'rbd map' +e0b094b keyring: make --key, --keyfile override loaded keyring +7b57931 config: make --user a synonym for --id +b2d6ea7 librbd: add test for discard of nonexistent objects +a3ad98a librbd: hide ENOENT on discard +7141a6c msg/Pipe: log port number +1daeb2d cpu_profiler: drop start, stop commands +d01c126 crypto: remove old crypto globals +2bca756 doc: small RST syntax fixes for eu.ceph.com mirror +35004bb docs: Add EU mirror for getting Ceph source and packages +476e493 ceph-fuse: debug off by default +107ffc6 auth: move Crypto users to use CephContext +9b7482f auth: move Crypto{None,AES} definitions to header +becf206 osd: avoid dereferencing pg info without lock +130b559 mutex: add is_locked_by_me() +da48658 run-cli-tests: Check that virtualenv is found. +ef80abe msg/SimpleMessenger: fix leak of local_connection +34d626d test_librbd_fsx: fix leak +6e44e9e SyntheticClient: fix warnings +aaf0123 librbd: make aio_discard declaration match definition +7f4851c librbd: fix uninit var new_snap in ictrx_refresh() +cfd0d4f librbd: fix warning +17e9414 heap_profiler: return result via ostream +79bdcbe cpu_profiler: outout to ostream instead of clog +35753eb osd: avoid generate huge osdmap deletion transactions +8a4d563 osd: break potentially large transaction into pieces +e908cb9 osd: only commit past intervals at end of parallel build +da210be osd: explicitly requeue waiting_for_map in on_change() +fac699c osd: simplify how in-progress ops are requeued +1045472 osd: rename op_waiters -> waiting_for_map +9fd7d4d mds: fix some gcc 4.7 warnings +407c350 crypto: remove unused label +5bbd5dc do_autogen.sh: -n for nss +19063aa byteorder: fix gcc 4.7 warnings +8555875 do_autogen.sh: apply 'profiler' options to CXXFLAGS, too +3e50a09 do_autogen.sh: -p to pass --with-profiler to configure (google cpu profiler) +5962a9d obsync: add missing package specifier to format_exc +dc76a6c ceph-fuse: add --fuse-debug option to enable libfuse debugging +a15fde4 fix keyring generation for mds and osd +36e7b07 fix ceph osd create help +c6ae5e2 objectcacher: fix bh leak on discard +77745f9 mkcephfs: fix mon data empty check +3e7df78 PG,Message: move intrusive_ptr_* into top namespace +614417e mon: make 'clocks too skewed' message for accurate +24a26c62 mkcephfs: fix mon_data check +3d3d91d osdmap: apply mon_max_osd when generating osdmap from conf +1a5e12e osdmap: fix pg_num calculation when generating osdmap from conf +cca85af global: only print banner if type is daemon +615f85d mon: throttle daemon messages independently from client messages +9fc7958 filejournal: instrument journal write counts, sizes +2f3e03f perfcounters: add u64 average type +1eea43d global: fix version banner in log on startup +3267127 doc: document use of CRUSH tunables +b254ba7 mon: require CRUSH_TUNABLES when latest osdmap has tunables set +3dd5ebd osd: require CRUSH_TUNABLES feature of peers, clients when used +43f7d37 osd: put throttler on default policy +da35b4c msgr: make set_policy_throttler safe, act on default +73218a7 msgr: make set_policy() and set_default_policy() safe to re-use +5ab4939 doc: v0.48.1argonaut release notes, changelog +75172c7 msg/Accepter: fix nonce initialization +294c25b ceph-osd: log journal-creation failure with derr +8af2cf3 msgr: expose get_policy() through generic Messenger API +1740bd0 crush: add helper has_nondefault_tunables() +c8af0fa cephtool: make command wait for osdmap explicit +a4428bd (tag: v0.50) v0.50 +ac02b34 msg/Pipe: discard_queue() -> discard_out_queue() +d58df35 msg/Pipe: simplify Pipe::tcp_read() return value +76954c1 msg/Pipe: document tcp_*() +5d5045d msg/Accepter: use learned_addr() from Accepter::bind() +1b8f2e0 msg/SimpleMessenger: push need_addr check into learned_addr() +8453a81 msg/Accepter: pass nonce on start +a0017fc msgr: protect set_myaddr() +c84b728 msg/Accepter: make members private +608c776 msgr: remove useless SimpleMessenger::msgr +b97f6e3 msgr: some SimpleMessenger docs +8c1632b cephtool: send keepalive to tell target +90e0ef9 cephtool: retry 'ceph tell ...' command if connection fails +ee206a5 cephtool: set messenger policy +b30ad9a cephtool: fix deadlock on fault when waiting for osdmap +ce0bc11 rbd: show snap protection status +98286b4 MonMap: return error on failure in build_initial +5c116bf addr_parsing: report correct error message +1fd7acd rbd: fix test compilation on 32-bit +be6b5e1 test_librbd_fsx: fix warning +4d71ca6 rbd: fix cli tests +677934b rgw: modify some error messages +b28db08 rgw: use multiple notification objects +b15d639 radosgw-admin.rst: Misc doccumentation update. +45f7f06 rgw_admin.cc: Allow removal of a user's buckets during user removal. +53d7750 librados: add method to get the fsid of a cluster +cd5d724 librbd: fix memory leak on error in clone +c77f0fb rbd: add snap [un]protect commands +8d5f1e9 librbd: add methods for protecting/unprotecting snapshots +cc8eac2 rgw_admin.cc: Allow for deletion of objects through radosgw-admin. +f9359f0 doc: New example usage. +6bc1067 rgw: fix usage trim call encoding +04a0eac cls_rgw: fix rgw_cls_usage_log_trim_op encode/decode +3499c0e cls_rbd: add methods for getting/setting protection status +074c3c0 rgw: expand date format support +d39ea1d rgw: complete multipart upload can handle chunked encoding +03b787e rgw_xml: xml_handle_data() appends data string +3809e34 rgw: ETag is unquoted in multipart upload complete +52f03dc doc: Added debug and logging reference. +d78dfe5 mkcephfs: use default osd_data, _journal values +3c90ff4 mkcephfs: use new default keyring locations +c03f744 keyring: make from_ceph_context() a member +ece78c8 doc: some basic cephx documentation +69130d7 monclient: move keyring requirement where it belongs +35e79f2 keyring: simplify from_ceph_context() +ac9d429 keyring: simplify from_ceph_context() arguments +5e13fd6 keyring: check client requirement list too when loading keyring +e536889 monclient: differentiate clients vs daemons +e4e4882 mon: differentiate cluster and client auth requirements +d5704bd buffer: make release() private +bf4c5e7 mds, osd: require auth_service_required, if defined +4fd393f librbd: fix bounds of memcpy in info() +d48d1ff test_librbd_fsx: add cloning +745783c librbd: expose feature bits through librbd.h +12e2070 librbd: close parent after shutting down cache +9bf3d48 librbd: move flush on new snap outside of snap_lock +53947ed librbd: check new snapc for validity, not the old one +965271d test_librbd: add a simple io to clone test +12c9a7d test_rbd.py: refactor cloning tests +beccac9 librbd: don't open parent again during get_parent_info +90dc565 librbd: implement read/write from parent images +4329195 rados.py: add binding for rados_trunc +3671a37 doc: Explicitly state mount.ceph two first arguments are fixed. +17ad4e1 doc: mount.ceph is also needed for cephx. +c961a20 doc: Fix toctree structure for man obsync(1). +5db3a9e rgw_admin.cc: Disallow addition of S3 keys with subuser creation +4e40a78 ceph-authtool: Fix usage, it's --print-key not --print. +25de5e5 Revert "osd: peering: detect when log source osd goes down" +203dffa doc: cd to repository before running git status. +48de9b5 doc: Say what to do if submodules are out of date. +93cbab7 doc: Simplify submodules explanation. +6af560d doc: Correct Git URL for clone +0d3d75e osd: peering: detect when log source osd goes down +ca2c381 osd: peering: detect when log source osd goes down +bb6e0d0 wireshark: update patch +deec81b ReplicatedPG: clear waiting_for_ack when we send the commit +f22b95d rbd: fix off-by-one error in key name +e775ce5 secret: return error on empty secret +cda5e8e PG,ReplicatedPG: clarify scrub state clearing +6d464a2 PG::mark_clean(): queue_snap_trim if snap_trimq is not empty +1041b92 ReplicatedPG::snap_trimmer: requeue if scrub_block_writes +c6bc3e1 librbd: refactor synchronous I/O +ff2a96c rbd: fix copy-pasted snap remove error message +ea75d1f librbd: check for new snapshots in snap_set +bd11990 librbd: add method to get the size of an image +72dc665 librbd: make ImageCtx methods take snap_id parameters +902bbd7 cls_rbd: don't duplicate encoding +4111501 qa: add script to run rbd/librbd tests +9071764 qa: remove rbd image when done +d3b5ee7 librbd: split into multiple files +237f240 rbd: flatten command (copyup an entire image) +bbc2a4e librbd: round #blocks in image_info() for edge cases +26ed384 librbd, rbd.py, test_rbd.py: flatten methods +9e5d4e6 osd: initialize send_notify on pg load +f9ff8dd osd: replace STRAY bit with bool +8e40477 test: test_keyvaluedb_iterators: Test KeyValueDB implementations iterators +9dd8a33 os: KeyValueDB: implement snapshot iterators +fb1d549 os: KeyValueDB: re-implement (prefix) iter in terms of whole-space iter +effdec9 auth: introduce cluster, service, and client auth settings +ec6ecc1 auth: AuthSupported -> AuthMethodList +4a0a7e2 auth: (ordered) list of auth methods, not a set +9d43c8a test: workloadgen: Don't linearly iterate over a map to obtain a collection +bae8370 osd: peering: make Incomplete a Peering substate +d1602ee osd: peering: move to Incomplete when.. incomplete +d612694 config: send warnings to a ostream* argument +de4474a vstart.sh: apply extra conf after the defaults +bbc4917 msg/Pipe: if we send a wait, make sure we follow through +6c01d46 client: handle fault during session teardown +a879425 msg/Pipe: make STANDBY behavior optional +f69d025 conf: make dup lines override previous value +4dfc14c mon: remove superfluous "can't delete except on master" comments +5f3ef77 mon: make pool snap creation ops idempotent +53aa959 objecter: return ENOENT/EEXIST on pool snap delete/create +507f99e librados: make snap create/destroy handle client-side errors +3715d20 mon: check for invalid pool snap creates in preprocess_op, too +640e5fd qa: simple tests for 'ceph osd create|rm' commands +6f7837a mon: make 'osd rm ...' idempotent +4788567 qa: simple test for pool create/delete commands +a01e22d mon: make pool creation idempotent +5503376 mon: make pool removal idempotent +597f14a objecter: make pool create/delete return EEXIST/ENOENT +358d6b6 librados: make pool create/destroy handle client-side errors +46e819e objecter: fix mon command resends +c2e1c62 mutex: assert we are unlocked by the same thread that locked +6ec9555 cond: reorder asserts +9553c6e osd: fixing sharing of past_intervals on backfill restart +29aa1cf filestore: check for EIO in read path +0891948 filestore: add 'filestore fail eio' option, default true +aef10e7 librbd: fix id initialization in new format +17bb78a librbd: fix id initialization in new format +5601ae2 mon: set a configurable max osd cap +bcb9ab8 doc: updates to fix problem with ceph-cookbooks appearing in chef-server. +9767146 osd: generate past intervals in parallel on boot +d45929f osd: move calculation of past_interval range into helper +18d5fc4 osd: fix map epoch boot condition +11b275a osd: avoid misc work before we're active +278b5f5 mon: ignore pgtemp messages from down osds +08e2eca mon: ignore osd_alive messages from down osds +404a7f5 admin_socket: json output, always +0133392 admin_socket: dump config in json; add test +0ef8cd3 config: fix 'config set' admin socket command +f565ace osd: fix pg log zeroing +d67ad0d Wireshark dissector updated, work with the current development tree of wireshark. The way I patched it is not really clean, but it can be useful if some people quickly need to inspect ceph network flows. +52f51a2 wireshar/ceph/packet-ceph.c: fix eol +a3d57a6 os: KeyValueDB: Add virtual raw_key() function to return (prefix,key) pair +a16d9c6 os: KeyValueDB: allow finer-grained control of transaction operations +6c0fa50 doc: update information about stable vs development releases +48bd839 librbd: replace assign_bid with client id and random number +67832c3 osd: fix ACK ordering on resent ops +96dbc41 rados::cls::lock: move api types into namespace +ca6265d (tag: v0.49) v0.49 +c8f1311 mon: make 'ceph osd rm ...' wipe out all state bits, not just EXISTS +f42e187 cls_rbd, cls_rbd_client, test_cls_rbd: copyup method +127ff61 librbd: drop unnecessary std:: and struct prefixes +c18c4b8 librbd: open parent image when opening a child +b82f595 librbd: move all side-effects to snap_{un}set() +8014d93 librbd: allow opening an image by id +df71c2d librbd: store parent info in snapshot metadata +233d44a librbd: allow an image to be opened without watching +4af1f98 librbd: move watch/unwatch to ImageCtx methods +02aba7b librbd: rename variables for more consistency +56bc369 cls_rbd: make get_parent return valid data when layering is disabled +d5e4541 cls_rbd: return negative pool id if parent does not exist +9b9efe7 cls_rbd_client: fix locking function indentation +5fcb22f mkcephfs: add sync between btrfs scan and mount +2d7e2cb crush: fix name map encoding +b497bda osd/OpTracker: fix use-after-free +7cf1f1f msg/Pipe: go to STANDBY on lossless accept fault +ef3fd1c msg/Pipe: go to standby on lossless server connection faults +9348bb3 osd: reopen heartbeat connections when they fail +ea7511b msg/Pipe: fix leak of Connection in ctor +60eb36e msgr: close get_connection() race +04fde51 msgr: drop CLOSED checks during queueing +adce6df msgr: simplify submit_message() +2e67b7a msgr: do not reopen failed lossy Connections +9a4e702 msg/Pipe: unregister pipe immediately on fault; fix mark_down +541694f msg/Pipe: disconnect Pipe from lossy Connection immediately on failure +cef8510 msg/Connection: add failed flag for lossy Connections +472d14f msg/DispatchQueue: fix locking in dispatch thread +9d94ed1 test_stress_watch: verify that the watch operation isn't slow +7b398a5 msgr: indicate whether clients are lossy +525830c msgr: do not discard_queue in Pipe reaper +8966f71 msg/IncomingQueue: make the pipe parent informational only +999c506 msg/DispatchQueue: give IncomingQueue ref to queue +5a62dfe msg/DispachQueue: hold lock in IncomingQueue::discard_queue() +35b7bca msg: kill tcp.{cc,h} +5ecc5bc msg/DispatchQueue: cleanup debug prefix +89b07f4 msg/Pipe: move tcp_* functions into Pipe class +d034e46 msgr: move Accepter into separate .cc +3e98617 msg/Pipe: get_state_name() +f78a401 msgr: rework accept() connect_seq/race handling +a6735ab OpRequest,OSD: track recent slow ops +9e207aa test/store_test.cc: verify collection_list_partial results are sorted +49877cd cls_lock: cls_lock_id_t -> cls_lock_locker_id_t +315bbea cls_lock: document lock properties +056d42c cls_log: update a comment +2c7d782 rados: lock info keeps expiration, not duration +d16844c rados tool: add advisory lock control commands +2f8de89 cls_lock: objclass for advisory locking +9c5c3ed objclass: add api calls to get/set xattrs +adc9b91 os/HashIndex: use set> rather than multimap +0b84384 mon: shut up about sessionless MPGStats messages +6580450 osd: clean up boot method names +369fbf6 osd: defer boot if heartbeatmap indicates we are unhealthy +dec9369 osd/mon: subscribe (onetime) to pg creations on connect +7f58b9b mon: track pg creations by osd +4c6c927 Revert "rbd: fix usage for snap commands" +42de687 rbd: fix usage for snap commands +58cd27f doc: add missing dependencies to README +6f381af add CRUSH_TUNABLES feature bit +e3349a2 OSD::handle_osd_map: don't lock pgs while advancing maps +c8ee301 osd: add osd_debug_drop_pg_create_{probability,duration} options +8f5562f OSD: write_if_dirty during get_or_create_pg after handle_create +ca9f713 OSD: actually send queries during handle_pg_create +5dd68b9 objecter: always resend linger registrations +76efd97 OSD: publish_map in init to initialize OSDService map +7586cde qa/workunits/suites/pjd.sh: bash -x +675d630 ObjectCacher: fix cache_bytes_hit accounting +4e1d973 doc: Fixed heading text. +ebc5773 doc: favicon.ico should be new Ceph icon. +3a377c4 doc: Overhauled Swift API documentation. +d78235b client: fix readdir locking +82a575c client: fix leak of client_lock when not initialized +90ddc5a OSD: use service.get_osdmap() in heartbeat(), don't grab map_lock +58e81c8 OSD: handle_osd_ping: use service->get_osdmap() +32892c1 doc/dev/osd_internals: add newlines before numbered lists +fe4c658 librados: simplify locking slightly +199397d osd: default 'osd_preserve_trimmed_log = false' +24df8b1 doc/dev: add osd_internals to toc +5a27f07 doc/internals/osd_internals: fix indentation errors +6490c84 doc: discuss choice of pg_num +36d0a35 log: simplify log logic a bit +96587f3 Robustify ceph-rbdnamer and adapt udev rules +b046549 doc/radosgw/config.rst: mended small typo +4eec4fc mkcephfs: nicer empty directory check +4e66a3b mkcephfs: error out if mon data directory is not empty +6b1835a vstart.sh: blow away mon directory on creation/start +54be9d0 mon: stop doing rm -rf on mon mkfs +52f96b9 log: apply log_level to stderr/syslog logic +de524ab log: dump logging levels in crash dump +3821f6c PG: grab reference to pg in C_OSD_AppliedRecoveredObject +64f7450 log: fix event gather condition +d4410e4 PG::RecoveryState::Stray::react(LogEvt&): set dirty_info/log +4afa892 PG: use stats from primary after rewinding divergent entries +c7fb964 PG::RecoveryState::Stray::react(LogEvt&): reset last_pg_scrub +5d82a77 doc/dev/osd_internals: OSD overview, pg removal, map/message handling +1b8819b PG: Place info in biginfo object +12d7073 PG: use write_info to set snap_collections in make_snap_collections +90381dc OSD: set superblock compat_features on boot and mkfs +470796b CompatSet: users pass bit indices rather than masks +b7814db osd: based misdirected op role calc on acting set +14d2efc mon/MonitorStore: always O_TRUNC when writing states +f94c764 mon: remove osds from [near]full sets when their stats are removed from pgmap +fe57681 mon/MonitorStore: always O_TRUNC when writing states +bf9a85a filestore: dump open fds when we hit EMFILE +a278ea1 osdmap: drop useless and unused get_pg_role() method +38962ab osd: based misdirected op role calc on acting set +6faeeda osd: simplify helper usage for misdirected ops +ed4f80f vstart: use absolute path for keyring +117b286 OSD: add config options to fake missed pings +ce20e02 crushtool: allow information generated during testing to be dumped to a set of CSV files for off-line analysis. +8a89d40 doc: remove last reference to ceph-cookbooks. +2011956 doc: cookbooks issue resolved, so changed 'ceph-cookbooks' back to 'ceph.' +5a5597f qa: download tests from specified branch +5360079 OSD: send_still_alive when we get a reply if we reported failure +5924f8e PG: merge_log always use stats from authoritative replica +3dd65a8 qa: download tests from specified branch +ce7e0be mon: use single helper for [near]full sets +30b3dd1 mon: purge removed osds from [near]full sets +bcfa573 ReplicatedPG: don't mark repop done until apply completes +10ec592 test_librbd: fix warnings +5450567 ReplicatedPG,PG: dump recovery/backfill state on pg query +508bf3f rbd: enable layering when using the new format +dfe29af doc: reverted file and role names. +f8478d4 upstart: Make ceph-osd always set the crush location. +5ceb7c7 doc: fix config metavariables discussion +d1054df doc: perf counters +f33c0be rgw: don't override subuser perm mask if perm not specified +09c60b4 doc: added :: to code example. +ad8beeb doc: minor edits. +63a1799 doc: cookbook name change broke some things in doc. Fixed. +65c43e3 debian: fix ceph-fs-common-dbg depends +cc8df29e rados tool: bulk objects removal +99a048d rados: more usage cleanup +0081c8e rados: usage message Bad linebreaks, wrapping, stringification, missing doc for bench args +0782db3 doc: changed role file names as part of update to roles. +e5997f4 doc: added DHO config. +173d592 rados tool: remove -t param option for target pool +31c8dcc crush: sum and check quantized weights for bucket +675a1b7 crush: Set maximum device/bucket weights. +c9fc5a2 crush: prevent integer overflow on reweight +d29ec1e rados: usage message Bad linebreaks, wrapping, stringification, missing doc for bench args +2c001b2 Makefile: don't install crush headers +22d0648 librados: simplify cct refcounting +c5bcb04 lockdep: stop lockdep when its cct goes away +7adc6c0 mon: simplify logmonitor check_subs; less noise +a542d89 mds: fix race in connection accept; fix con replacement +0f917c2 osd: guard class call decoding +0ff6c97 test_stress_watch: just one librados instance +ee1c029 ReplicatedPG: don't warn if backfill peer stats don't match +d3c97da librados: take lock when signaling notify cond +ec490d8 client: fix locking for SafeCond users +38e2de3 doc: No ssh -t -t, forcing a pty allocation there makes it hang. +79e3416 doc: removed the ceph directory per tommi's update to the chef-cookbooks. +5c84f01 doc: Adding apt update message. VM users didn't get the package otherwise. +fe5c0cd osd: guard class call decoding +2a6af20 rbd: update manpage for clone command +e353149 rbd: update cli test reference files +7b0c71c librados: pool_get_name handles "not found" wrong +6ad5961 rbd, librbd: add tests for cloning +64949d4 librbd, rbd, rbd.py: Add parent info reporting +a94fc8c rbd, librbd, rbd.py: cloning (copy-on-write child image of snapshot) +8cc4342 librbd: open_image snapshot handling Allow opening with no snap, but check for error for nonexistent snap +96a517b librados: Add mapping from pool id to pool name and ioctx to rados client +68bad03 msgr: queue accept event when pipe is accepted +fab6e82 msg/DispatchQueue: queue and deliver accept events +95f85df librados: add new constructor to form a Rados object from IoCtx +d4ef004 dispatcher: new 'accept' event type +1a4a133 msgr: drop unnecessary (un)locking on queuing connection events +e84565d msgr: move dispatch thread into DispatchQueue +9e291ba msgr: simplify checks for queueing connection events +bafcbde msgr: remove unnecessary accept check +bffd46c msgr: remove obsolete dead path +3490814 msgr: uninline ctor and dtor +912123f msgr: move Pipe, DispatchQueue into separate files +c7caf91 msgr: simplify IncomingQueue creation, pointers +fa4c192 msgr: use local IncomingQueue instead of Pipe +2d071b9 msgr: use explicit Connection for messages sent to ourself +35b1326 msgr: take over existing Connection on Pipe replacement +80111cc test_stress_watch: just one librados instance +782a17d doc: added cookbook path instruction. +8869621 doc: Added some pre-clarification for gdisk. Added DHO OSD hardware config. +fbe5577 CephContext: don't leak admin socket +74e6205 CephContext: drop obsolete ceph_destroy_context +074df64 librados: use CephContext ref counts +6aa9f49 CephContext: ref count +58f46bb test_stress_watch: just one librados instance +67a5e75 ReplicatedPG: don't warn if backfill peer stats don't match +645ac87 ReplicatedPG: fix replay op ordering +67361c1 librbd: return an error when removing a non-existent image +ec87a1e cls_rbd: add logging for failed set_parent steps +b23e4e5 doc: Removed legacy paths and keyname settings from examples. +b387077 debian: include librados-config in librados-dev +8e5fe62 doc: remove reference to 'ceph stop' command +03c2dc2 lockdep: increase max locks +b554d11 config: add unlocked version of get_my_sections; use it internally +01da287 config: fix lock recursion in get_val_from_conf_file() +c73c64a config: fix recursive lock in parse_config_files() +97c1562 rgw: handle response-* params +6646e89 rgw: initialize fields of RGWObjEnt +b33553a rgw: handle response-* params +74f6875 osd: add missing formatter close_section() to scrub status +020b299 pg: report scrub status +db6d83b pg: track who we are waiting for maps from +e1d4855 pg: reduce scrub write lock window +72bf66f doc: added some discussion to libvirt. +1316f86 cond: cleanup +da7a328 cond: drop unused Wait variant +9c6fdd5 librados: drop unused local variables +b5693a6 librados: take lock when signaling notify cond +7c919e9 workqueue: kick -> wake or _wake, depending on locking +8de0c22 cond: assert that we are holding the same mutex as the waiter +b486f2f client: fix locking for SafeCond users +540c2c3 doc: Minor cleanup on deploy with Chef. +3df5104 rgw: don't store bucket info indexed by bucket_id +27409aa rgw: don't store bucket info indexed by bucket_id +9814374 test_rados_tool.sh: test copy pool +d751006 rados tool: copy object in chunks +16ea64f rados tool: copy entire pool +960c212 rados tool: copy object +23d31d3 ceph.spec.in: add ceph-disk-{activate,prepare} +668ce00 osd: make on_removal() pure virtual +3d00130 osd: fix PG dtor compile error +09af670 PG,ReplicatedPG: on_removal must handle repop and watcher state +6917419 OSDMonitor: disable cluster snapshot +8e93e8b OSD: ensure that OpSequencer lives through on_commit callback +816d424 ReplicatedPG.cc: C_OSD_CommittedPushedObject move pg->put() to finish +fe14c18 OSD::PeeringWQ::_dequeue(PG*) drop pg refs +0475ee4 OSD,PG:;replica_scrub: move msg->put() into queue process +bdf09f2 OSD,ReplicatedPG::snap_trimmer: pg->put() in process, not snap_trimmer() +cab7b75 OSD: drop pg refcounts in OpWQ::_dequeue(PG*) +868168a OSD: clean up revcovery_wq queueing and ref counting +c70392a doc: minor typo +4d7bb07 doc: update copyright notice in footer +57bc8da doc: minor updates to the restrucuredText file. +0659f7c doc: minor cleanup. +1c9e1c6 doc: Publishing as described. Still requires some verification and QA. +7e26d6d PG: C_PG_MarkUnfoundLost put pg in finish +31db8ed OSD::activate_map: don't publish map until pgs in deleted pools have been removed +7f2354c doc/scripts/gen_state_diagram.py: make parser a bit more forgiving +9fc5db8 ReplicatedPG::op_applied: update last_update_applied iff !aborted +4ce17cc test/encoding/types.h: disable pg_query_t encoding test +99c23b6 OSD: split notify|info|query messages for old clients +193f18f FileStore: delete source collection if not replaying collection_rename +f0b2310 ReplicatedPG: RepModify track epoch_started and bail on interval change +7b5d8e8 ReplicatedPG: on_activate for a peer might happen before flush +87d1cdb OSD: _remove_pg not ruin iterator consistency +311a061 OSD: move watch into OSDService +442b558 PG: pass activate epoch with Activate event +f9282e6 Revert "osd: check against last_peering_reset in _activate_committed" +392df3b Revert "osd: reset last_peering_interval on replica activate" +1b558fb OSD: write_info/log during process_peering_events, do_recovery +c6db1b2 PG: delay ops in do_request, not queue_op +9b182d2 OSD: maybe_update_heartbeat_peers, don't print pg +0ee3d87 OSD: process_peering_event check for new map on each pg +c1f2a80 OSD: peering_wq is now a BatchWorkQueue +d8a68e7 OSD: do_(notifies|infos|queries) must now be passed a map +3ca6359 common/WorkQueue.h: add BatchWorkQueue +5c0e8b4 OSD: bail out of do_recovery if no longer primary and active +5dc45f7 PG: PG now store its own PGPool +b242c56 OSD: on pg_removal, project_pg_history to get current interval +a67a874 CrushWrapper: add locking around crush_do_rule +c7581b6 CrushWrapper: rmaps don't need to be mutable +73f5ce9 OSD,PG: issue pg removals in line, remove remove_list +7c1dc90 OSD: don't advance_pg() if pg is up-to-date +8079a48 OSD,PG: clean up _get_or_create_pg and set interval based on msg +a5bf3d7 OSD: lock recovery_wq before debug output on finish_recovery_op +3dcce50 OSD: only do_(notify|info|query) for up osd +040a22b OSD: map_cache should contain const OSDMap +4fec85f OSD: activate_map() in handle_osd_map only when active +2552a7f OSD,PG: _share_map_outgoing must not require osd_lock +35949c5 ReplicatedPG: explicitely block on not active for certain ops +e8d09d0 PG,OSD: prevent pg from completing peering until deletion is complete +b200710 OSD,PG: clean up pg removal +9a4a9b9 PG: flush ops by the end of peering without osr.flush +33b985d OSD,PG: added helper methods for creating and dispatching RecoveryCtxs +b80b500 OSD,PG: Move pg accesible methods, objects to OSDService +502c033 PG, OSD: info_map shouldn't contain the MOSDPGInfo* +f68f52c OSD: queue_want_up_thru in process_peering_event +492e635 OSD: do not drop osd_lock in handle_osd_map +14381b3 OSD: get map read lock during queue_want_up_thru +10ec5bc OSD: push_waiters is no longer used +90e3727 OSD: do not lock osd during dequeue_op +3d32712 OSD: don't assume pending pg removals have flushed +91355fb ReplicatedPG: change ReplicatedPG debug output to match PG +b6bf573 ReplicatedPG: do not eval_repop if aborted +f6fc1b3 OSD: remove superfluous pg get/put around enqueue_op +b0cb96bf PG,OSD: fix op checking in pg, take_waiters during ActMap +b5078bb PG,OSD: add OSD::queue_for_op, use in PG::queue_op +64b71c6 OSD: check for deleting in process_peering_event +fff0874 PG: use osd->requeue_ops for ops, pg->queue_for_peering to requeue pg +e10e81c PG: compound messages must carry epoch_sent for each part +b081bd4 PG: CephPeeringEvents can now be descriptively printed +65abfc0 OSD: initialize pgs in get_or_create_pg via handle_create +c7e3495 PG: include info and query by value in peering events +12e22b3 OSD,PG: handle pg map advance in process_peering_event +bbd8af0 osd/: Make pg osdmap be independent of osd, other pg maps +ddef446 OSD,PG: Move Op,SubOp queueing into PG +33bcbb3 PG: process peering events in a queue +36d1381 PG: use intrusive_ptr in CephPeeringEvt +6922f9c osd/: move history update from handle_pg_query into pg +d015823 OSD,PG: push message checking to pg +7c414c5 OSD: Remove handle_pg_missing, MOSDPGMissing no longer used +3691e3c PG: Move handle_* methods to PG +1ffd190 PG: CephPeeringEvt +18fec69 OSD,PG::scrub() move pg->put() into queue process +ea11c7f Allow URL-safe base64 cephx keys to be decoded. +7fa8579 osd: add missing formatter close_section() to scrub status +f67fe4e librados: Bump the version to 0.48 +bcfcf8e librados: add assert_version as an operation on an ObjectOperation +39eaa23 ReplicatedPG: do not set reply version to last_update +e6e36c0 rgw: initialize fields of RGWObjEnt +35b9ec8 rgw-admin: use correct modifier with strptime +da251fe rgw: send both swift x-storage-token and x-auth-token +4c19ecb rgw: radosgw-admin date params now also accept time +6958aeb rgw-admin: fix usage help +ad97415 ceph-disk-prepare: Partition and format OSD data disks automatically. +a1696fe doc: removed /srv/osd.$id.journal from ceph.conf example. +8f64647 CrushTester.cc: remove BOOST dependencies. +7e23aad doc: Updates to 5-minute quick start. +83c043f radosgw-admin: fix clit test +c667f5d lockdep: increase max locks +12ba580 config: add unlocked version of get_my_sections; use it internally +5674158 ceph: fix cli help test +fc18cca doc: Clean up of 5-minute quick start. +151bf0e ReplicatedPG: remove faulty scrub assert in sub_op_modify_applied +8ade74b ReplicatedPG: remove faulty scrub assert in sub_op_modify_applied +09dd8ca doc: Updating Getting Started with 5-minute quick start. +32833e8 ceph: better usage +8c95b5c doc: restructuring quick start section. +4bd7c05 IoCtxImpl: pass objver pointer to aio_operate_read +4e774fb ceph-disk-prepare: Take fsid from config file. +cd0314d config: remove bad argparse_flag argument in parse_option() +67455c2 debian: strip new ceph-mds package +6bb19e7 doc: Cleaned up rbd snapshots. +ad61bbd config: fix lock recursion in get_val_from_conf_file() +7009c32 config: fix recursive lock in parse_config_files() +b53cdb9 config: remove bad argparse_flag argument in parse_option() +14ec778 client: improve dump_cache output +8b46201 doc: release notes for 0.48 +562cad6 doc: 'Configuring a Storage Cluster' -> 'Configuration' +b5287c1 lockdep: enable in common_init +f7d4e39 msgr: restart_queue when replacing existing pipe and taking over the queue +5dfd2a5 msgr: choose incoming connection if ours is STANDBY +b7007a1 msgr: preserve incoming message queue when replacing pipes +1f3a722 msgr: move dispatch_entry into DispatchQueue class +0344529 msgr: move incoming queue to separate class +0dbc541 msgr: make D_CONNECT constant non-zero, fix ms_handle_connect() callback +2429556 msgr: fix pipe replacement assert +204bc59 msgr: do not try to reconnect con with CLOSED pipe +e6ad6d2 msgr: move to STANDBY if we replace during accept and then fail +c2b20ca (tag: v0.48argonaut) v0.48argonaut +b5098b3 ceph.spec.in: Change license of base package to GPL and use SPDX format +a1fe589 mon: initialize quorum_features +d82a502 qa: add rbd remove tests +d04b2fb cls_rbd_client: check return code of operate +1c096a8 qa: run rbd tests against old and new formats +aa3255b qa: add tests for rbd ls with old and new formats +288bde3 qa: restructure rbd cli tests +0ad14c9 qa: add rbd command rename tests +6f096b6 librbd: use new class methods to access rbd_directory +f2d37c5 librbd: handle NULL old_format pointer in detect_format()'s logging +2628530 doc: fixed --cap error and a few additional bits of cleanup. +2472034 OSD::do_command: unlock pg only if we had it +841451f MOSDSubOp: set hobject_incorrect_pool in decode_payload +b91beca doc: Added sudo and cleaner instruction for unmap. +f16a9c4 doc: updated usage on RBD kernel object commands. +e186013 doc: drop mention of MDS capabilities from radosgw man page +deceb70 filestore: initialize m_filestore_do_dump +31ad263 doc: add design doc for rbd layering +398a229 filestore: set min flush size +0810ab6 osdmap: check new pool name on rename +5a93550 osd: handle pool name changes properly +d15385b CrushTester: add Monte Carlo generator to more accurately simulate a CRUSH mapping using a RNG +5de9af5 crush: style changes +cc4955a PG: reset_recovery_pointers in activate if missing is empty +657e86c vstart.sh: don't clobber keyring if not -n +a8d7fd9 mon: 'osd pool rename ' +02f1b0a doc: document new 'osd crush move ...' command +f5e3a67 mon: fix 'osd crush move ' +5e454bb mon: add 'osd crush move ' command +a2d0cff crush: add move_bucket() method +d22529d crush: get_loc -> get_immediate_parent +d7c18c1 PG::merge_old_entry: handle clone prior_version case +b907c88 ReplicatedPG: adjust log.complete_to based on rmissing +143afcf ReplicatedPG: clear peer_(missing|log)_requested in check_recovery_sources +090e510 PG: check_recovery_sources on each map +c3a02ea doc: radosgw: further simplify Apache rewrite rule +76c657e cls_rbd: add methods for dealing with rbd_directory objects +de62c4c objclass: add create method +4110707 cls_rbd: use already defined local var instead of constant +a1d477b librbd: add indirection between name and header object +5ae6e71 cls_rbd: add {get,set}_id methods +0a6ee69 doc: document osd tell bench +147114d doc: minor edits. +15ebf20 rest-bench: mark request as complete later +5c23d35 buffer.h: fix operator> and operator>= increment error +335b918 DBObjectMap: clones must inherit spos from parent +cc1da95 filestore: sync object_map object in lfn_remove when nlink > 1 +218dd5a radosgw Apache configuration: simplify rewrite rule +5a06af7 Fix example radosgw Apache configuration +6a5c155 objclass: remove unused variable from cls_cxx_map_get_vals +f969b59 cls_rbd: fix signed-ness warning +9d6013e debian: move metadata server into ceph-mds +915f321 debian: move mount.ceph and cephfs into ceph-fs-common +0d9b558 debian: arch linux-any +8949232 debian: build with libnss instead of crypto++ +9d7f048 doc/config-cluster/authentication: keyring default locations, simplify key management +f366173 pg: report scrub status +c94583e pg: track who we are waiting for maps from +ecd7ffe pg: reduce scrub write lock window +16d5565 mon: MonmapMonitor: Use default port when the specified on 'add' is zero +04e1c30 rest-bench: mark request as complete later +c5d19b6 rgw-admin: use correct modifier with strptime +17f433a OSD: disconnect_session_watches: handle race with watch disconnect +e34dfc3 doc: removing old 'todo' configuration reference. +efb74a9 doc: converted daemon references from nasty tables to lines. +4142ac4 doc: a few minor tweaks to radosgw to cleanup navigation. +0be2611 doc: Published RADOS GW docs and install as is for now. Needs more work. +9342573 CrushTester.cc: removed last broken bits of obsolete method +6d551c1 CrushTester.cc: removed obsolete method for collapsing a CRUSH map +df7729e CrushTester: eliminated compiler warning +88e3154 radosgw-admin: improve man page +63b562f doc: explain how to configure Ceph for radosgw +07029a4 rgw: send both swift x-storage-token and x-auth-token +80a939a rgw: radosgw-admin date params now also accept time +c87c83f rgw-admin: fix usage help +77fcf06 upstart: fix regex +840ae24 mon: don't tick the PaxosServices if we are currently slurping. +ef6beec objecter: do not feed session to op_submit() +4e45d60 ObjectStore::Transaction: initialize pool_override in all constructors +ff67210 objecter: do not feed session to op_submit() +9fcc3de osd_types.cc: remove hobject_t decode asserts +80649d0 mon: note that monmap may be reencoded later +77d836c mon: encoding new monmap using quorum feature set +de5b323 mon: conditionally encode mon features for remote mon +c399d90 mon: conditionally encode PGMap[::Incremental] with quorum features +0aaf7334 mon: conditionally encode auth incremental with quorum feature bits +06288a9 mon: track intersection of quorum member features +2355b23 mon: conditionally encode old monmap when peer lacks feature +2fe9816 OSD,PG,ObjectStore: handle messages with old hobject_t encoding +ddf7e83 doc: ceph osd crush add is now ceph osd crush set +448f5b0 logrotate: reload all upstart instances +58db045 docs: clarify example in radosgw-admin +7044192 filestore: remove btrfs start/end transaction ioctl code +990febd mon: make pool deletion dne error code consistently ENOENT +62a4ad6 docs: update usage logging info +1e539da doc: Normalized shell script syntax. Added generic cookbook path. +7d38758 doc: Changed libvirt-dev to libvirt-bin, and cleaned up ./autogen.sh +3e32dd0 doc: Typo. +c467d9d (tag: v0.47.3) v0.47.3 +17dcf60 filestore: disable 'filestore fiemap' by default +88c7629 OSD: clear_temp: split delete into many transactions +b84e1ed doc: document usage log +25311e9 cls_rbd: note overlap units +156879f cls_rbd: fix uninitialized var in cls_rbd_parent +986d0e1 cls_rbd: clean up doxygen, whitespace a bit +4e73ca4 cls_rbd: include dumpers, test instances for our types +87cadff cls_rbd: rename parent size -> overlap +3948e06 cls_rbd: handle parent overlap +e8b36ed cls_rbd: make snapshots inherit the head's parent +f87c441 cls_rbd: check for LAYERING feature for parent methods +2f75b46 cls_rbd: implement get_parent, set_parent, remove_parent +c7f91e6 cls_rbd_client: use snapid_t type +145d1c1 rgw: set s->header_ended before flushing formatter +8a4e2a1 rgw: log user and not bucket owner for service operations +282e226 rgw: initalize s->enable_usage_log +f3f144a osd: use derr (instead of cerr) for convertfs +74658df osd: close stderr on daemonize +4ec9633 PG: improve find_best_info +5435a4d osdcap: make grammar build on spirit 2.2/boost 1.42 +992faa4 doc: Added a snapshot page with outline. Needs additional info. +2be0291 doc: Added prerequisite of running Ceph cluster. +0d8970f PG: reg_last_pg_scrub on pg resurrection +b0e66b7 ceph_osd: move auto-upgrade to after fork +6feeff9 librbd: simplify refresh sequence checks +b101f4c doc: first cut of OpenStack/RBD w/out cephx. Authentication coming soon. +37e56e0 filestore: make disk format upgrade warning less scary, more informative +030a2e3 mon: include quorum in ceph status +2fc2cf0 mon: gracefully handle slow 'ceph -w' clients +8b96b9c doc: Added libvirt installation. +51fcef2 PG: best_info must have a last_epoch_started as high as any other info +2b92c73 doc: btrfs and parted chef recipes are not needed. +95ac5ba debian: fix python-ceph depends +d7fe0e3 debian: update homepage url +82cb3d6 filestore: fix 'omap' collection skipping +343cc79 run-cli-test: use new pip incantation +e3b6957 run-cli-test: use new pip incantation +3d4ba43 cls_rbd: do not pass snapid_t to vargs +5efaa8d msg: fix buffer overflow in ipv6 addr parsing +d9e902f ceph.newdream.net -> ceph.com wiki url -> docs url +f8a196f cls_rbd: drop useless snapshot metadata helpers +b08d7ba cls_rbd: use encode macros for on-disk snap metadata +07f853d PG: best_info must have a last_epoch_started as high as any other info +5b1b02b librbd: remove the set-r-and-return idiom from some functions. +b018bef librbd: add cooperative image locking to the C and C++ interfaces +668aa78 librbd: include the image lockers in the ImageCtx mutable metadata +48d2376 test: add rbd image locking tests to test_cls_rbd +71c7ed3 cls_rbd_client: expose locking operations +71e1b1f cls_rbd: add failure logging to all callers of read_key. +c88a455 cls_rbd: add locking functions. +1e899d0 filejournal: make less noise about open failures +b415fd2 rgw: obj copy respects -metadata-directive +2dd1798 librbd: only clear the needs_refresh flag on successful updates. +b5de839 osd: optional verify that sparse_read holes are zero-filled +1156f94 buffer: add list and ptr is_zero() method +614d5a7 LFNIndex.cc: escape null in append_[un]escaped +9d4ce4b filestore: disable 'filestore fiemap' by default +dbbbe21 osdcap: 'allow rwx pool foo' or 'allow pool foo rwx' +1bd5d24 nightly push to local repo +66df6be ceph-authtool: update docs to reflect no more osdcap deny +f916168 osdcap: make caps additive +b44092f radosgw: stop startup timer on failed start +6f30f1fc upstart: make id charset include - _ and . +7bfcc7c radosgw: takes --id, but not -i +92589f8 objclass: allow class methods to retrieve their triggering entity_inst +7515b05 doc: added qemu-img documentation for rbd. +5db4509 rgw: limit number of buckets per user +0adb33d doc: Added steps for OpenStack install with DevStack +446e5d8 doc: fixed bash syntax error. +97c9f01 qa: disable xfstest 68 for now +7f4d171 qa: disable xfstest 219 for now +051e168 osdcap: move semantics of cap check into OSDCap class +529c484 Makefile: fix leveldb dep for system library case +3dbad22 Makefile: fix leveldb includes for system library case +e48dab4 doc: Multi-monitor support means ceph::single_mon was renamed. +762f6d9 osdcap: whitespace to make grammar more readable +1cfd65b osdcap: use static const instead of #define +bf72a00 osdcap: drop unused 'auid' arg from get_cap(), is_match() +67710a6 rbd: fix usage test +66553d2 Makefile: link gtest statically +d1fc562 debian: install radosgw upstart configs, daemon dir +282277d radosgw: upstart support +c4a607a CrushTester.cc: eliminated old compiler warning of uninitialized pointer. +c06e407 osd: reimplement OSDCap struct +6e551f7 init-ceph: make 'status' report running version +f822c02 PG: track purged pgs during active +4ec4b47 ceph_argparse: make entityname parsing error more helpful +6f9ecef rgw: default keyring to $rgw_data/keyring +ca2010e vstart.sh: set data dirs instead of keyring locations +e958efa new default keyring location for daemons +eeeb599 mds: add mds_data config +ce79f9e config: improve variable substitution +d422bf1 config: expand any config variable in config +500c72e config: make meta expansion in set_val optional +72edd35 osdcaps: drop dead peer_type code +8b5336a osd: simplify session peer type check +4cc122c entity_name: is_*() methods +b88a5e5 crush: fix retry histogram array overflow due to indexing error +37dea2d cls_rgw: use updated internal omap api +6fd80d3 cls_rgw: fix CLS_LOG macro usage +1fdd411 crush: fix retry histogram array overflow due to indexing error +ddc9b27 mapper.c: fixed array indexing error. +c31b4e3 remove ceph-kdump-copy +d64600d debian: limit build archs +a3f86b8 rgw: usage statistics also count num of ops/successful_ops +d023cf5 debian: move ./configure to correct rules section +d63aca3 debian: remove dup python build-dep +af16f45 upstart: Read crush location and weight from ceph.conf. +8eb5c9b mon: allow keys to be cleared in ceph osd crush set ... loc key/values +6d8d059 rgw: fix cli test +9a1ea4b rgw: usage log cleanups +753207c doc: update examples in radosgw-admin man page +d2b6e49 rgw: rgw_rados related fixes for usage logging +046395c rgw/rgw_cls_api.h cleanup +9a56a5b rgw_admin: usage admin commands +744a1b3 rgw: usage logger +baa3aff rgw: access methods for new usage ops +ea2f955 rgw: new config options +9a70ec9 rgw: new class methods for handling usage information +d265bb6 rgw: don't fail initialization if socket path returns ENXIO +9851683 cls_rbd: add get_all_features method +ee7a027 mon: fix pg state logging +5cd33cd workunits/rbd: add workunit for running cls_rbd tests +031d42a workunits/rbd: disable remove_with_watcher test +3d22546 librbd: remove unnecessary notify from add_snap() +44e5f3d librbd: ignore RBD_MAX_BLOCK_NAME_SIZE when generating object ids +3d7925b workunits/rbd: allow creating images in different formats +a502630 rados: add commands to interact with object maps +123250b test_librbd, test_rbd.py: optionally use the new format +074ffc5 rbd.py: add support for creating images in the new format +857bbcc rbd: update for the new format +5b40b4b librbd: add create2 to create an image with the new format +b25f277 doc: Segregated set up git from clone. +8337775 debian: ceph depends on python +c526bdb CrushTester: drop range marking +2436457 crushtool: drop useless clitest +f2fa31b CrushTester: simplify, clean up mark down +c5042fe CrushTester: some whitespace +9b0195b CrushTester: randomize mark_down behavior +4921bbb CrushTester: remove dead code +7258076 CrushTester: some cleanup +2deac08 CrushTester: mark_down_ratio and mark_down_bucket_ratio +4551808 mon: add 'auth get-or-create' variant that outputs a keyring +bfbed50 librbd: use ImageCtx members instead of the old header in resize() +5bc34f4 librbd: validate order before creating an image +127b425 librbd: rename md_oid parameters to header_oid +ef38394 librbd: make rename work with any header format +f1d6963 librbd: use cls_client functions for calling class methods +8e51e06 librbd: remove on-disk header argument from helper functions +00f4e84 librbd: check that the current snapid for a snap name matches +4eb2138 librbd: update ictx_refresh to work with both formats +7376a77 librbd: Update ImageCtx for new format +dcc7c96 cls_rbd: add methods for interacting with the new header format +70686c5 librbd: remove useless ENOMEM checks +13aa578 DBObjectMap: remove extra semicolon +8c637f5 vstart: debug osd classes when debugging is on +49059b2 objclass: add methods to get keys without values, and set multiple values +23ebc09 objclass: rename omap methods to be consistent with other interfaces +715c1f1 objclass: allow classes to log at different levels +fe46a74 class_debug: add indent settings header +5750e53 test_librbd: don't include a .cc file +ba56d81 cls_rgw: add indent settings header +e0fda59 objclass: pass strings as const references +60c684a objclass: add indent settings header +fefedc1 cls_rbd: add indent settings header +92325d0 cls_rbd: remove unused test_exec and snap_revert methods +b2793c4 mon: require force argument for 'mds newfs ...' +3eca360 Cleaned some lingering references to "verbose" +c0a02a4 crushtool: refine tunables warning message +978d541 re-include assert after boost::pool +740aa3d crush: compile/decompile tunables +1a2959e crushtool: add --enable-unsafe-tunables option +cfbe34d crushtool: --show-* instead of --output-* +eaad984 CrushTester: clean up output interface +dba70ee CrushTester: dump histogram of choose attempts +c04de2b crush: generate histogram of choose tries +4abb53d crush: fix leaf recursion if we already collided +4873711 CrushTester: optionally output bad mappings +c4336a3 crushtool: arguments to adjust tunables +8b79697 crush: make magic numbers tunable +7332e9c mon: use mode 0600 throughout +07169d2 doc: Added mount cephfs with fstab. +7d1b32a osd: include past_intervals in pg query results +36a3979 OSD: _have_pg should return NULL if pg is not in map +fae1d47 deliberately break encoding macros when wrong assert is present +3571f43 misc assert #include cleanup, hackery +a1ae8b6 reinclude assert.h after json_spirit +e87a66b doc: Incorporated Sam's comments. +3939839 doc: Typo fix. +22863c3 mon: set policy for client, mds before throttler +71c2877 DBObjectMap: fix some warnings +0f6d90c make everyone use our assert #include and macro +a30601a assert: detect when /usr/include/assert.h clobbers us +165fbd1 keyserver: also authenticate against mon keyring +5d520f1 keyring: implement get_caps() +ca433f2 mon: share mon keyring with KeyServer +47b202e mon: put cluster log at /var/log/ceph/$cluster.log and/or send to syslog +78b0bea monclient: be paranoid/defensive about send_log vs log_client==NULL +58b02f9 crushtool: fix cli tests given new less-chatty output, help +af4d8db crushtool: allow user to select output reporting in blocks +87327c2 doc: Added mount cephfs and included it in quick start. +6c1558e logclient: fix warning +d4c30da mon: include pg acting in health detail +0167fd0 mon: include all types of stuck pgs in health detail +37bf2a1 test/cli/ceph-authtool: keyring.bin -> keyring +5b443eb doc: keyring.bin -> keyring everwhere +f918049 test/: Made omap_bench compatible with teuthology +02a9a01 doc: Added the root discussion to deploy with mkcephfs. +993caf8 doc: Added chmod for keyring, and moved client.admin user higher. +85fee04 logclient: fix crashes, fix which entries are sent +b6059cc monclient: send more log entries when first set is acked +235f927 logclient: not a dispatcher +dfd9f5f logclient: limit messages per MLog message +540865f mon: limit size of each logm paxos event +ee94512 config_opts: filestore_update_to defaults to 1000 +d8f8b1f OSD: do not convert an entire collection in one transaction +50331ab FileStore,DBObjectMap: add SequencerPosition argument to ObjectMap +ffc5f7e ReplicatedPG: push_start, don't insert empty extent into data_subset +5250e24 test_filestore_idempotent_sequence: add omap +a2eedec osd_types,PG: handle new hobject format in object_info,pg_log +c64fc29 test_object_map: remove DBObjectMapv0 +56cf461 OSD,FileStore: clean up filestore convsersion +875bec2 DBObjectMap,FileStore: Remove IndexedPath parameters from ObjectMap +ebfde20 DBObjectMap: update header comments for new structure +df7c407 FileStore: skip omap during list_collections +92807c2 OSD: exit(0) once filestore is converted +7c8aac7 ReplicatedPG: adjust missing at push_start +6ec74ac ReplicatedPG: remove_object_with_snap_hardlinks before creating temp obj +19c667f DBObjectMap::init: initialize seq and v to correct values +01ad679 DBObjectMap: update check() for new format +b6a9932 DBObjectMap: Implement upgrade from previous format +e083e0e DBObjectMap: restructure for unique hobject_t's +761140a FileStore,DBObjectMap: remove ObjectMap link method +9ceed87 DBObjectMap: version bump for new format +7a3a2d2 DBObjectMap: add parse method for old encoding +dab238b os/: update CollectionIndex filename encodings +927458c test/ObjectMap: Copy current DBObjectMap implementation +d5ab877 src/: Add namespace and pool fields to hobject_t +ec689e3 rgw: replace 'should_log' with 'enable_ops_log' +8e41ac1 mon: clear osd_stat on osd creation/destruction +fb6ea82 doc: Added S3 examples to the toctree. +62fe9f4 doc: adding code samples for S3 API usage (thanks, DH!) +644a615 Makefile.am: explicitly mention that -Wl,--as-needed is location-sensitive. +e83a84c doc: Added ${lsb_release -sc} based on Sam's feedback. +fc1f9e0 rgw: shutdown init_timer +5087997 rgw: try to create fcgi socket through open() first +000f9d3 msg: make clear_pipe work only on a given Pipe, rather than the current one. +dde85a2 CrushTester: allow build without boost stuff for chi^2 testing +11b24f7 crush: simiulate using rng; use chi-squared to measure result +aeb3a8f crush: check_item_present +4061ae2 ceph_argparse: with_float +a1c5ef0 admin_socket: only init if path is defined +3764ca6 upstart: simplify start; allow group stop via an abstract job +c48de3a paxos: warn on extreme clock skew +576dff8 omapbench: fix warning +ab5139b omapbench: fix misc warnings +6f3e7a8 ReplicatedPG: fix pgls listing, add max listing size +d8e07a3 objecter: fix pgls +b9ef314 mon: fix slurp latest race +f871d83 Makefile: include ceph-mds upstart bits in dist tarball +7a4e923 test/: Added object map benchmarking tool +e0f1952 doc: fix autobuild debian source line +97d4396 mon: throttle client msgr memory +7e3d90a Objecter: tone down linger op messages on tick +4a7683c test_stress_watch: exercise watch/unwatch/close from second client +95e0a88 qa: stress_watch.sh workunit runs test_stress_watch +fb7ce59 doc: Added preliminary rbd and ko info. +10b0db3 osd: Adding const to methods in OSDMap +8609caf vstart.sh: initialize keyring even if not using cephx +594f2bb perf_counters: use bufferlist instead of vector +ea1c069 mon: fix admin socket lock dependency +fa2f1de admin_socket: fix unit test +51de7c1 osd: ack pending notify when unwatching +5adc85b admin_socket: pass args separately +895e24d admin_socket: streamline 'version' commands +ca8f3ba admin_socket: streamline command set +e30e937 admin_socket: register command prefixes +c80bd9d librbd: Simplify timing init +04e66b4 librbd: Add latency (elapsed-time) stats for rbd operations +767664d rgw: put_bucket_info does not override attrs +d8df1e9 rgw: return default policy if policy attr is broken +a24145f log: add missing .cc file +52187c3 log: uninline SubsystemMap mutators +a6f8fe3 filestore: fix my broken ifdef flow +188d171 doc: ceph.conf cleanup for cephx authentication. +695f92d doc: fix broken link. +d05d98c doc: Added -a to service ceph stop. +cb5c6b5 doc: Consolidated mkcephfs deployment files. +dd1d388 osd: fix null dereference +a3f4d59 doc: Added pools and authentication. +a167213 mon: fix reweight_by_utilization waiting +519fadb osd: fix rewewight_by_utilization +07498d6 filestore: log about syncfs(2) etc support +6dd93b9 doc: Updated authentication with header canonicalization. +26ecf60 workloadgen: Fix the statistics output and a bug triggered by coll destruction +f685f4d filestore: initialize dummy xattr buffer +5842dcd osd: fix misdirected op check +504c6ce doc: Add Paxos call chain to doc/mon/ +05469b2 mon: add some info on can_mark_out function +15a30d9 mon: Do some aesthetic reformatting on the Elector class. +8c95e8b mon: add doxygen-format comments to the Elector class. +1816856 mon: Do some aesthetic reformatting on the Paxos class. +28a64fd mon: add doxygen-format comments to the Monitor class. +c5015ef mon: add doxygen-format comments to the PaxosService class. +7064a9c mon: add doxygen-format comments to the Paxos class. +b46b815 test_filestore_workloadgen: less noise +92fec42 test_filestore_workloadgen: write zeros, not random bytes +bb0c7c6 admin_socket: fix unittest +29e6f8c log: add log flush, dump_recent, reopen admin socket commands +4e2846b config: add 'set_config ' admin socket command +6849f82 rados.cc: added listomap and getomap commands +a3f8137 config: add 'show_config' admin socket command +ab8f6b1 admin_socket: initialize explicitly on startup; disallow changes +f953c4c librados.h: update rados_object_list_next documentation for key/locator +1277a46 cephcontext: generalize admin socket hook +73e29b6 doc: needed carriage returns between headings, code tag and syntax. +d33f4fb doc: removed redundant install. +68874af doc: Filled in descriptions for object operations. +e868b44 ceph.spec.in: buildrequires libuuid-devel +5eda9b7 ceph.spec.in: drop unnecessary rmdirs +6601ef9 doc: Restored install for dev/unstable packages. +ba54062 filestore: make SNAP_DESTROY ioctl check more informative +07c9eda filestore: fix btrfs subvol ioctl tests +bea1e03 filestore: verify that op_seq is nonzero +18b0d65 vstart.sh: wipe out btrfs subvols in osd dirs +0f38d75 filestore: fix initial btrfs snap creation (on mkfs) +3ae84ee rgw: replace dump_format() with dump_int() +9a9418e librados, ObjectCacher: include limits.h for INT_MAX +8c1c882 rbd.py: Fix seemingly-random segfaults +2f963fa librados: Remove errant sha1 +6e46de3 rbd.py doc: Fix markup on :class: references +7805978 filestore: make read_fsid() out arg be a pointer +386139b filestore: more informative fsid mkfs debug output +c96aa62 osd: verify fsid whoami to match on repeat mkfs +5bf5e91 osd: require cluster fsid for mkfs +a980d01 osd: do not clobber existing key with --mkkey +c18e4d8 filestore: mkfs: do not clobber exisiting journal if it has matching fsid +a074d0b filejournal: add check() method +c498827 filestore: drop useless mkjournal error check +b04b73d filestore: mkfs: less noise about leveldb creation +598dea1 filestore: mkfs: only create snap_0 if we created current_op_seq +ec7bf56 filestore: fix misplaced #endif +09192d6 doc/api/s3/bucketops.rst Corrected heading. doc/install/chef.rst Added Sam's edits to the Chef install. +bf2028f rgw: replace all bad use of formatter->dump_format() +3956cb8 doc/api/s3 <-chipping away at objectops and clean up. Added Copy Object. doc/source <-fixed a typo, updates for installing on precise, rm $ from cmds doc/start <-replaced clone link with tarball link. Link to Ceph Source Code. +36951d6 mon: use temp access_{r,all,cmd} variables to simplify the checks +f1e4d44 upstart: support mds +176a14a debian, upstart, osd: osd disk preparation and activation scripts +18af813 mon: drop redundant get_allow_all() cap check +1870e12 msgr: add mistakenly-removed msgr->lock.Lock() back in +475e07a debian: Create placeholder dirs for mon and osd data directories. +ab04d95 monmap: return ENOENT from build_from_host_list when no mons +80c6278 monmap: ignore conf mon entries when -m is specified +8bf9fde (tag: v0.47.2) v0.47.2 +26843ad Makefile: do not install librgw.h +a330c64 Update ceph.spec for ceph-0.47 +244992d libs3: remove make install target +cf6db40 Makefile.am: only append libs3 to SUBDIRS when needed +f461e13 monclient: sanity check on monmap size +d173c7b monmap: avoid dup addrs in generated initial monmap +75e9c0c monmap: aseert addrs are unique on add(), calc_ranks() +c31ab04 doc: librados: fix getxattr return code +311a23c mon: restrict mon 'join' message/command +e895d61 mon: apply 'r' and 'w' caps to mon and pg commands +fb6ed15 mon: apply 'r' and 'w' caps to mdsmap +c1c93e5 mon: apply 'r' and 'w' caps to osdmap +880e86b mon: allow health, status, log, etc. messages with 'r' cap +b7f2791 mon: fix error messages +def15d7 mon: push down 'auth ...' command auth checks +7d0552a mon: push down command auth checks to each command +c43c774 mon: require admin privs to issue any monitor commands +2dec922 vstart.sh: set HOSTNAME when -l is used +8701439 mon: fix 'get-or-create-key' +b01dbcd filestore: leave existing current/ +b7a85a8 filestore: create but do not clobber current/commit_op_seq +79d6077 filestore: mkfs: only (re)set fsid if not already set +d923e33 filestore: pass target into read_fsid() +36503d1 filestore: mkfs: rename buf -> fsid_fn +143762f filestore: always open/verify basedir; clean up error messages +58d8faf filestore: do not wipe on mkfs +05db988 filestore: remove unused 'filestore dev' option +17c4624 osd: only (re)write_meta files if old content is incorrect +53b05d5 osd: only create superblock if not present +ff64818 doc/config-cluster/chef.rst <-fixed an error in upload command. doc/config-cluster/deploying-ceph-conf.rst <-added sudo. required. doc/config-cluster/deploying-ceph-with-mkcephfs.rst <-cd to /etc/ceph so keyring goes there. doc/install/chef.rst <-added update and install opscode-keyring, and upgrade. doc/install/debian.rst <-added ceph-common to the install +5326937 config: add --show-args option +1103079 objectcacher: fix infinite loop in flusher_entry +b0d6895 doc/config-cluster/ceph-conf.rst <-Fixed some formatting issues. doc/config-cluster/deploying-ceph-conf.rst <-minor edit. doc/start/get-involved-in-the-ceph-community.rst <-removed $ from command line instruction. doc/start/quick-start.rst <-added additional steps. +d7a8084 monmap: calc_ranks() on rename() +cfe261b crush: check reweight return value +5959ea7 doc: fix broken link in FAQ +cf58486 doc: added links from the chef install doc to the chef config doc and back +6149fb7 doc: Added a FAQ page. +828f619 msgr: pass a Connection instead of a Pipe through submit_message. +e3b3108 Added the Swift API as is. Still needs a lot of work. +de7fb97 obj_bencher: add --show-time option for dumping time +d93410c doc: document range of methods for cluster creation, expansion +c9e9896 obj_bencher: adding stddev to bandwidth and latency +812989b doc: misc updates +bc9e592 obj_bencher: add min/max bandwidth +133cd69 mon: fix 'no initial monitors' warning +3a2dc96 libs3: remove make install target +f5a9404 (tag: v0.47.1) v0.47.1 +4e3807b Makefile.am: only append libs3 to SUBDIRS when needed +13b350a filestore: test xattrs on temporary file +6c0a122 ceph-object-corpus: add some old v2 monmaps +c06fb20 monmap: fix decoding of old monmaps +a4d034d qa: fix mon single_host_multi.sh test +731effb mon: rename ourselves if our name does not match committed monmap +cd9d862 mon: only rename peers in seed monmap +e1564af mon: move election msg check into elector +ee13867 mon: allow mons to rename themselves with the join message +b4d2b1e monmap: fix rename +29a158a mon: drop useless rank racalc in init +dae2f53 mon: fix leak of MonMap +7b2614b monmap: filter_initial_members -> set_initial_members +13c86ca Update leveldb to remove CompactionInputErrorParanoid +7d5fa4e man: Remove leftover --bin from ceph-authtool(8). +ad663d5 (tag: v0.47) v0.47 +e2e7f58 keys: new release key +5d2ec1d builder: make reweight helpers static, void +63580a9 formatter: replace malloc with new +7eb29ae check malloc return values +c7daf7a crush: check malloc results +5b39ae7 osdmap: set name_pool correctly in build_simple*() +033be2b osdmap: use pg[p]_num accessors +deccc59 filestore: do not test xattrs on fsid file +bd5fc0a debian: fix ceph-kdump-copy.init +31102d3 debian: fix ceph-kdump-copy.init +3f38605 filestore: test xattrs on temporary file +34e8169 monmaptool: fix clitests +1314a00 filestore: do not test xattrs on fsid file +44fe8c8 osdmap: set name_pool correctly in build_simple*() +ba2488f osdmap: use pg[p]_num accessors +69e823e cephtool: restore osdmap handler +360930a qa: use full paths for mon bootstrap tests +3f637b8 mon: show quorum names in health warning +ece33e5 monmaptool: add --generate, --filter-initial options +1473ef4 monmap: move build_initial() from MonClient +a68c224 mon: move initial_members filtering into MonMap method +3c77192 mon: always mark seed/mkfs monmap as epoch 0 +777b739 qa: add mon test for seeding bootstrap mon peers via admin socket +3920ce3 mon: add -or- update blank mon addr with join command +434c158 mon: send join message if we are in monmap with blank addr +6551298 mon: simplify/clean up dummy addrs used for initial members +dfac925 mon: learn peer addrs when probing +a5eba52 mon: set our addr when populating monmap with initial members +fc447bd mon: add peers probing us to extra peer list +b5bec55 mon: 'add_bootstrap_peer_hint ' via admin socket +824122d mon: all starting with empty monmap +aa1ee9b cephtool: multiword admin socket commands +359fc7b admin_socket: match first word against command +262d5e2 monmap: move monmap generation from ip/host list into MonMap +b67bc0b mon: drop mon_initial_hosts +59ccf9c mon: clean up initial_members code slightly +0b74b8f qa: add a bunch of mon bootstrap tests +cba3ca7 mon: ignore election messages from outside monmap +6c8214f mon: include quorum member names in 'mon stat' +dc9122c mon: limit initial quorum to mon_initial_members +585adcf mon: only include monmap mon's in outside_quorum, new quorum +e1d34cc mon: add set of additional peers to probe +c7ba9fe mon: use current monmap for initial quorum +0088699 mon: take probed peer's monmap if it has ever joined a quorum +c52a4f7 monmaptool: don't increment epoch on modification +5b18665 mon: pass has_ever_joined in probe messages +e52093c mon: clean up "joined" flag +e197e79d mon: add initial quorum config options +7e6be86 mon: discover peer names during probe +52c2845 monclient: name resolved mon hosts noname-* too +2b5ee3e mon: include health in status +7d6facc mon: move health check into helper function +d599ede mon: fix a bug that was preventing us from subscribing to some log levels. +20df432 mon: fix the priority filter. +9fb3cd2 ceph-authtool: fix clitests +4832c46 ceph-authtool: fix usage +ca987d3 msgr: If the Connection has a bad Pipe*, replace it with a good one. +9125e90 mon: monmap first from 'status' command +9a1d757 mon: only log map state changes from primary +78d0d09 cephtool: aesthetic change to ceph -w output +13a9a15 mon: aesthetic changes to map change log entries +6b76ac3 Makefile: drop MMonObserve* +8931656 remove gceph +a586bdf ceph.spec: don't package gceph +f943f34 debian: don't package gceph +035bb12 src: get rid of the Observers throughout the code base. +8413724 cephtool: Slight rework and pub/sub log support. +6fe96cb mon: Add publish/subscribe capabilities to the log monitor and status cmd. +572c756 doc: fix sizes in librbd python examples +e721271 doc: fix link to hardware recommendations section +25e7889 doc: fix formatting and a couple config defaults +62db60b FileJournal: Clarify log message on journal too small. +96426fa ReplicatedPG: fill in data_off in OSDOpReply +1ec3245 config: improve comments for rbd caching options +49c6ad4 librbd: check for cache flush errors +5e3bc57 init-radosgw: skip sections without host= line +eaea7aa keyring: drop binary encoder +ec73281 keyring: always encode in plaintext +6d4e79a mon: make 'auth get-key ' return key +86f2486 mon: 'auth list' is a read-only operation +c9b220f mon: 'auth get-or-create-key name capsys capval capsys2 capval2 ...' +66e2737 auth: EntityName ==, != operators +d079018 mon: make 'auth get ' dump plaintext keyring +2886358 init-ceph: ignore sections without 'host' defined +23deb43 ObjectCacher: handle write errors +59c6816 ObjectCacher: propagate read errors to the caller +24fddf2 ceph-dencoder: add AuthMonitor::Incremental +7f14854 mon: use new encoder macros for AuthMonitor::Incremantal +7aaccac features: explicitly use CEPH_FEATURES_ALL instead of -1 +5156495 mon: fix mon removal check +0f7bf5f rbd: allow importing from stdin +48d97fe doc: add ioctx parameter to rbd pybind examples. +1109c13 librados: avoid overflow in the return value of reads +2f1f808 ObjectCacher: only perfcount reads requested by the client +4bc63ce msgr: look for a pre-existing Pipe if the Connection doesn't have one. +1c53f34 osd: include age in 'slow request' messages +2b44662 workloadgen: Add transaction throughput infos. +3d2d0ec Additional documentation theme changes: +067cd5f monmap: new encoder +31cb3aa mon: conditonally encode monmap for peer mon during probe +a9f5d77 monmap: use feature bits and single encode() method +31dc394 mon: new encoding for MonCaps +d734381 Objecter: don't throttle resent linger ops +ac85b9e objecter: ping connections with lingering ops every tick() +7830f85 mon: use external keyring for mon->mon auth +7be7810 mon: keep mon. secret in an external keyring +784d1d3 Documentation theme updates: +ab717bc Updated link to publications +5922e2c crush: pass weight vector size to map function +376f0d5 crush: adjust max_devices appropriately in insert_item() +320d1eb mon: fail 'osd crush set ...' is osd doesn't exist +f2380f4 cephfs: pass -1 for old preferred_osd field +bb74b8b osdmap: filter out nonexistent osds from map +80bbe5e keyring: make child of KeyStore +7ce157d utime_t: no double ctor +90fb403 objectcacher: make *_max_dirty_age tunables; pass to ctor +82a3600 librbd: set cache defaults to 32/24/16 mb +d96bf6c test_filestore_workloadgen: name the Mutex variable +8bacc51 workloadgen: time tracking using ceph's utime_t's instead of timevals. +772276c workloadgen: forcing the user to specify a data and journal. +f2a2a6e workloadgen: add option to specify the max number of in-flight txs. +662729f workloadgen: Allow finer control over what the generator does. +6c2c883 libs3: trailing / does strange things to EXTRA_DIST +e20fbac Makefile: drop librgw.so unittests +99ee622 ceph.spec: kill librgw +caab859 debian: kill librgw.so +17114f2 osd: reset last_peering_interval on replica activate +f4befb3 libs3: dist and distdir make targets +a46cc71 Makefile: include libs3/ contents in dist tarball +e2ee197 Makefile: osdc/Journaler is only used by the mds +2e7251e Makefile: librgw.la -> librgw.a; and use it +aa782b4 Makefile: libos.la -> libos.a +938f4ac Makefile: libosd.la -> libosd.a +d96e084 Makefile: libmon.la -> libmon.a +7dbcc1c libs3: added 'make check' target +827d222 debian: build-depend on libxml2-dev +3851423 objectcacher: make cache sizes explicit +b5e9995 objectcacher: delete unused onfinish from flush_set +6f3221a objectcacher: explicit write-thru mode +c19f998 common: add C_Cond +38edd3b objectcacher: user helper to get starting point in buffer map +c8bd471 objectcacher: flush range, set +b50a4c9 mon: add safety checks for 'mds rm ' command +a50fbd5 mon: move PGMap[::Incremental] to new encode/decode macros +8ec476e osd: do not mark pg clean until active is durable +86aa07d osd: check against last_peering_reset in _activate_committed +9d7ec04 osd: tweak slow request warnings +a4b42fc keyring: clean up error output +ae0ca7b keyring: catch key decode errors +6812309 debian: depend on uuid-runtime +3509b03 safe_io: int -> ssize_t +203a7d6 objectcacher: wait directly from writex() +991c93e mon: fix call to get_uuid() on non-existant osd +150adcc debian: add rules for rest-bench +53f642e rest-bench: build conditionally +f60444f obj_bencher: changed interface +d54ef1c rest-bench: change thread context for libs3 calls +6832231 rest-bench: change command line arg for seconds +9979132 obj_bencher: fix data encoding +76a5c89 obj_bencher: use better round robin for completion slot scan +e2eb825 rest-bench: reuse libs3 handle +e62fd7f obj_bencher: fix param order +7e96a4a rest-bench: use refcount for req_state life cycle +072c316 rest-bench: multiple fixes +4fe068e rest-bench: cleanups, initialization +6e04380 rest-bench: create workqueue for requests dispatching +13296a5 rest_bench: cleanups, implement get and put +54da3e6 rest_bench: some more implementation +e6026fe rest_bench: initial work +f9d9fb6 rados_bencher: abstract away rados specific operations +0fbc3c5 rados_bencher -> obj_bencher +1a8eea8 rados_bencher: fix build +a17124e rados_bencher: restructure code, create RadosBencher class +ddb858c rados_bencher: restructure code (initial work) +3e260ae librados: call safe callback on read operation +edd73e2 crush: note that tree bucket size is tree size, not item count +ce60e1b OpRequest: ignore all ops while the oldest one is still young. +f3043fe objectcacher: don't wait for write waiters; wait after dirtying +f3760da crush: update_item() should pass an error back to the caller +e0a636f crush: improve docs/comments for check_item_loc and insert_item semantics +878423f crush: comment and clean up checks for check_item_loc and insert_item +2629474 global_init: do not count threads before daemonize() +72538c0 Makefile: fix $shell_scripts substution +16461ac mon: simplify 'osd create ' command +42f2d2f crushtool: another simple test for update +9772d13 crush: document return values +1cd6f76 crush: compare fixed-point weights in update_item +c03b852 thread: remove get_num_threads() static +e50932c global_init: do not count threads before daemonize() +684558a crush: clean up check_item_loc() comments +27d98d2 OpRequest: only show a small set of the oldest messages, instead of all. +3228643 rgw: update cache interface for put_obj_meta +b5a18ad doc: fix some underscores +5125daa osd: drop unused CEPH_OSDMAP*VERSION* #defines +f15c0bb Fixed link to blog. +b2100ca Fixed another link to the blog. +5ac8b58 Fixed link. +7eca0dd Clean up. Changed ceph.newdream.net to ceph.com. Removed {ARCH} references. Added link to Source. +91c30b3 doc: more fonts +cabe74b doc: new theme +54991ff doc/install/debian: simplify more +c3dc54b doc/install: reorg, simplify +dc894ee doc: clarify path names for mkcephfs +bd8577d doc: simplify quick start +5465e81 doc: Whitespace cleanup. +93dcc98 doc: Rename to use dashes not underscores in URLs. +715a69c doc: Remove leading whitespace, that syntax means it's a definition list. +3226722 Updated URLs for the new ceph.com site. +be855d8 objecter: ping connections with lingering ops every tick() +d49c3d2 Removed "Ceph Development Status" per Bryan Modified title syntax per Tommi Modified paragraph width to 80-chars per Dan Moved "Build from Source" out of Install Renamed create_cluster to config-cluster Added config-ref with configuration reference tables Added a toc ref for man/1/obsync per Dan Removed redundant sections from Ops Deleted "Why use Ceph" and "Introduction to Storage Clusters" +d14b016 config: $cluster-whatever for admin_socket, log files +ad0330b config: Admin socket path had literal "name" in it instead of $name. +461e62f config: Admin socket path had literal "name" in it instead of $name. +28b1fc8 mon: make 'osd map ' return pg and osd mapping +4dab4ac ceph-object-corpus: a few instances of the newly encoded types +7284637 ceph-dencoder: ignore trailing goop after OSDMap and OSDMap::Incremental +69dcd28 mon: drop 'osd crush add ...' +33e3547 vstart.sh: use 'osd crush set ...' +79edba2 mon: 'osd crush set ...' do an add or update +ee00095 crushtool: extent cli test to include --remove-item and --update-item +ce5842b crushtool: add --update-item command +5aadb57 crush: do some docs +8220ab2 crush: implement update_item() +bfa7635 crush: add check_item_loc +eca7eac crush: fix weights when removing items +76d166f rbd.py: add new error for deleting an image with snapshots +e20cd4b config: no -C shorthand for --cluster +ec99775 Edits. +0fb0ef9 Corrections. +ee44db4 Significant updates to introduction, getting packages, building from source, installing packages, and creating a cluster. +4cd44ec doc: document NOIN, NOOUT, NOUP, NODOWN flags and flapping +7d501fc Removed this. As part of restructuring of install to include admin host. +f53c820 Minor edits. Still WIP. +33dc4c2 The new files contain S3 APIs and a build from source doc. +9b48757 Minor cleanup. +f8b00f3 Added a new landing page graphic, and made some minor edits on the landing page. +d7922e0 Removed some files for reorg. +9f9b7f8 Added a plug for commercial support. ;) +859da18 Building out information architecture. Modified getting involved, why use ceph, etc. +bc857d8 Remove reference to Introduction to RADOS OSDs +b0ee6e8 Added introduction to clustered storage and deleted older files that have been moved. +541a875 Restructuring documentation. +a1b31dd Initial cut of introduction, getting started, and installing. More to do on installation. RADOS gateway to follow. +31fb8f9 Put change to rbd manpage in .rst instead, update man/ from output +d3a2c56 doc: move documentation build instructions to doc/dev section +ee26c5d Treat rename across pools as an error Fixes: #2370 Reviewed-by: Samuel Just +2a93258 doc: add warning about multiple monitors on one machine. +b41f4d1 rgw: normalize bucket/obj before updating cache +695d377 vstart.sh: explicitly specify uuids during startup +09e0828 osd: --get-{osd,journal}-uuid synonyms for --get-{osd,journal}-fsid +5a2fe97 osd: allow uuid to be fed to mkfs with 'osd uuid' setting +8ec3920 filestore: allow fsid to be fed in for mkfs +779914b mon: 'osd create ' +78b9ccd mon: fill in osd uuid in map on boot +ca4311e osdmap: store a uuid for each osd +c3fb68e osd: make output less ugly +4d095e9 osd: create a 'ready' file on mkfs completion +29399ee osd: use fsync+rename when writing meta files (during mkfs) +bb7e5da PG: Add probe set to HB peers during GetInfo +b9a54b4 PG: check_new_interval now handles adding new maps to past intervals +06fd0b6 filestore: allow flusher+sync_flush enable/disable via injectargs +342e76f filestore: fix op_queue_{len,bytes} instrumentation +274cd0c throttle: count get_or_fail success/failure explicitly +81f51d2 osd: pg creation calc_priors_during() should count primary as up +75a107c throttle: note current value and max in perfcounters +1acdc57 .gitignore: ceph-kdump-copy +18790b1 osd: add is_unmanaged_snaps_mode() to pg_pool_t; use more consistently +22bd5df pick_address: don't bother checking struct ifaddrs which have a null ifa_addr +292ff7f msgr: include msgr name in dispatch_throttler name +be6a9a6 msgr: name messengers +36ac452 throttle: report stats via perfcounter +ccfb6b3 global_init: don't fail out if there is no default config. +845718d global: fix incorrect CINIT flag. +f3771b0 throttle: feed cct, name, and add logging +7413828 osdmap: do no dereference NULL entity_addr_t pointer in addr accessors +4c597fa OSD: add different config options for map bl caches +cefaa7d mon: fix nion -> noin typo +cb7f1c9 (tag: v0.46) v0.46 +88dda3b librbd: use unique error code for image removal failures +580b520 run_xfstests.sh: drop #62 +4465c3a osdmap: fix identify_osd() and find_osd_on_ip() +d64e1b9 osd: keep pgs locked during handle_osd_map dance +4ae857c mon: drop obsolete osd/PG.h #includes +d48549d osd: set dirty flags on rewind_divergent_log +f750c3f osd: use dirty flags in activate(), merge_log() +36b0257 osd: fix nested transaction in all_activated_and_committed() +3e84ce8 osd: use PG::write_if_dirty() helper +fc8ce16 osd: do not merge history on query +ff9bce9 osd: dirty_info if history.merge updated anything +a13672f osd: write dirty info on handle info, notify, log +7fd3360 osd: skip scrub scheduling if we aren't up +0c860c1 osd: fix dirty_info check for advance/activate paths +36bfdd8 crushtool: fix clitest now that --force is gone +8af46a4 run_seed_to.sh: clean out merge cruft +ebdf80e crush: remove parent maps +ed974b5 crush: remove forcefeed from crush_do_rule +c4c59a0 log: do not set on_exit() callback for libraries +254644a osd: always share past_intervals +352247e fix file_layout.sh layouts test +e205e11 mon: 'osd [un]set noin' +c971545 osd: set dirty_info in generate_past_intervals +944a431 osd: fill in past intervals during advance_map +0c65ac6 osd: drop useless PG::fulfill_info() +7e8ab0f osd: share past intervals with notifies +0c69140 osd: only generate missing intervals in generate_past_intervals +db8e20b osd: include past_intervals in pg debug printout +12d1675 osd: fix check for whether to recalculate past_intervals +90dae62 osd: PG::Interval -> pg_interval_t +f922dc4 Stop rebuild of libcommon.la on "make dist" +e44b126 mon: limit size of MOSDMap message sent as reply +d1df320 ceph-object-corpus: revert rewind +4274fd0 osdmap: fix addr dedup check +06d1bc2 osd: fix bad map debug messages +a477d6b Stop rebuild of libcommon.la on "make dist" +510eed0 filestore: fix error message +f03dc34 filestore: first lock osd mount point, next detect fs type +10c616a OSD: use map bl cache pinning during handle_osd_map +d0d6912 simple_cache.hpp: add pinning +92becb6 FileJournal: simply flush by waiting for completions to empty +155700d PG: in GetInfo Notify handler, fix peer_info_requested filter +dbd9912 librados: test get/set of debug levels +4e2e879 config: allow {get,set}_val on subsystem debug levels +7f3790a OSD.cc: track osdmap refs using an LRU +ec1ea6a common/: added templated simple lru implementations +873e9be osdmap: dedup pg_temp +ed1024f osdmap: use shared_ptr<> for pg_temp +207eec6 osd: make map dedup optional +0188d9b osd: dedup osdmaps when added to the in-memory cache +4cfbd81 osdmap: drop obsolete PG_ROLE_* constants +2a46564 buffer: make contents_equal() more efficient +36d4382 osdmap: dedup crush map +98b1d8f osdmap: use shared_ptr for CrushWrapper +e0436cb osdmaptool: kludge to load a range of maps into memory +d6359d4 osdmap: dedup addrs and addr vectors between maps +ee541c0 osdmap: filter out nonexistent osds from map +8f4dba6 librbd: the length argument of aio_discard should be uint64_t +fe76c5b filestore: interprect any fiemap error as EOPNOTSUPP +313c156 osdmap: use shared_ptr for addrs, addr vectors +06af38a osdmap: uninline a bunch of stuff +10914ca mon: consider pending_inc in {up,in}_ratio for can_mark_{out,down}() +2a22ff4 mon: thrash pg_temp mapping, too +6910d83 filestore: fix a journal replay issue with collection_add() +96108c6 filestore: fix a journal replay issue with collection_add() +ead5d2a osd: filter osds removed from probe set from peer_info_requested +3e88017 PG: get_infos() should not post GotInfo +7fe45fd Revert "PG: whitelist MNotifyRec in started" +cbe795a test_librbd: rollback when mapped to a snapshot should fail +f873a77 workload_generator: get rid of our lock. +436f5d6 TestFileStoreState: make 'm_in_flight' var an atomic_t. +9579365 PG: whitelist MNotifyRec in started +be9b38e RefCountedObject: fix constructor warning +35dc2de workload_generator: specify number of ops to run, or 0 to run forever. +823afcd workload_generator: Delegate store tracking to TestFileStoreState. +3903b5a TestFileStoreState: Fix issues affecting proper behavior when inherited. +22ade4a Makefile.am: test_filestore_workloadgen doesn't need gtests lib. +39f9935 RefCountedObject: relocate from msg/Message.h to common/RefCountedObj.h +70f70d8 librados: call notification under different thread context +8bc818c mon: 'osd thrash ' +fa98479 osd: filter osds removed from probe set from peer_info_requested +f022a94 mon: add 'mon osd min up ratio' and 'mon osd min in ratio' +ba1d3b1 mon: use can_mark_*() helpers +75ccd81 DeterministicOpSequence: add 'ceph_asserts()' where we expect != NULL. +1966402 TestFileStoreState: distinguish between 'get_coll()' and 'get_coll_at()' +44dafc8 run_seed_to.sh: Add valgrind support. +4430c01 TestFileStoreState: free memory on terminus. +4bfcbe6 mon: decode old PGMap Incrementals differently from new ones +59957da mon: do not mark osds out if NOOUT flag is set +2673875 mon: do not mark booting osds in if NOIN flag is set +9ff535a mon: always remove booting osds from down_pending_out +addfb2c mon: prevent osd mark-down with NODOWN flag +f077386 osd: do not attempt to boot if NOUP +d84255e mon: prevent osd from booting if NOUP +d3f55dd mon: 'osd {set,unset} {noin,noout,noup,nodown}' +6003325 osdmap: add NOUP, NODOWN, NOIN, NOOUT flags +e51772c librbd: pass errors removing head back to user +ccf7d93 mon: clean up handle_osd_timeouts a bit +36ffed4 mon: fix pg stats timeout +7b832f4 mon: fix whitespace +2b30201 mon: fix pgmonitor ratio commands +d28f850 test_rbd: add tests for snap_set and more complicated resizing +7add136 librbd: reset needs_refresh flag before re-reading header +3ef3ab8 librbd: clean up snapshot handling a bit +e17b5a8 librbd: clarify handle_sparse_read condition +2bdaba4 run_seed_to.sh: rework the script, make it more flexible and broaden the tests. +e65b797 librbd: rev version for discard addition +19ba347 osdmaptool: fix clitests for lack of localized pgs +637de4d mon: load CompatSet features on startup +771fd05 mon: set auid for mon-created pools to 0 +a514344 mon: ignore/remove localized pgs +f01b6dd test_ioctls: remove preferred osd +b3cdc21 cephfs: remove preferred osd setting +198544a mds: remove preferred from ceph_file_layout +21ef979 client: rip out preferred_pg thing +6d1344c libcephfs: disable ceph_set_default_preferred_pg +f164b87 osdmap: do not forcefeed preferred osd to crush +b8f4acf osd: remove preferred from object_locator_t +0138a76 osd: ignore localized pgs +94adf5d osd: remove localized pgs from pg_pool_t +43d1a92 run_seed_to.sh: remove stray arg +0112e74 run_seed_to.sh: rework the script, make it more flexible and broaden the tests. +e9ecd1b perfcounters: tolerate multiple loggers with the same name +97f507f Makefile: disable format-security warning +c8377e4 filestore: verify that fiemap works +7471a9b rados: fix error printout for mapext +07ddff4 librbd: instrument with perfcounters +fb9fdf4 librbd: fix ictx_check pointer weirdness by using std::string +888a082 FileJournal: don't wait flusher until completions are queued +d1740bd filestore: fix collection_add journal replay problem +92b299a FileStoreDiff: flip sense of diff*() methods around +ca369c9 test_idempotent_sequence: Use FileStoreDiff class instead. +5466ebc test_idempotent_sequence: Output missing options on "usage". +4746129 FileStoreDiff: check if two FileStores match. +4ddbbf5 librbd: allow image resize to non-block boundaries +165038d objectcacher: rename truncate_set -> discard_set, and use discard +7232396 objectcacher: implement Object::discard() +5b60343 librbd: fix debug output +81af4e8 librbd: make discard invalidate the range in cache +b94d6a6 librbd: fix zeroing of trailing bits on short reads that span objects +379c5e7 librbd: fix debug output for image resize +dd78c3d test_librbd_fsx: port newer xfsprogs version +e861e20 revert to xfstests' fsx, which has discard support +a8aaa93 admin_socket: add a separate debug subsys/level +f7699cc log: prefix dump with line numbers +a68b306 test_filestore_workloadgen: track pg log size in memory +6b28f55 test_filestore_workloadgen: whitespace +2834f60 organize test_filestore_idempotent* +8bb58bc remove hopelessly flawed test_filestore_idempotent +94ebe8d test_store -> test_filestore +77c645a test_wrkldgen -> test_filestore_workloadgen +27efa05 msgr: move locking out of submit_message to its callers +5a8019e msgr: remove useless block addition. +f00dab6 ceph-authtool: rename cli test dir +613d817 ceph-conf: rename cli test dir +ac874a6 OpRequest: mark_event output is now at debug 5 +f2d4574 config: dump subsys log levels with --show-config +607a8a3 osd: do not create localized pgs +8335eb5 rgw: can't remove user that owns data +9df7f6f msgr: merge the send_message and lazy_send_message implementations. +a394fb2 msgr: do not establish a new Pipe for any server +42a49cf msgr: Create a proper Connection* lazy_send_message() +526cd9d msgr: merge submit_message() functions +56fc92c FileStore: don't read reference to writeq head after pop_write +758fa9b rgw: bucket HEAD operation should return 200, not 204 +9cb796a obsync: section 8 -> 1 +5c21f7e msgr: remove the Pipe::disposable flag. +c470e1a msgr: start moving functions around in Pipe +db6d467 msgr: fix some spacing issues in Pipe +fcc4481 msgr: minimally document the SimpleMessenger inner classes +d3e40e0 msgr: reorder the SimpleMessenger data members a little bit +501553e msgr: group private data members by type +146e1a4 msgr: make mark_down_on_empty() behave more consistently. +09100b6 rgw: HEAD bucket, don't dump rounded size +9c2251f osd: fix vector array out of bounds +e82c330 ceph-fuse: only call common_init_finish in child; fix admin socket +f1de0d6 qa: drop rgw.py from test_python.sh workunit +d3a57a2 ceph.spec.in: drop rgw.py +0995d08 Makefile: drop rgw.py +4390c08 mon: fix full/nearfull ratio initialization +7fbc0fc msgr: add error code returns to send_keepalive. +cb43eee msgr: add some validity checks to ~SimpleMessenger() +0c2c18c msgr: convert global_seq_lock to a spinlock. +dc4c759 msgr: convert get_policy() to return a const reference. +aab516d rgw: allow subuser creation on radosgw-admin user create +c9adf07 msgr: move SimpleMessenger function declarations into good order +dbe779a osd: dump old ops singly rather than all at once. +b0532aa osdmap: restructure flow in OSDMap::decode +bc458bf ceph-object-corpus: prune archive +ebb19e7 test/encoding/import.sh: fix +e1622e4 rgw: HEAD bucket also dumps bucket meta info +0769efa rgw: add x-rgw-* as a possible meta header prefix +c3bfe45 osdmap: remove bad cct reference +eea982e osdmap: workaround old bug that zeroed pool_max +ee22c97 python-ceph: remove rgw bindings +eb8a8fd pgmap: allow Incrementals to specify [near]full_ratios of 0 +88525ea pgmon: add "set_full_ratio x" and "set_nearfull_ratio x" commands +882bd5b pgmon: convert PGMonitor::prepare_command to our standard infrastructure. +1242b75 pgmon: remove the PGMonitor update_full_ratios stuff +f1152e6 mon: only fill in full/nearfull sets if the ratio > 0 +841f288 mon: unconditionally encode PGMap full ratios in the Incremental +5a6bbd0 rgw-admin: user create is idempotent +413d8be osdmap: dump pool_max +4627b67 msgr: Document remaining SimpleMessenger functions and data members +1f6b7f8 msgr: Group the SimpleMessenger functions following the Messenger's pattern +dcd34fc FileJournal: let peek_write return a reference +6561484 common: add blkdev.{h,cc} +82d7a68 rbd: fix probe of source when block device +41cb40a filestore: factor block device size probe out into helper +dea8536 FileJournal: clarify locking in header +377f75f OpRequest: mark_event output is now at debug 5 +98e2369 librados: add methods to check and wait for safe/complete -and- callback +001aa46 msgr: add a little detail to mark_down_on_empty() and mark_disposable() +a422c47 msgr: remove out-of-date comments and function +2eb2aa5 msgr: group functions more appropriately +0be9718 librbd: 'rbd cache enabled' -> 'rbd cache' +6cbda4c qa: comment out xfstest 232 +e0ec286 objecter: recalc pgid in case it wasn't a precalculated pgid +f22da6c cls_rgw: rgw_dir_suggest_changes move cur_disk_bl inside loop +31d0d1d librados: test get_pool_name +2dbea12 librados: C bindings for get_pool_name() +2f5af83 Filestore: fix guard errors in COLL_REMOVE and COLL_MOVE +6868ec6 rgw: skip empty entries when listing a bucket +f87a6a0 cls_rgw: rgw_dir_suggest_changes() don't try to decode cur_disk +73badda cls_rgw: don't zero out error code before reading value +20ab74e test_librbd: fix write sizes +81c8a7b test_idempotent_sequence: no config file +a40fe5b run_xfstests.sh: ensure cleanup on errors +3d187db run_xfstests.sh: pass test result via exit status +a4dd920 objclass: fix cls_cxx_map_remove_key() +b352a3e rgw: call dir_suggest_changes with correct bufferlist +a31392c objectcacher: name them +28e6181 librados: add IoCtx::get_pool_name() to c++ api +d80c126 ObjectCacher: use "objectcacher" instead of the CephContext::name for perfcounter init +f355875 ObjectCacher: group all the function definitions properly +6257a94 ObjectCacher: add a bunch of perfcounters +446b5e2 ObjectCacher: move functions out of the header. +72a7573 objectcacher: perf skeleton +2cc854f msgr: Document all the functions in the Messenger interface. +b8207dd msgr: remove several functions from the interface. +bf8847e qa: add run_xfsests.sh script +ee69f27 test/rbd/fsx: fix signed/unsigned warnings +812c7c7 librbd: implement discard +30805bf test_librbd_fsx: clean up properly +78d14da librbd: flush pending writes when a new snapshot is created +b26d702 test: port fsx to run on an rbd image instead of a file +5c2d5b1 test: copy fsx to rbd directory +9c8b3f7 .gitignore: clean up to not match so many things recursively +f464e6c ObjectCacher: include object when outputting a BufferHead +d9aa81b finisher: add indent settings header +55b6554 test_librbd: flush before opening another handle to the image +6cf2265 ObjectCacher: remove useless conditional +20be92e ObjectCacher: always delete callback in commit_set +ee9987b librados: debug logging for aio writes +7868dbe ObjectCacher: remove unused/unimplemented methods +1dd9c30 ObjectCacher: remove redundant 'public:' +7197825 Remove unused Completion.h header +d0b1f72 ObjectCacher: add some asserts about when the lock is held +68e2e00 librbd: flush cache before creating a snapshot +bb35ecf librbd: fix bytes read accounting in read_iterate +579d30b librbd: check for writes to snapshots +c007377 librbd: allow writeback caching +9546c15 librbd: remove writeback window +d6dbff0 ObjectCacher: remove dependency on Objecter +abbfd93 Filer: make file_to_extents static +cbbd5f9 ObjectCacher: check for read/write errors +34a10fa librados: do aio callbacks in async thread +a0fc333 librados: unconditonally associate IoCtxImpl with AioCompletionImpl +cc1ae67 filestore: flush log on failure injection +f052c82 run_seed_to: assume tool is in path, not cwd +4fc48e5 run_seed_to_range.sh: run filestore idempotent sequence tests over a range +a8b9b98 run_seed_to.sh: set -e +95bb423 filestore: use our assert +c772984 test_idempotent_sequence: simple test script +2cb0032 DeterministicOpSequence: writing to object being cloned in the same tx. +bb0499a test_idempotent_sequence: outputting collection being diff'ed. +21be4ad test_idempotent_sequence: Add more info on diff's dout's. +2d24eb3 FileStore: don't return ENOENT from object_map getters +56fb027 test_idempotent_sequence: make get-last-op return 0 if no txns applied +2d20b4c test_idempotent_sequence: return true from diff if different +08cf4d2 test_idempotent_sequence: include object name in diff output +a5f533a test_idempotent_sequence: fix diff return value, mount behavior +1b45129 test_idempotent_sequence: fix/enable do_coll_add +27cb82e test_idempotent_sequence: use get_obj_at() for clone source +794fc0b test_idempotent_sequence: fix collection_move arg order +84175c7 VerifyFileStore: delete from tree +4289911 Makefile: remove VerifyFileStore from test_idempotent_sequence build +2c940a4 test_idempotent_sequence: Remove references to VerifyFileStore +e270e0b test_idempotent_sequence: diff two stores. +5d30581 test_idempotent_sequence: add remove op +bec1e50 test_idempotent_sequence: remove existing target for collection_add +db3d14b test_idempotent_sequence: fewer objects per collection by default +51bc6df test_idempotent_sequence: make object names overlap +c056f60 test_idempotent_sequence: simplify clone +bc5dffe test_idempotent_sequence: replace on coll_move +a8c3205 test_idempotent_sequence: whitesepace +5786694 test_idempotent_sequence: implement get-last-op +795274b test_idempotent_sequence: include tx number in each transaction +9dba317 test_idempotent_sequence: require nonexistent filestore dir +5ced86b filestore: init filestore_kill_at in ctor +975e59a test_idempotent_sequence: Add commands and lose a couple of optional args. +a5a8395 filestore: name internally +01daa88 test_idempotent_sequence: no need to reinject value that is already there +4a6cfcb deterministicopseq: add collection_rename() support +dee47bb test_idempotent_sequence: Generate a reproducible sequence of txs. +6573690 VerifyFileStore: Check if two FileStore's match after applying a set of operations. +2f02a8a DeterministicOpSequence: Generate a reproducible sequence of operations. +8322755 TestFileStoreState: Represent a FileStore's state to be used by tests. +f400179 filestore: two-phase guard +dfcadc9 filestore: simple failure injections via --filestore-kill-at +583c79a filestore: fix collection_add argument names +8d3acb5 filestore: replay collection_move using add+remove +c6551fb test_rados.py: add basic tests for the Object class +7679968 rados.py: fix Object.read argument order +5ce8d71 FileJournal: allow write_thread and write_finisher to run in parallel +dc44950 filestore: implement collection_move() as add + remove +dc10d04 OSD: improve information and format of OSDTracker messages +3d11455 osdmaptool: fix clitest for lpg_num 0 +8a6c3c1 msgr: dispatcher: Documentation of security functions +9b2aff2 FileStore: don't return ENOENT from object_map getters +241c5e5 msgr: Reorder functions to reduce the number of privacy tags. +5cf7628 msgr: miscellaneous fixes. +8e5f562 DBObjectMap: check in clone and link that source is not destination +308c1fc filestore: use config observer to start/stop dumping/tracing +816a512 objectstore: tweak dump() a bit +7223f00 filestore: dump transactions sets, include seq and trans_num +ddbaf58 filestore: remove commented code, fix whitespace +9565a8b ObjectStore: Remove code duplication when dumping transactions. +6a7bbe8 filestore: dump transaction in json on error +6ee0b71 filejournal: dump injson +cfac4a9 pgmon: clear out osd reports after the OSD has gone down +119dd5a mkcephfs: update man page +4a4b799 ceph-authtool: update man page +ab08fb8 mkcephfs: note that btrfs (and --mkbtrfs) are optional and experimental +ee39291 ceph-authtool: add warning to man page +11b93d3 osd: disable localized pgs by default +8836b81 mon: alloc pgp_num adjustment up and down +58671a4 mon: command to disable localized pgs for a pool +83e1260 mon: set pgp_num == pg_num (by default) for new pools +7fdf25b debian: python-support -> dh_python2 +ed0653b COPYING: doc/ CC BY-SA +6e83e11 README: update +84efc55 debian: drop unnecessary conflicts on librgw +9678c09 init-radosgw: start in runlevel 4 +af50273 obsync: include man page in tarball, packages +838a761 ceph-rbdnamer: include in dist tarball and debs/rpms +292898a init-ceph: start at all runlevels +c3e4c5b filestore: cleanup: flip sense of replay guard check +85db25e filestore: fix fd leak on collection_rename +df4d7a4 filestore: fix collection_rename guard +4bd9d1b filestore: fix collection_add guard +be5b25b filestore: fix collection_move guard +43de5e4 FileStore: dumping transactions to a file +cd4a760 osd: fix heartbeat set_port() +1775301 osd: reenable clone on recovery +6fbac10 osd: allow users to specify the osd heartbeat server address. +4f030e1 osd_types: fix off by one error in is_temp +31f16a4 rgw: list multipart response fix +89fecda Makefile.am: remove some clutter +0aea1cb (tag: v0.45) v0.45 +d348e1a configure: --with-system-leveldb +34cc308 filestore: fix leveldb includes +0b2e1cd cephfs: fix uninit var warning +f79b95e Makefile: add missing .h to tarball +8d5c87a rgw: fix object name with slashes when vhost style bucket used +853b045 OSD: use per-pg temp collections, bug #2255 +bd518e9 encoding: fix iterator use for struct_len copy_in +36d42de buffer: allow advance() to move an iterator backward +dd8fd16 configure: HAVE_FALLOCATE -> CEPH_HAVE_FALLOCATE +8e1cc8a init-ceph: manage pid_file from init script +81d2cbe config: move /var/run and /var/log defaults to config_opts.h +dfa043d config: {osd,mon}_data default to /var/lib/ceph/$type/$cluster-$id +7680cda dencoder, rgw: make ceph-dencoder load much faster +9832696 encoding: use iterator to copy_in encoded length +689ac5d (tag: v0.44.2) v0.44.2 +e0c4db9 FileStore: do not check dbobjectmap without option set +38e24b1 config: include /etc/ceph/$cluster.keyring in keyring search path +57dff03 config: expand metavariables for --show-config, --show-config-value +cfee033 config: parse fsid uuid in config, not ceph_mon +2c14c8b config: add distinct UUID type +2c0dc47 global: add -C or --cluster early args to specify cluster name +930a669 config: add cluster name as metavariable; use for config locations +bda562f config: implement --show-config and --show-config-value /dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[[3-9]]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` + fi + ;; + esac +fi + +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + +_LT_DECL([], [deplibs_check_method], [1], + [Method to check whether dependent libraries are shared objects]) +_LT_DECL([], [file_magic_cmd], [1], + [Command to use when deplibs_check_method = "file_magic"]) +_LT_DECL([], [file_magic_glob], [1], + [How to find potential files when deplibs_check_method = "file_magic"]) +_LT_DECL([], [want_nocaseglob], [1], + [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) +])# _LT_CHECK_MAGIC_METHOD + + +# LT_PATH_NM +# ---------- +# find the pathname to a BSD- or MS-compatible name lister +AC_DEFUN([LT_PATH_NM], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi]) +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi + AC_SUBST([DUMPBIN]) + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm +AC_SUBST([NM]) +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl + +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], + [lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) + cat conftest.out >&AS_MESSAGE_LOG_FD + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest*]) +])# LT_PATH_NM + +# Old names: +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_NM], []) +dnl AC_DEFUN([AC_PROG_NM], []) + +# _LT_CHECK_SHAREDLIB_FROM_LINKLIB +# -------------------------------- +# how to determine the name of the shared library +# associated with a specific link library. +# -- PORTME fill in with the dynamic library characteristics +m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], +[m4_require([_LT_DECL_EGREP]) +m4_require([_LT_DECL_OBJDUMP]) +m4_require([_LT_DECL_DLLTOOL]) +AC_CACHE_CHECK([how to associate runtime and link libraries], +lt_cv_sharedlib_from_linklib_cmd, +[lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac +]) +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + +_LT_DECL([], [sharedlib_from_linklib_cmd], [1], + [Command to associate shared and link libraries]) +])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB + + +# _LT_PATH_MANIFEST_TOOL +# ---------------------- +# locate the manifest tool +m4_defun([_LT_PATH_MANIFEST_TOOL], +[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], + [lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&AS_MESSAGE_LOG_FD + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest*]) +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi +_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl +])# _LT_PATH_MANIFEST_TOOL + + +# LT_LIB_M +# -------- +# check for math library +AC_DEFUN([LT_LIB_M], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +AC_SUBST([LIBM]) +])# LT_LIB_M + +# Old name: +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_CHECK_LIBM], []) + + +# _LT_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------- +m4_defun([_LT_COMPILER_NO_RTTI], +[m4_require([_LT_TAG_COMPILER])dnl + +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + case $cc_basename in + nvcc*) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; + *) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; + esac + + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], + [Compiler flag to turn off builtin functions]) +])# _LT_COMPILER_NO_RTTI + + +# _LT_CMD_GLOBAL_SYMBOLS +# ---------------------- +m4_defun([_LT_CMD_GLOBAL_SYMBOLS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([LT_PATH_NM])dnl +AC_REQUIRE([LT_PATH_LD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_TAG_COMPILER])dnl + +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK ['"\ +" {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx]" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if AC_TRY_EVAL(ac_compile); then + # Now try to grab the symbols. + nlist=conftest.nm + if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT@&t@_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT@&t@_DLSYM_CONST +#else +# define LT@&t@_DLSYM_CONST const +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +LT@&t@_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[[]] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi + +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + +_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], + [Take the output of nm and produce a listing of raw symbols and C names]) +_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], + [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_c_name_address], + [lt_cv_sys_global_symbol_to_c_name_address], [1], + [Transform the output of nm in a C name address pair]) +_LT_DECL([global_symbol_to_c_name_address_lib_prefix], + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], + [Transform the output of nm in a C name address pair when lib prefix is needed]) +_LT_DECL([], [nm_file_list_spec], [1], + [Specify filename containing input files for $NM]) +]) # _LT_CMD_GLOBAL_SYMBOLS + + +# _LT_COMPILER_PIC([TAGNAME]) +# --------------------------- +m4_defun([_LT_COMPILER_PIC], +[m4_require([_LT_TAG_COMPILER])dnl +_LT_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_TAGVAR(lt_prog_compiler_static, $1)= + +m4_if([$1], [CXX], [ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix[[4-9]]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' + if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + hpux9* | hpux10* | hpux11*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; + nagfor*) + # NAG Fortran compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + *Sun\ F* | *Sun*Fortran*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Intel*\ [[CF]]*Compiler*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + *Portland\ Group*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + esac + ;; + + newsos6) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" + ;; +esac + +AC_CACHE_CHECK([for $compiler option to produce PIC], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], + [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], + [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], + [Additional compiler flags for building library objects]) + +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) +# +# Check to make sure the static flag actually works. +# +wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" +_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) +_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], + [Compiler flag to prevent dynamic linking]) +])# _LT_COMPILER_PIC + + +# _LT_LINKER_SHLIBS([TAGNAME]) +# ---------------------------- +# See if the linker supports building shared libraries. +m4_defun([_LT_LINKER_SHLIBS], +[AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +m4_if([$1], [CXX], [ + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + case $host_os in + aix[[4-9]]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global defined + # symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw* | cegcc*) + case $cc_basename in + cl*) + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + ;; + esac + ;; + linux* | k*bsd*-gnu | gnu*) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac +], [ + runpath_var= + _LT_TAGVAR(allow_undefined_flag, $1)= + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(archive_cmds, $1)= + _LT_TAGVAR(archive_expsym_cmds, $1)= + _LT_TAGVAR(compiler_needs_object, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(hardcode_automatic, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_separator, $1)= + _LT_TAGVAR(hardcode_minus_L, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(inherit_rpath, $1)=no + _LT_TAGVAR(link_all_deplibs, $1)=unknown + _LT_TAGVAR(module_cmds, $1)= + _LT_TAGVAR(module_expsym_cmds, $1)= + _LT_TAGVAR(old_archive_from_new_cmds, $1)= + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_TAGVAR(thread_safe_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. +dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + linux* | k*bsd*-gnu | gnu*) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; + esac + + _LT_TAGVAR(ld_shlibs, $1)=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; + *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[[3-9]]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + _LT_TAGVAR(whole_archive_flag_spec, $1)= + tmp_sharedflag='--shared' ;; + xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + _LT_TAGVAR(link_all_deplibs, $1)=no + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + bsdi[[45]]*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl*) + # Native MSVC + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + esac + ;; + + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + m4_if($1, [], [ + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + _LT_LINKER_OPTION([if $CC understands -b], + _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], + [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + # This should be the same for all languages, so no per-tag cache variable. + AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], + [lt_cv_irix_exported_symbol], + [save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE( + [AC_LANG_SOURCE( + [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], + [C++], [[int foo (void) { return 0; }]], + [Fortran 77], [[ + subroutine foo + end]], + [Fortran], [[ + subroutine foo + end]])])], + [lt_cv_irix_exported_symbol=yes], + [lt_cv_irix_exported_symbol=no]) + LDFLAGS="$save_LDFLAGS"]) + if test "$lt_cv_irix_exported_symbol" = yes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + ;; + esac + fi + fi +]) +AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) +test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld + +_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl +_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl +_LT_DECL([], [extract_expsyms_cmds], [2], + [The commands to extract the exported symbol list from a shared archive]) + +# +# Do we need to explicitly link libc? +# +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_CACHE_CHECK([whether -lc should be explicitly linked in], + [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), + [$RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + ]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) + ;; + esac + fi + ;; +esac + +_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], + [Whether or not to add -lc for building shared libraries]) +_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], + [enable_shared_with_static_runtimes], [0], + [Whether or not to disallow shared libs when runtime libs are static]) +_LT_TAGDECL([], [export_dynamic_flag_spec], [1], + [Compiler flag to allow reflexive dlopens]) +_LT_TAGDECL([], [whole_archive_flag_spec], [1], + [Compiler flag to generate shared objects directly from archives]) +_LT_TAGDECL([], [compiler_needs_object], [1], + [Whether the compiler copes with passing no objects directly]) +_LT_TAGDECL([], [old_archive_from_new_cmds], [2], + [Create an old-style archive from a shared archive]) +_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], + [Create a temporary old-style archive to link instead of a shared archive]) +_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) +_LT_TAGDECL([], [archive_expsym_cmds], [2]) +_LT_TAGDECL([], [module_cmds], [2], + [Commands used to build a loadable module if different from building + a shared archive.]) +_LT_TAGDECL([], [module_expsym_cmds], [2]) +_LT_TAGDECL([], [with_gnu_ld], [1], + [Whether we are building with GNU ld or not]) +_LT_TAGDECL([], [allow_undefined_flag], [1], + [Flag that allows shared libraries with undefined symbols to be built]) +_LT_TAGDECL([], [no_undefined_flag], [1], + [Flag that enforces no undefined symbols]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], + [Flag to hardcode $libdir into a binary during linking. + This must work even if $libdir does not exist]) +_LT_TAGDECL([], [hardcode_libdir_separator], [1], + [Whether we need a single "-rpath" flag with a separated argument]) +_LT_TAGDECL([], [hardcode_direct], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary]) +_LT_TAGDECL([], [hardcode_direct_absolute], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary and the resulting library dependency is + "absolute", i.e impossible to change by setting ${shlibpath_var} if the + library is relocated]) +_LT_TAGDECL([], [hardcode_minus_L], [0], + [Set to "yes" if using the -LDIR flag during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_shlibpath_var], [0], + [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_automatic], [0], + [Set to "yes" if building a shared library automatically hardcodes DIR + into the library and all subsequent libraries and executables linked + against it]) +_LT_TAGDECL([], [inherit_rpath], [0], + [Set to yes if linker adds runtime paths of dependent libraries + to runtime path list]) +_LT_TAGDECL([], [link_all_deplibs], [0], + [Whether libtool must link a program against all its dependency libraries]) +_LT_TAGDECL([], [always_export_symbols], [0], + [Set to "yes" if exported symbols are required]) +_LT_TAGDECL([], [export_symbols_cmds], [2], + [The commands to list exported symbols]) +_LT_TAGDECL([], [exclude_expsyms], [1], + [Symbols that should not be listed in the preloaded symbols]) +_LT_TAGDECL([], [include_expsyms], [1], + [Symbols that must always be exported]) +_LT_TAGDECL([], [prelink_cmds], [2], + [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [postlink_cmds], [2], + [Commands necessary for finishing linking programs]) +_LT_TAGDECL([], [file_list_spec], [1], + [Specify filename containing input files]) +dnl FIXME: Not yet implemented +dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], +dnl [Compiler flag to generate thread safe objects]) +])# _LT_LINKER_SHLIBS + + +# _LT_LANG_C_CONFIG([TAG]) +# ------------------------ +# Ensure that the configuration variables for a C compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_C_CONFIG], +[m4_require([_LT_DECL_EGREP])dnl +lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + +_LT_TAG_COMPILER +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + LT_SYS_DLOPEN_SELF + _LT_CMD_STRIPLIB + + # Report which library types will actually be built + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_CONFIG($1) +fi +AC_LANG_POP +CC="$lt_save_CC" +])# _LT_LANG_C_CONFIG + + +# _LT_LANG_CXX_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a C++ compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_CXX_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +else + _lt_caught_CXX_error=yes +fi + +AC_LANG_PUSH(C++) +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(compiler_needs_object, $1)=no +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + else + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + LT_PATH_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + _LT_TAGVAR(ld_shlibs, $1)=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + freebsd2.*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + freebsd-elf*) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + hpux9*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + fi + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 and above use weak symbols + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + ;; + xl* | mpixl* | bgxl*) + # IBM XL 8.0 on PPC, with GNU ld + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=func_echo_all + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + case $host in + osf3*) + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + ;; + *) + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + fi + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ + '"$_LT_TAGVAR(old_archive_cmds, $1)" + _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ + '"$_LT_TAGVAR(reload_cmds, $1)" + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) + test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + + _LT_TAGVAR(GCC, $1)="$GXX" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +AC_LANG_POP +])# _LT_LANG_CXX_CONFIG + + +# _LT_FUNC_STRIPNAME_CNF +# ---------------------- +# func_stripname_cnf prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# +# This function is identical to the (non-XSI) version of func_stripname, +# except this one can be used by m4 code that may be executed by configure, +# rather than the libtool script. +m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl +AC_REQUIRE([_LT_DECL_SED]) +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf +])# _LT_FUNC_STRIPNAME_CNF + +# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) +# --------------------------------- +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +m4_defun([_LT_SYS_HIDDEN_LIBDEPS], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl +# Dependencies to place before and after the object being linked: +_LT_TAGVAR(predep_objects, $1)= +_LT_TAGVAR(postdep_objects, $1)= +_LT_TAGVAR(predeps, $1)= +_LT_TAGVAR(postdeps, $1)= +_LT_TAGVAR(compiler_lib_search_path, $1)= + +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF +int a; +void foo (void) { a = 0; } +_LT_EOF +], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF +], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer*4 a + a=0 + return + end +_LT_EOF +], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_LT_EOF +], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF +public class foo { + private int a; + public void bar (void) { + a = 0; + } +}; +_LT_EOF +], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF +package foo +func foo() { +} +_LT_EOF +]) + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; +esac + +dnl Parse the compiler output and extract the necessary +dnl objects, libraries and library flags. +if AC_TRY_EVAL(ac_compile); then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case ${prev}${p} in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + fi + + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac + if test "$pre_test_object_deps_done" = no; then + case ${prev} in + -L | -R) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + else + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$_LT_TAGVAR(postdeps, $1)"; then + _LT_TAGVAR(postdeps, $1)="${prev}${p}" + else + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + fi + fi + prev= + ;; + + *.lto.$objext) ;; # Ignore GCC LTO objects + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$_LT_TAGVAR(predep_objects, $1)"; then + _LT_TAGVAR(predep_objects, $1)="$p" + else + _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" + fi + else + if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then + _LT_TAGVAR(postdep_objects, $1)="$p" + else + _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling $1 test program" +fi + +$RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS + +# PORTME: override above test on systems where it is broken +m4_if([$1], [CXX], +[case $host_os in +interix[[3-9]]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_TAGVAR(predep_objects,$1)= + _LT_TAGVAR(postdep_objects,$1)= + _LT_TAGVAR(postdeps,$1)= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC* | sunCC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) + +case " $_LT_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac + _LT_TAGVAR(compiler_lib_search_dirs, $1)= +if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi +_LT_TAGDECL([], [compiler_lib_search_dirs], [1], + [The directories searched by this compiler when creating a shared library]) +_LT_TAGDECL([], [predep_objects], [1], + [Dependencies to place before and after the objects being linked to + create a shared library]) +_LT_TAGDECL([], [postdep_objects], [1]) +_LT_TAGDECL([], [predeps], [1]) +_LT_TAGDECL([], [postdeps], [1]) +_LT_TAGDECL([], [compiler_lib_search_path], [1], + [The library search path used internally by the compiler when linking + a shared library]) +])# _LT_SYS_HIDDEN_LIBDEPS + + +# _LT_LANG_F77_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a Fortran 77 compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_F77_CONFIG], +[AC_LANG_PUSH(Fortran 77) +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the F77 compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_F77" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS + CC=${F77-"f77"} + CFLAGS=$FFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + GCC=$G77 + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$G77" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" + CFLAGS="$lt_save_CFLAGS" +fi # test "$_lt_disable_F77" != yes + +AC_LANG_POP +])# _LT_LANG_F77_CONFIG + + +# _LT_LANG_FC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for a Fortran compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_FC_CONFIG], +[AC_LANG_PUSH(Fortran) + +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes +fi + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} + +# Object file extension for compiled fc test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the FC compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_FC" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS + CC=${FC-"f95"} + CFLAGS=$FCFLAGS + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test "$_lt_disable_FC" != yes + +AC_LANG_POP +])# _LT_LANG_FC_CONFIG + + +# _LT_LANG_GCJ_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Java Compiler compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GCJ_CONFIG], +[AC_REQUIRE([LT_PROG_GCJ])dnl +AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GCJ-"gcj"} +CFLAGS=$GCJFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GCJ_CONFIG + + +# _LT_LANG_GO_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Go compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GO_CONFIG], +[AC_REQUIRE([LT_PROG_GO])dnl +AC_LANG_SAVE + +# Source file extension for Go test sources. +ac_ext=go + +# Object file extension for compiled Go test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="package main; func main() { }" + +# Code to be used in simple link tests +lt_simple_link_test_code='package main; func main() { }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GOC-"gccgo"} +CFLAGS=$GOFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# Go did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GO_CONFIG + + +# _LT_LANG_RC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for the Windows resource compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_RC_CONFIG], +[AC_REQUIRE([LT_PROG_RC])dnl +AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC= +CC=${RC-"windres"} +CFLAGS= +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +if test -n "$compiler"; then + : + _LT_CONFIG($1) +fi + +GCC=$lt_save_GCC +AC_LANG_RESTORE +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_RC_CONFIG + + +# LT_PROG_GCJ +# ----------- +AC_DEFUN([LT_PROG_GCJ], +[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], + [AC_CHECK_TOOL(GCJ, gcj,) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS)])])[]dnl +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_GCJ], []) + + +# LT_PROG_GO +# ---------- +AC_DEFUN([LT_PROG_GO], +[AC_CHECK_TOOL(GOC, gccgo,) +]) + + +# LT_PROG_RC +# ---------- +AC_DEFUN([LT_PROG_RC], +[AC_CHECK_TOOL(RC, windres,) +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_RC], []) + + +# _LT_DECL_EGREP +# -------------- +# If we don't have a new enough Autoconf to choose the best grep +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_EGREP], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_REQUIRE([AC_PROG_FGREP])dnl +test -z "$GREP" && GREP=grep +_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) +_LT_DECL([], [EGREP], [1], [An ERE matcher]) +_LT_DECL([], [FGREP], [1], [A literal string matcher]) +dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too +AC_SUBST([GREP]) +]) + + +# _LT_DECL_OBJDUMP +# -------------- +# If we don't have a new enough Autoconf to choose the best objdump +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_OBJDUMP], +[AC_CHECK_TOOL(OBJDUMP, objdump, false) +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) +AC_SUBST([OBJDUMP]) +]) + +# _LT_DECL_DLLTOOL +# ---------------- +# Ensure DLLTOOL variable is set. +m4_defun([_LT_DECL_DLLTOOL], +[AC_CHECK_TOOL(DLLTOOL, dlltool, false) +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) +AC_SUBST([DLLTOOL]) +]) + +# _LT_DECL_SED +# ------------ +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +m4_defun([_LT_DECL_SED], +[AC_PROG_SED +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" +_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) +_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], + [Sed that helps us avoid accidentally triggering echo(1) options like -n]) +])# _LT_DECL_SED + +m4_ifndef([AC_PROG_SED], [ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # + +m4_defun([AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_SUBST([SED]) +AC_MSG_RESULT([$SED]) +])#AC_PROG_SED +])#m4_ifndef + +# Old name: +AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_SED], []) + + +# _LT_CHECK_SHELL_FEATURES +# ------------------------ +# Find out whether the shell is Bourne or XSI compatible, +# or has some other useful features. +m4_defun([_LT_CHECK_SHELL_FEATURES], +[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +AC_MSG_RESULT([$xsi_shell]) +_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) + +AC_MSG_CHECKING([whether the shell understands "+="]) +lt_shell_append=no +( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +AC_MSG_RESULT([$lt_shell_append]) +_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl +_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl +])# _LT_CHECK_SHELL_FEATURES + + +# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) +# ------------------------------------------------------ +# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and +# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. +m4_defun([_LT_PROG_FUNCTION_REPLACE], +[dnl { +sed -e '/^$1 ()$/,/^} # $1 /c\ +$1 ()\ +{\ +m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) +} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: +]) + + +# _LT_PROG_REPLACE_SHELLFNS +# ------------------------- +# Replace existing portable implementations of several shell functions with +# equivalent extended shell implementations where those features are available.. +m4_defun([_LT_PROG_REPLACE_SHELLFNS], +[if test x"$xsi_shell" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac]) + + _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl + func_basename_result="${1##*/}"]) + + _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}"]) + + _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"}]) + + _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl + func_split_long_opt_name=${1%%=*} + func_split_long_opt_arg=${1#*=}]) + + _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) + + _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac]) + + _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) + + _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) + + _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) +fi + +if test x"$lt_shell_append" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) + + _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl + func_quote_for_eval "${2}" +dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ + eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) +fi +]) + +# _LT_PATH_CONVERSION_FUNCTIONS +# ----------------------------- +# Determine which file name conversion functions should be used by +# func_to_host_file (and, implicitly, by func_to_host_path). These are needed +# for certain cross-compile configurations and native mingw. +m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_MSG_CHECKING([how to convert $build file names to $host format]) +AC_CACHE_VAL(lt_cv_to_host_file_cmd, +[case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac +]) +to_host_file_cmd=$lt_cv_to_host_file_cmd +AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) +_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], + [0], [convert $build file names to $host format])dnl + +AC_MSG_CHECKING([how to convert $build file names to toolchain format]) +AC_CACHE_VAL(lt_cv_to_tool_file_cmd, +[#assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac +]) +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) +_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], + [0], [convert $build files to toolchain format])dnl +])# _LT_PATH_CONVERSION_FUNCTIONS + +# Helper functions for option handling. -*- Autoconf -*- +# +# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file 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. + +# serial 7 ltoptions.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) + + +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) +# ------------------------------------------ +m4_define([_LT_MANGLE_OPTION], +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) + + +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) +# --------------------------------------- +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a +# matching handler defined, dispatch to it. Other OPTION-NAMEs are +# saved as a flag. +m4_define([_LT_SET_OPTION], +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), + _LT_MANGLE_DEFUN([$1], [$2]), + [m4_warning([Unknown $1 option `$2'])])[]dnl +]) + + +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) +# ------------------------------------------------------------ +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +m4_define([_LT_IF_OPTION], +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) + + +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) +# ------------------------------------------------------- +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME +# are set. +m4_define([_LT_UNLESS_OPTIONS], +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), + [m4_define([$0_found])])])[]dnl +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 +])[]dnl +]) + + +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) +# ---------------------------------------- +# OPTION-LIST is a space-separated list of Libtool options associated +# with MACRO-NAME. If any OPTION has a matching handler declared with +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about +# the unknown option and exit. +m4_defun([_LT_SET_OPTIONS], +[# Set options +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [_LT_SET_OPTION([$1], _LT_Option)]) + +m4_if([$1],[LT_INIT],[ + dnl + dnl Simply set some default values (i.e off) if boolean options were not + dnl specified: + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no + ]) + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no + ]) + dnl + dnl If no reference was made to various pairs of opposing options, then + dnl we run the default mode handler for the pair. For example, if neither + dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl archives by default: + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], + [_LT_ENABLE_FAST_INSTALL]) + ]) +])# _LT_SET_OPTIONS + + + +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) +# ----------------------------------------- +m4_define([_LT_MANGLE_DEFUN], +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) + + +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) +# ----------------------------------------------- +m4_define([LT_OPTION_DEFINE], +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl +])# LT_OPTION_DEFINE + + +# dlopen +# ------ +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes +]) + +AU_DEFUN([AC_LIBTOOL_DLOPEN], +[_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `dlopen' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) + + +# win32-dll +# --------- +# Declare package support for building win32 dll's. +LT_OPTION_DEFINE([LT_INIT], [win32-dll], +[enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +esac + +test -z "$AS" && AS=as +_LT_DECL([], [AS], [1], [Assembler program])dnl + +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl + +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl +])# win32-dll + +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `win32-dll' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) + + +# _LT_ENABLE_SHARED([DEFAULT]) +# ---------------------------- +# implement the --enable-shared flag, and supports the `shared' and +# `disable-shared' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_SHARED], +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) + + _LT_DECL([build_libtool_libs], [enable_shared], [0], + [Whether or not to build shared libraries]) +])# _LT_ENABLE_SHARED + +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) + +AC_DEFUN([AC_DISABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], [disable-shared]) +]) + +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_SHARED], []) +dnl AC_DEFUN([AM_DISABLE_SHARED], []) + + + +# _LT_ENABLE_STATIC([DEFAULT]) +# ---------------------------- +# implement the --enable-static flag, and support the `static' and +# `disable-static' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_STATIC], +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([static], + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]_LT_ENABLE_STATIC_DEFAULT) + + _LT_DECL([build_old_libs], [enable_static], [0], + [Whether or not to build static libraries]) +])# _LT_ENABLE_STATIC + +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +]) + +AC_DEFUN([AC_DISABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], [disable-static]) +]) + +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_STATIC], []) +dnl AC_DEFUN([AM_DISABLE_STATIC], []) + + + +# _LT_ENABLE_FAST_INSTALL([DEFAULT]) +# ---------------------------------- +# implement the --enable-fast-install flag, and support the `fast-install' +# and `disable-fast-install' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_FAST_INSTALL], +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([fast-install], + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) + +_LT_DECL([fast_install], [enable_fast_install], [0], + [Whether or not to optimize for fast installation])dnl +])# _LT_ENABLE_FAST_INSTALL + +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) + +# Old names: +AU_DEFUN([AC_ENABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `fast-install' option into LT_INIT's first parameter.]) +]) + +AU_DEFUN([AC_DISABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `disable-fast-install' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) + + +# _LT_WITH_PIC([MODE]) +# -------------------- +# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# LT_INIT options. +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +m4_define([_LT_WITH_PIC], +[AC_ARG_WITH([pic], + [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [pic_mode=default]) + +test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) + +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl +])# _LT_WITH_PIC + +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) + +# Old name: +AU_DEFUN([AC_LIBTOOL_PICMODE], +[_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `pic-only' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) + + +m4_define([_LTDL_MODE], []) +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], + [m4_define([_LTDL_MODE], [nonrecursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [recursive], + [m4_define([_LTDL_MODE], [recursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [subproject], + [m4_define([_LTDL_MODE], [subproject])]) + +m4_define([_LTDL_TYPE], []) +LT_OPTION_DEFINE([LTDL_INIT], [installable], + [m4_define([_LTDL_TYPE], [installable])]) +LT_OPTION_DEFINE([LTDL_INIT], [convenience], + [m4_define([_LTDL_TYPE], [convenience])]) + +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file 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. + +# serial 6 ltsugar.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) + + +# lt_join(SEP, ARG1, [ARG2...]) +# ----------------------------- +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their +# associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. +m4_define([lt_join], +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) +m4_define([_lt_join], +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) + + +# lt_car(LIST) +# lt_cdr(LIST) +# ------------ +# Manipulate m4 lists. +# These macros are necessary as long as will still need to support +# Autoconf-2.59 which quotes differently. +m4_define([lt_car], [[$1]]) +m4_define([lt_cdr], +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], + [$#], 1, [], + [m4_dquote(m4_shift($@))])]) +m4_define([lt_unquote], $1) + + +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + + + +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) +# ---------------------------------------------------------- +# Produce a SEP delimited list of all paired combinations of elements of +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list +# has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. +m4_define([lt_combine], +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) + + +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) +# ----------------------------------------------------------------------- +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. +m4_define([lt_if_append_uniq], +[m4_ifdef([$1], + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) + + +# lt_dict_add(DICT, KEY, VALUE) +# ----------------------------- +m4_define([lt_dict_add], +[m4_define([$1($2)], [$3])]) + + +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) +# -------------------------------------------- +m4_define([lt_dict_add_subkey], +[m4_define([$1($2:$3)], [$4])]) + + +# lt_dict_fetch(DICT, KEY, [SUBKEY]) +# ---------------------------------- +m4_define([lt_dict_fetch], +[m4_ifval([$3], + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) + + +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) +# ----------------------------------------------------------------- +m4_define([lt_if_dict_fetch], +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], + [$5], + [$6])]) + + +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) +# -------------------------------------------------------------- +m4_define([lt_dict_filter], +[m4_if([$5], [], [], + [lt_join(m4_quote(m4_default([$4], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl +]) + +# ltversion.m4 -- version numbers -*- Autoconf -*- +# +# Copyright (C) 2004 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004 +# +# This file 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. + +# @configure_input@ + +# serial 3337 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.4.2]) +m4_define([LT_PACKAGE_REVISION], [1.3337]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.4.2' +macro_revision='1.3337' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +]) + +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004. +# +# This file 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. + +# serial 5 lt~obsolete.m4 + +# These exist entirely to fool aclocal when bootstrapping libtool. +# +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# which have later been changed to m4_define as they aren't part of the +# exported API, or moved to Autoconf or Automake where they belong. +# +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us +# using a macro with the same name in our local m4/libtool.m4 it'll +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define +# and doesn't know about Autoconf macros at all.) +# +# So we provide this file, which has a silly filename so it's always +# included after everything else. This provides aclocal with the +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything +# because those macros already exist, or will be overwritten later. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. +# Yes, that means every name once taken will need to remain here until +# we give up compatibility with versions before 1.7, at which point +# we need to keep only those names which we still refer to. + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) + +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) +m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) +m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) +m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) +m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) +m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) +m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) +m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) +m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) +m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) +m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) +m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) +m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) +m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) +m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) +m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) + +# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# +# This file 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. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.14' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.14.1], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.14.1])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file 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. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is '.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# +# This file 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. + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# This file 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. + + +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# This file 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. + + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each '.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# +# This file 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 macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.65])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl +]) +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi]) + +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file 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. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST([install_sh])]) + +# Copyright (C) 2003-2013 Free Software Foundation, Inc. +# +# This file 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. + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file 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. + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# +# This file 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. + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + AC_MSG_WARN(['missing' script is too old or missing]) +fi +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file 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. + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# -------------------- +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) + +# _AM_SET_OPTIONS(OPTIONS) +# ------------------------ +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# This file 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. + +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# This file 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. + + +# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# --------------------------------------------------------------------------- +# Adds support for distributing Python modules and packages. To +# install modules, copy them to $(pythondir), using the python_PYTHON +# automake variable. To install a package with the same name as the +# automake package, install to $(pkgpythondir), or use the +# pkgpython_PYTHON automake variable. +# +# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as +# locations to install python extension modules (shared libraries). +# Another macro is required to find the appropriate flags to compile +# extension modules. +# +# If your package is configured with a different prefix to python, +# users will have to add the install directory to the PYTHONPATH +# environment variable, or create a .pth file (see the python +# documentation for details). +# +# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will +# cause an error if the version of python installed on the system +# doesn't meet the requirement. MINIMUM-VERSION should consist of +# numbers and dots only. +AC_DEFUN([AM_PATH_PYTHON], + [ + dnl Find a Python interpreter. Python versions prior to 2.0 are not + dnl supported. (2.0 was released on October 16, 2000). + m4_define_default([_AM_PYTHON_INTERPRETER_LIST], +[python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl + python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0]) + + AC_ARG_VAR([PYTHON], [the Python interpreter]) + + m4_if([$1],[],[ + dnl No version check is needed. + # Find any Python interpreter. + if test -z "$PYTHON"; then + AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) + fi + am_display_PYTHON=python + ], [ + dnl A version check is needed. + if test -n "$PYTHON"; then + # If the user set $PYTHON, use it and don't search something else. + AC_MSG_CHECKING([whether $PYTHON version is >= $1]) + AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AC_MSG_ERROR([Python interpreter is too old])]) + am_display_PYTHON=$PYTHON + else + # Otherwise, try each interpreter until we find one that satisfies + # VERSION. + AC_CACHE_CHECK([for a Python interpreter with version >= $1], + [am_cv_pathless_PYTHON],[ + for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do + test "$am_cv_pathless_PYTHON" = none && break + AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) + done]) + # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. + if test "$am_cv_pathless_PYTHON" = none; then + PYTHON=: + else + AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) + fi + am_display_PYTHON=$am_cv_pathless_PYTHON + fi + ]) + + if test "$PYTHON" = :; then + dnl Run any user-specified action, or abort. + m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) + else + + dnl Query Python for its version number. Getting [:3] seems to be + dnl the best way to do this; it's what "site.py" does in the standard + dnl library. + + AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], + [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`]) + AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) + + dnl Use the values of $prefix and $exec_prefix for the corresponding + dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made + dnl distinct variables so they can be overridden if need be. However, + dnl general consensus is that you shouldn't need this ability. + + AC_SUBST([PYTHON_PREFIX], ['${prefix}']) + AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) + + dnl At times (like when building shared libraries) you may want + dnl to know which OS platform Python thinks this is. + + AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], + [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) + AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) + + # Just factor out some code duplication. + am_python_setup_sysconfig="\ +import sys +# Prefer sysconfig over distutils.sysconfig, for better compatibility +# with python 3.x. See automake bug#10227. +try: + import sysconfig +except ImportError: + can_use_sysconfig = 0 +else: + can_use_sysconfig = 1 +# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: +# +try: + from platform import python_implementation + if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7': + can_use_sysconfig = 0 +except ImportError: + pass" + + dnl Set up 4 directories: + + dnl pythondir -- where to install python scripts. This is the + dnl site-packages directory, not the python standard library + dnl directory like in previous automake betas. This behavior + dnl is more consistent with lispdir.m4 for example. + dnl Query distutils for this directory. + AC_CACHE_CHECK([for $am_display_PYTHON script directory], + [am_cv_python_pythondir], + [if test "x$prefix" = xNONE + then + am_py_prefix=$ac_default_prefix + else + am_py_prefix=$prefix + fi + am_cv_python_pythondir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` + case $am_cv_python_pythondir in + $am_py_prefix*) + am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` + am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` + ;; + *) + case $am_py_prefix in + /usr|/System*) ;; + *) + am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + ]) + AC_SUBST([pythondir], [$am_cv_python_pythondir]) + + dnl pkgpythondir -- $PACKAGE directory under pythondir. Was + dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is + dnl more consistent with the rest of automake. + + AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) + + dnl pyexecdir -- directory for installing python extension modules + dnl (shared libraries) + dnl Query distutils for this directory. + AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], + [am_cv_python_pyexecdir], + [if test "x$exec_prefix" = xNONE + then + am_py_exec_prefix=$am_py_prefix + else + am_py_exec_prefix=$exec_prefix + fi + am_cv_python_pyexecdir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` + case $am_cv_python_pyexecdir in + $am_py_exec_prefix*) + am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` + am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` + ;; + *) + case $am_py_exec_prefix in + /usr|/System*) ;; + *) + am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + ]) + AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) + + dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) + + AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) + + dnl Run any user-specified action. + $2 + fi + +]) + + +# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) +# --------------------------------------------------------------------------- +# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. +# Run ACTION-IF-FALSE otherwise. +# This test uses sys.hexversion instead of the string equivalent (first +# word of sys.version), in order to cope with versions such as 2.2c1. +# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000). +AC_DEFUN([AM_PYTHON_CHECK_VERSION], + [prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]] +minverhex = 0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] +sys.exit(sys.hexversion < minverhex)" + AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file 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. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# +# This file 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. + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) + +# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# +# This file 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. + +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# ("yes" being less verbose, "no" or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file 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. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor 'install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in "make install-strip", and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006-2013 Free Software Foundation, Inc. +# +# This file 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. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004-2013 Free Software Foundation, Inc. +# +# This file 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. + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +# +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' + +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done + rm -rf conftest.dir + + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + diff --git a/ceph/src/gmock/build-aux/compile b/ceph/src/gmock/build-aux/compile new file mode 100755 index 00000000..531136b0 --- /dev/null +++ b/ceph/src/gmock/build-aux/compile @@ -0,0 +1,347 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2012-10-14.11; # UTC + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/ceph/src/gtest/build-aux/config.guess b/ceph/src/gmock/build-aux/config.guess similarity index 92% rename from ceph/src/gtest/build-aux/config.guess rename to ceph/src/gmock/build-aux/config.guess index d622a44e..b79252d6 100755 --- a/ceph/src/gtest/build-aux/config.guess +++ b/ceph/src/gmock/build-aux/config.guess @@ -1,14 +1,12 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. +# Copyright 1992-2013 Free Software Foundation, Inc. -timestamp='2012-02-10' +timestamp='2013-06-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -22,19 +20,17 @@ timestamp='2012-02-10' # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). # -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. +# Originally written by Per Bothner. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches with a ChangeLog entry to config-patches@gnu.org. + me=`echo "$0" | sed -e 's,.*/,,'` @@ -54,9 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. +Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + ;; +esac + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in @@ -200,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} @@ -302,7 +321,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) + arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) @@ -801,6 +820,9 @@ EOF i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; @@ -852,21 +874,21 @@ EOF exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -879,59 +901,54 @@ EOF EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build @@ -950,54 +967,63 @@ EOF #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; + or1k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-gnu + echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu + echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1201,6 +1227,9 @@ EOF BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1227,19 +1256,21 @@ EOF exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) @@ -1256,7 +1287,7 @@ EOF NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; - NSE-?:NONSTOP_KERNEL:*:*) + NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) @@ -1330,9 +1361,6 @@ EOF exit ;; esac -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - eval $set_cc_for_build cat >$dummy.c <. @@ -26,11 +20,12 @@ timestamp='2012-02-10' # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -73,9 +68,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. +Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -123,7 +116,7 @@ esac maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) @@ -156,7 +149,7 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) + -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; @@ -225,6 +218,12 @@ case $os in -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; -lynx*) os=-lynxos ;; @@ -253,10 +252,12 @@ case $basic_machine in | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | be32 | be64 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | be32 | be64 \ | bfin \ - | c4x | clipper \ + | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ @@ -267,7 +268,7 @@ case $basic_machine in | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -285,16 +286,17 @@ case $basic_machine in | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ - | nios | nios2 \ + | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 \ - | or32 \ + | or1k | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ @@ -364,13 +366,13 @@ case $basic_machine in | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ @@ -383,7 +385,8 @@ case $basic_machine in | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -401,12 +404,13 @@ case $basic_machine in | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ @@ -782,11 +786,15 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; - microblaze) + microblaze*) basic_machine=microblaze-xilinx ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; mingw32) - basic_machine=i386-pc + basic_machine=i686-pc os=-mingw32 ;; mingw32ce) @@ -822,7 +830,7 @@ case $basic_machine in basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) - basic_machine=i386-pc + basic_machine=i686-pc os=-msys ;; mvs) @@ -1013,7 +1021,11 @@ case $basic_machine in basic_machine=i586-unknown os=-pw32 ;; - rdos) + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) basic_machine=i386-pc os=-rdos ;; @@ -1340,21 +1352,21 @@ case $os in -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ + | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ + | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-uclibc* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ @@ -1486,9 +1498,6 @@ case $os in -aros*) os=-aros ;; - -kaos*) - os=-kaos - ;; -zvmoe) os=-zvmoe ;; @@ -1537,6 +1546,12 @@ case $basic_machine in c4x-* | tic4x-*) os=-coff ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; tic54x-*) os=-coff ;; @@ -1577,6 +1592,9 @@ case $basic_machine in mips*-*) os=-elf ;; + or1k-*) + os=-elf + ;; or32-*) os=-coff ;; diff --git a/ceph/src/gtest/build-aux/depcomp b/ceph/src/gmock/build-aux/depcomp similarity index 56% rename from ceph/src/gtest/build-aux/depcomp rename to ceph/src/gmock/build-aux/depcomp index bd0ac089..4ebd5b3a 100755 --- a/ceph/src/gtest/build-aux/depcomp +++ b/ceph/src/gmock/build-aux/depcomp @@ -1,10 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2011-12-04.11; # UTC +scriptversion=2013-05-30.07; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, -# 2011 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,9 +27,9 @@ scriptversion=2011-12-04.11; # UTC case $1 in '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] @@ -40,8 +39,8 @@ as side-effects. Environment variables: depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. @@ -57,6 +56,66 @@ EOF ;; esac +# Get the directory component of the given path, and save it in the +# global variables '$dir'. Note that this directory component will +# be either empty or ending with a '/' character. This is deliberate. +set_dir_from () +{ + case $1 in + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; + *) dir=;; + esac +} + +# Get the suffix-stripped basename of the given path, and save it the +# global variable '$base'. +set_base_from () +{ + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` +} + +# If no dependency file was actually created by the compiler invocation, +# we still have to create a dummy depfile, to avoid errors with the +# Makefile "include basename.Plo" scheme. +make_dummy_depfile () +{ + echo "#dummy" > "$depfile" +} + +# Factor out some common post-processing of the generated depfile. +# Requires the auxiliary global variable '$tmpdepfile' to be set. +aix_post_process_depfile () +{ + # If the compiler actually managed to produce a dependency file, + # post-process it. + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependency.h'. + # Do two passes, one to just change these to + # $object: dependency.h + # and one to simply output + # dependency.h: + # which is needed to avoid the deleted-header problem. + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" + } > "$depfile" + rm -f "$tmpdepfile" + else + make_dummy_depfile + fi +} + +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' +# Character ranges might be problematic outside the C locale. +# These definitions help. +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ +lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 +alpha=${upper}${lower} + if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 @@ -69,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" +# Avoid interferences from the environment. +gccflag= dashmflag= + # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case @@ -80,26 +142,32 @@ if test "$depmode" = hp; then fi if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvisualcpp + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then - # This is just like msvc7 but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvc7 + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. + gccflag=-qmakedep=gcc,-MF + depmode=gcc fi case "$depmode" in @@ -122,8 +190,7 @@ gcc3) done "$@" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -131,13 +198,17 @@ gcc3) ;; gcc) +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). +## -MM, not -M (despite what the docs say). Also, it might not be +## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then @@ -145,33 +216,31 @@ gcc) fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. + # The second -e expression handles DOS-style file names with drive + # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. +## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory +## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -189,8 +258,7 @@ sgi) "$@" -MDupdate "$tmpdepfile" fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -198,43 +266,41 @@ sgi) if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" - # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the + # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> "$depfile" + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" + make_dummy_depfile fi rm -f "$tmpdepfile" ;; +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the + # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + set_dir_from "$object" + set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u @@ -247,9 +313,7 @@ aix) "$@" -M fi stat=$? - - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi @@ -258,44 +322,100 @@ aix) do test -f "$tmpdepfile" && break done - if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" + aix_post_process_depfile + ;; + +tcc) + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 + # FIXME: That version still under development at the moment of writing. + # Make that this statement remains true also for stable, released + # versions. + # It will wrap lines (doesn't matter whether long or short) with a + # trailing '\', as in: + # + # foo.o : \ + # foo.c \ + # foo.h \ + # + # It will put a trailing '\' even on the last line, and will use leading + # spaces rather than leading tabs (at least since its commit 0394caf7 + # "Emit spaces for -MD"). + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat fi + rm -f "$depfile" + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. + # We have to change lines of the first kind to '$object: \'. + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" + # And for each line of the second kind, we have to emit a 'dep.h:' + # dummy dependency, to avoid the deleted-header problem. + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want: - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output +## The order of this option in the case statement is important, since the +## shell code in configure will try each of these formats in the order +## listed in this file. A plain '-MD' option would be understood by many +## compilers, so we must ensure this comes after the gcc and icc options. +pgcc) + # Portland's C compiler understands '-MD'. + # Will always output deps to 'file.d' where file is the root name of the + # source file under compilation, even if file resides in a subdirectory. + # The object file name does not affect the name of the '.d' file. + # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : + # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... + set_dir_from "$object" + # Use the source, not the object, to determine the base name, since + # that's sadly what pgcc will do too. + set_base_from "$source" + tmpdepfile=$base.d + + # For projects that build the same source file twice into different object + # files, the pgcc approach of using the *source* file root name can cause + # problems in parallel builds. Use a locking strategy to avoid stomping on + # the same $tmpdepfile. + lockdir=$base.d-lock + trap " + echo '$0: caught signal, cleaning up...' >&2 + rmdir '$lockdir' + exit 1 + " 1 2 13 15 + numtries=100 + i=$numtries + while test $i -gt 0; do + # mkdir is a portable test-and-set. + if mkdir "$lockdir" 2>/dev/null; then + # This process acquired the lock. + "$@" -MD + stat=$? + # Release the lock. + rmdir "$lockdir" + break + else + # If the lock is being held by a different process, wait + # until the winning process is done or we timeout. + while test -d "$lockdir" && test $i -gt 0; do + sleep 1 + i=`expr $i - 1` + done + fi + i=`expr $i - 1` + done + trap - 1 2 13 15 + if test $i -le 0; then + echo "$0: failed to acquire lock after $numtries attempts" >&2 + echo "$0: check lockdir '$lockdir'" >&2 + exit 1 + fi - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -307,8 +427,8 @@ icc) sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -319,9 +439,8 @@ hp2) # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + set_dir_from "$object" + set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d @@ -332,8 +451,7 @@ hp2) "$@" +Maked fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi @@ -343,77 +461,61 @@ hp2) test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" + # Add 'dependent.h:' lines. sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" else - echo "#dummy" > "$depfile" + make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in 'foo.d' instead, so we check for that too. + # Subdirectories are respected. + set_dir_from "$object" + set_base_from "$object" + + if test "$libtool" = yes; then + # Libtool generates 2 separate objects for the 2 libraries. These + # two compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir$base.o.d # libtool 1.5 + tmpdepfile2=$dir.libs/$base.o.d # Likewise. + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + # Same post-processing that is required for AIX mode. + aix_post_process_depfile + ;; msvc7) if test "$libtool" = yes; then @@ -424,8 +526,7 @@ msvc7) "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" - if test "$stat" = 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -443,14 +544,15 @@ msvc7) p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g -s/\(.*\)/ \1 \\/p +s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { - s/.*/ / + s/.*/'"$tab"'/ G p }' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; @@ -478,7 +580,7 @@ dashmstdout) shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -498,18 +600,18 @@ dashmstdout) done test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' + # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + # Some versions of the HPUX 10.20 sed can't process this sed invocation + # correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -562,11 +664,12 @@ makedepend) # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + # Some versions of the HPUX 10.20 sed can't process the last invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed '1,2d' "$tmpdepfile" \ + | tr ' ' "$nl" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; @@ -583,7 +686,7 @@ cpp) shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -602,10 +705,10 @@ cpp) esac done - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" + "$@" -E \ + | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" @@ -637,23 +740,23 @@ msvisualcpp) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; + set fnord "$@" + shift + shift + ;; *) - set fnord "$@" "$arg" - shift - shift - ;; + set fnord "$@" "$arg" + shift + shift + ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; diff --git a/ceph/src/gtest/build-aux/install-sh b/ceph/src/gmock/build-aux/install-sh similarity index 97% rename from ceph/src/gtest/build-aux/install-sh rename to ceph/src/gmock/build-aux/install-sh index a9244eb0..377bb868 100755 --- a/ceph/src/gtest/build-aux/install-sh +++ b/ceph/src/gmock/build-aux/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2011-01-19.21; # UTC +scriptversion=2011-11-20.07; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -35,7 +35,7 @@ scriptversion=2011-01-19.21; # UTC # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it +# 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written @@ -156,7 +156,7 @@ while test $# -ne 0; do -s) stripcmd=$stripprog;; -t) dst_arg=$2 - # Protect names problematic for `test' and other utilities. + # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac @@ -190,7 +190,7 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then fi shift # arg dst_arg=$arg - # Protect names problematic for `test' and other utilities. + # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac @@ -202,7 +202,7 @@ if test $# -eq 0; then echo "$0: no input file specified." >&2 exit 1 fi - # It's OK to call `install-sh -d' without argument. + # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi @@ -240,7 +240,7 @@ fi for src do - # Protect names problematic for `test' and other utilities. + # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac @@ -354,7 +354,7 @@ do if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. + # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in diff --git a/ceph/src/gtest/build-aux/ltmain.sh b/ceph/src/gmock/build-aux/ltmain.sh similarity index 99% rename from ceph/src/gtest/build-aux/ltmain.sh rename to ceph/src/gmock/build-aux/ltmain.sh index c2852d85..a356acaf 100644 --- a/ceph/src/gtest/build-aux/ltmain.sh +++ b/ceph/src/gmock/build-aux/ltmain.sh @@ -70,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1ubuntu1 +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.7ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # @@ -80,7 +80,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.2 Debian-2.4.2-1ubuntu1" +VERSION="2.4.2 Debian-2.4.2-1.7ubuntu1" TIMESTAMP="" package_revision=1.3337 diff --git a/ceph/src/gmock/build-aux/missing b/ceph/src/gmock/build-aux/missing new file mode 100755 index 00000000..db98974f --- /dev/null +++ b/ceph/src/gmock/build-aux/missing @@ -0,0 +1,215 @@ +#! /bin/sh +# Common wrapper for a few potentially missing GNU programs. + +scriptversion=2013-10-28.13; # UTC + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try '$0 --help' for more information" + exit 1 +fi + +case $1 in + + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; + + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + +Supported PROGRAM values: + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man + +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" + exit 1 + ;; + +esac + +# Run the given program, remember its exit status. +"$@"; st=$? + +# If it succeeded, we are done. +test $st -eq 0 && exit 0 + +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi + +perl_URL=http://www.perl.org/ +flex_URL=http://flex.sourceforge.net/ +gnu_software_URL=http://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'autom4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" + ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/ceph/src/gmock/build-aux/test-driver b/ceph/src/gmock/build-aux/test-driver new file mode 100755 index 00000000..d3060566 --- /dev/null +++ b/ceph/src/gmock/build-aux/test-driver @@ -0,0 +1,139 @@ +#! /bin/sh +# test-driver - basic testsuite driver script. + +scriptversion=2013-07-13.22; # UTC + +# Copyright (C) 2011-2013 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +# Make unconditional expansion of undefined variables an error. This +# helps a lot in preventing typo-related bugs. +set -u + +usage_error () +{ + echo "$0: $*" >&2 + print_usage >&2 + exit 2 +} + +print_usage () +{ + cat <$log_file 2>&1 +estatus=$? +if test $enable_hard_errors = no && test $estatus -eq 99; then + estatus=1 +fi + +case $estatus:$expect_failure in + 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; + 0:*) col=$grn res=PASS recheck=no gcopy=no;; + 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; + 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; + *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; + *:*) col=$red res=FAIL recheck=yes gcopy=yes;; +esac + +# Report outcome to console. +echo "${col}${res}${std}: $test_name" + +# Register the test result, and other relevant metadata. +echo ":test-result: $res" > $trs_file +echo ":global-test-result: $res" >> $trs_file +echo ":recheck: $recheck" >> $trs_file +echo ":copy-in-global-log: $gcopy" >> $trs_file + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/ceph/src/gmock/configure b/ceph/src/gmock/configure new file mode 100755 index 00000000..04e603aa --- /dev/null +++ b/ceph/src/gmock/configure @@ -0,0 +1,18699 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.69 for Google C++ Mocking Framework 1.7.0. +# +# Report bugs to . +# +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 + + test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org and +$0: googlemock@googlegroups.com about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + +SHELL=${CONFIG_SHELL-/bin/sh} + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='Google C++ Mocking Framework' +PACKAGE_TARNAME='gmock' +PACKAGE_VERSION='1.7.0' +PACKAGE_STRING='Google C++ Mocking Framework 1.7.0' +PACKAGE_BUGREPORT='googlemock@googlegroups.com' +PACKAGE_URL='' + +ac_unique_file="./LICENSE" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +enable_option_checking=no +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS +LIBOBJS +subdirs +GTEST_VERSION +GTEST_LIBS +GTEST_LDFLAGS +GTEST_CXXFLAGS +GTEST_CPPFLAGS +GTEST_CONFIG +HAVE_PTHREADS_FALSE +HAVE_PTHREADS_TRUE +PTHREAD_CFLAGS +PTHREAD_LIBS +PTHREAD_CC +acx_pthread_config +HAVE_PYTHON_FALSE +HAVE_PYTHON_TRUE +PYTHON +CXXCPP +CPP +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +MANIFEST_TOOL +RANLIB +ac_ct_AR +AR +DLLTOOL +OBJDUMP +LN_S +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP +EGREP +GREP +SED +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +LIBTOOL +am__fastdepCXX_FALSE +am__fastdepCXX_TRUE +CXXDEPMODE +ac_ct_CXX +CXXFLAGS +CXX +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +am__nodep +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_silent_rules +enable_dependency_tracking +enable_shared +enable_static +with_pic +enable_fast_install +with_gnu_ld +with_sysroot +enable_libtool_lock +with_pthreads +with_gtest +enable_external_gtest +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CXX +CXXFLAGS +CCC +CPP +CXXCPP +GTEST_CONFIG +GTEST_CPPFLAGS +GTEST_CXXFLAGS +GTEST_LDFLAGS +GTEST_LIBS +GTEST_VERSION' +ac_subdirs_all='gtest' + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures Google C++ Mocking Framework 1.7.0 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/gmock] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of Google C++ Mocking Framework 1.7.0:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-static[=PKGS] build static libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) + --disable-external-gtest + Disables any detection or use of a system installed + or user provided gtest. Any option to '--with-gtest' + is ignored. (Default is enabled.) + + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). + --with-pthreads use pthreads (default is yes) + --with-gtest Specifies how to find the gtest package. If no + arguments are given, the default behavior, a system + installed gtest will be used if present, and an + internal version built otherwise. If a path is + provided, the gtest built or installed at that + prefix will be used. + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CXX C++ compiler command + CXXFLAGS C++ compiler flags + CPP C preprocessor + CXXCPP C++ preprocessor + GTEST_CONFIG + The exact path of Google Test's 'gtest-config' script. + GTEST_CPPFLAGS + C-like preprocessor flags for Google Test. + GTEST_CXXFLAGS + C++ compile flags for Google Test. + GTEST_LDFLAGS + Linker path and option flags for Google Test. + GTEST_LIBS Library linking flags for Google Test. + GTEST_VERSION + The version of Google Test available. + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +Google C++ Mocking Framework configure 1.7.0 +generated by GNU Autoconf 2.69 + +Copyright (C) 2012 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_cxx_try_compile LINENO +# ---------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_cxx_try_cpp LINENO +# ------------------------ +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_cpp + +# ac_fn_cxx_try_link LINENO +# ------------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_link +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by Google C++ Mocking Framework $as_me 1.7.0, which was +generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +# Provide various options to initialize the Autoconf and configure processes. + + +ac_aux_dir= +for ac_dir in build-aux "$srcdir"/build-aux; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +ac_config_headers="$ac_config_headers build-aux/config.h" + +ac_config_files="$ac_config_files Makefile" + +ac_config_files="$ac_config_files scripts/gmock-config" + + +# Initialize Automake with various options. We require at least v1.9, prevent +# pedantic complaints about package files, and enable various distribution +# targets. +am__api_version='1.14' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='gmock' + VERSION='1.7.0' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' + +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + + + + + + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi + +# Check for programs used in building Google Test. +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } +if ${ac_cv_cxx_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GXX=yes +else + GXX= +fi +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } +if ${ac_cv_prog_cxx_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes +else + CXXFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + +else + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CXX" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CXX_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac + + + +macro_version='2.4.2' +macro_revision='1.3337' + + + + + + + + + + + + + +ltmain="$ac_aux_dir/ltmain.sh" + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} + +case "$ECHO" in + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; +esac + + + + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if ${ac_cv_path_FGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_FGREP" || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_FGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_FGREP=$FGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" + + +test -z "$GREP" && GREP=grep + + + + + + + + + + + + + + + + + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if ${lt_cv_path_NM+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DUMPBIN" && break + done +fi +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in dumpbin "link -dump" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_DUMPBIN" && break +done + + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DUMPBIN=$ac_ct_DUMPBIN + fi +fi + + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi + + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if ${lt_cv_nm_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + +# find the maximum length of command line arguments +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if ${lt_cv_sys_max_cmd_len+:} false; then : + $as_echo_n "(cached) " >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } +fi +max_cmd_len=$lt_cv_sys_max_cmd_len + + + + + + +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 +$as_echo "$xsi_shell" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } +lt_shell_append=no +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 +$as_echo "$lt_shell_append" >&6; } + + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi + + + + + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if ${lt_cv_to_host_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if ${lt_cv_to_tool_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if ${lt_cv_ld_reload_flag+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if ${lt_cv_deplibs_check_method+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix[4-9]*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + + + + + + + + + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + + +if test -n "$ac_tool_prefix"; then + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AR" && break + done +fi +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_AR" && break +done + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +fi + +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if ${lt_cv_ar_at_file+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +test -z "$STRIP" && STRIP=: + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +test -z "$RANLIB" && RANLIB=: + + + + + + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" +fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if ${lt_cv_sys_global_symbol_pipe+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK '"\ +" {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +LT_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +$as_echo "failed" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } +fi + +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + + + + + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then : + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line '$LINENO' "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac + ;; + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if ${lt_cv_cc_needs_belf+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_cc_needs_belf=yes +else + lt_cv_cc_needs_belf=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + fi +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if ${lt_cv_path_mainfest_tool+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi + + + + + + + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DSYMUTIL=$ac_ct_DSYMUTIL + fi +else + DSYMUTIL="$ac_cv_prog_DSYMUTIL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_NMEDIT="nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NMEDIT=$ac_ct_NMEDIT + fi +else + NMEDIT="$ac_cv_prog_NMEDIT" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. +set dummy ${ac_tool_prefix}lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_LIPO="${ac_tool_prefix}lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_LIPO="lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LIPO=$ac_ct_LIPO + fi +else + LIPO="$ac_cv_prog_LIPO" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OTOOL="${ac_tool_prefix}otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. +set dummy otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OTOOL="otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL=$ac_ct_OTOOL + fi +else + OTOOL="$ac_cv_prog_OTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. +set dummy otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OTOOL64="otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL64=$ac_ct_OTOOL64 + fi +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if ${lt_cv_apple_cc_single_mod+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&5 + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if ${lt_cv_ld_exported_symbols_list+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_ld_exported_symbols_list=yes +else + lt_cv_ld_exported_symbols_list=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&5 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 +_ACEOF + +fi + +done + + + +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf + + + + + +# Set options + + + + enable_dlopen=no + + + enable_win32_dll=no + + + # Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then : + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi + + + + + + + + + + # Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=yes +fi + + + + + + + + + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then : + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + pic_mode=default +fi + + +test -z "$pic_mode" && pic_mode=default + + + + + + + + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then : + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi + + + + + + + + + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +test -z "$LN_S" && LN_S="ln -s" + + + + + + + + + + + + + + +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if ${lt_cv_objdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +# Use C for the default configuration in the libtool script + +lt_save_CC="$CC" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + +if test -n "$compiler"; then + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + case $cc_basename in + nvcc*) + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; + *) + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + + + + + + + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static= + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl='-Xlinker ' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + esac + ;; + esac + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if ${lt_cv_prog_compiler_pic_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } + +if test x"$lt_cv_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi + + + + + + + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works=yes + fi + else + lt_cv_prog_compiler_static_works=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } + +if test x"$lt_cv_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag= + always_export_symbols=no + archive_cmds= + archive_expsym_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no + export_dynamic_flag_spec= + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic=no + hardcode_direct=no + hardcode_direct_absolute=no + hardcode_libdir_flag_spec= + hardcode_libdir_separator= + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + inherit_rpath=no + link_all_deplibs=unknown + module_cmds= + module_expsym_cmds= + old_archive_from_new_cmds= + old_archive_from_expsyms_cmds= + thread_safe_flag_spec= + whole_archive_flag_spec= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + linux* | k*bsd*-gnu | gnu*) + link_all_deplibs=no + ;; + esac + + ld_shlibs=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + export_dynamic_flag_spec='${wl}--export-all-symbols' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + haiku*) + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs=yes + ;; + + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + ld_shlibs=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_direct_absolute=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + file_list_spec='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + link_all_deplibs=no + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + export_dynamic_flag_spec='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + fi + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac + ;; + + darwin* | rhapsody*) + + + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + + else + whole_archive_flag_spec='' + fi + link_all_deplibs=yes + allow_undefined_flag="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else + ld_shlibs=no + fi + + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler__b=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -b" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler__b=yes + fi + else + lt_cv_prog_compiler__b=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +$as_echo "$lt_cv_prog_compiler__b" >&6; } + +if test x"$lt_cv_prog_compiler__b" = xyes; then + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' +fi + + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo (void) { return 0; } +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + inherit_rpath=yes + link_all_deplibs=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + archive_cmds_need_lc='no' + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-R,$libdir' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec='${wl}-Blargedynsym' + ;; + esac + fi + fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no + +with_gnu_ld=$with_gnu_ld + + + + + + + + + + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } + archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([A-Za-z]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[4-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[23].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[3-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + lt_cv_shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } + +if test "$hardcode_action" = relink || + test "$inherit_rpath" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = xyes; then : + lt_cv_dlopen="shl_load" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if ${ac_cv_lib_dld_shl_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_shl_load=yes +else + ac_cv_lib_dld_shl_load=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" +else + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if ${ac_cv_lib_svld_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_svld_dlopen=yes +else + ac_cv_lib_svld_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if ${ac_cv_lib_dld_dld_link+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_dld_link=yes +else + ac_cv_lib_dld_dld_link=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self_static+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + + + + + + + + + + + + + + + + +striplib= +old_striplib= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac +fi + + + + + + + + + + + + + # Report which library types will actually be built + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } + + + + +fi +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +CC="$lt_save_CC" + + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 +$as_echo_n "checking how to run the C++ preprocessor... " >&6; } +if test -z "$CXXCPP"; then + if ${ac_cv_prog_CXXCPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 +$as_echo "$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +else + _lt_caught_CXX_error=yes +fi + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +archive_cmds_need_lc_CXX=no +allow_undefined_flag_CXX= +always_export_symbols_CXX=no +archive_expsym_cmds_CXX= +compiler_needs_object_CXX=no +export_dynamic_flag_spec_CXX= +hardcode_direct_CXX=no +hardcode_direct_absolute_CXX=no +hardcode_libdir_flag_spec_CXX= +hardcode_libdir_separator_CXX= +hardcode_minus_L_CXX=no +hardcode_shlibpath_var_CXX=unsupported +hardcode_automatic_CXX=no +inherit_rpath_CXX=no +module_cmds_CXX= +module_expsym_cmds_CXX= +link_all_deplibs_CXX=unknown +old_archive_cmds_CXX=$old_archive_cmds +reload_flag_CXX=$reload_flag +reload_cmds_CXX=$reload_cmds +no_undefined_flag_CXX= +whole_archive_flag_spec_CXX= +enable_shared_with_static_runtimes_CXX=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + + # save warnings/boilerplate of simple test code + ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + + ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS + compiler=$CC + compiler_CXX=$CC + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` + + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' + else + lt_prog_compiler_no_builtin_flag_CXX= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_CXX= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + ld_shlibs_CXX=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_CXX='' + hardcode_direct_CXX=yes + hardcode_direct_absolute_CXX=yes + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + file_list_spec_CXX='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct_CXX=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_CXX=yes + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_libdir_separator_CXX= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + export_dynamic_flag_spec_CXX='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + always_export_symbols_CXX=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_CXX='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__CXX +fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + + archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_CXX="-z nodefs" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__CXX +fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_CXX=' ${wl}-bernotok' + allow_undefined_flag_CXX=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX='$convenience' + fi + archive_cmds_need_lc_CXX=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_CXX=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_CXX=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_CXX=' ' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=yes + file_list_spec_CXX='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' + enable_shared_with_static_runtimes_CXX=yes + # Don't use ranlib + old_postinstall_cmds_CXX='chmod 644 $oldlib' + postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_CXX=no + fi + ;; + esac + ;; + darwin* | rhapsody*) + + + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + + else + whole_archive_flag_spec_CXX='' + fi + link_all_deplibs_CXX=yes + allow_undefined_flag_CXX="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all + archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then + archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + + else + ld_shlibs_CXX=no + fi + + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + freebsd2.*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + ld_shlibs_CXX=no + ;; + + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes + ;; + + haiku*) + archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs_CXX=yes + ;; + + hpux9*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + export_dynamic_flag_spec_CXX='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + ;; + *) + hardcode_direct_CXX=yes + hardcode_direct_absolute_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + interix[3-9]*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + inherit_rpath_CXX=yes + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [1-5].* | *pgcpp\ [1-5].*) + prelink_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + old_archive_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' + archive_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 and above use weak symbols + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + ;; + xl* | mpixl* | bgxl*) + # IBM XL 8.0 on PPC, with GNU ld + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + hardcode_libdir_flag_spec_CXX='-R$libdir' + whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object_CXX=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + ld_shlibs_CXX=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + hardcode_direct_absolute_CXX=yes + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=func_echo_all + else + ld_shlibs_CXX=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + case $host in + osf3*) + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + ;; + *) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + ;; + esac + + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' + ;; + esac + link_all_deplibs_CXX=yes + + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + fi + + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_CXX='${wl}-z,text' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_CXX='${wl}-z,text' + allow_undefined_flag_CXX='${wl}-z,nodefs' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + export_dynamic_flag_spec_CXX='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ + '"$old_archive_cmds_CXX" + reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ + '"$reload_cmds_CXX" + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 +$as_echo "$ld_shlibs_CXX" >&6; } + test "$ld_shlibs_CXX" = no && can_build_shared=no + + GCC_CXX="$GXX" + LD_CXX="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + # Dependencies to place before and after the object being linked: +predep_objects_CXX= +postdep_objects_CXX= +predeps_CXX= +postdeps_CXX= +compiler_lib_search_path_CXX= + +cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF + + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; +esac + +if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case ${prev}${p} in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + fi + + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac + if test "$pre_test_object_deps_done" = no; then + case ${prev} in + -L | -R) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX="${prev}${p}" + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$postdeps_CXX"; then + postdeps_CXX="${prev}${p}" + else + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi + prev= + ;; + + *.lto.$objext) ;; # Ignore GCC LTO objects + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$predep_objects_CXX"; then + predep_objects_CXX="$p" + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX="$p" + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling CXX test program" +fi + +$RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS + +# PORTME: override above test on systems where it is broken +case $host_os in +interix[3-9]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + predep_objects_CXX= + postdep_objects_CXX= + postdeps_CXX= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC* | sunCC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac + + +case " $postdeps_CXX " in +*" -lc "*) archive_cmds_need_lc_CXX=no ;; +esac + compiler_lib_search_dirs_CXX= +if test -n "${compiler_lib_search_path_CXX}"; then + compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= + + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic_CXX='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_CXX='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= + ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static_CXX= + ;; + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_CXX=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_CXX='-fPIC -shared' + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + else + case $host_os in + aix[4-9]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + dgux*) + case $cc_basename in + ec++*) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + KCC*) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + lt_prog_compiler_static_CXX='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-qpic' + lt_prog_compiler_static_CXX='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_CXX='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx*) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc*) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi + +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_CXX= + ;; + *) + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } +lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } +if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works_CXX=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } + +if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; + esac +else + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no +fi + +fi + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works_CXX=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works_CXX=yes + fi + else + lt_cv_prog_compiler_static_works_CXX=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } + +if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then + : +else + lt_prog_compiler_static_CXX= +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } + + + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + case $host_os in + aix[4-9]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global defined + # symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" + ;; + cygwin* | mingw* | cegcc*) + case $cc_basename in + cl*) + exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + ;; + esac + ;; + linux* | k*bsd*-gnu | gnu*) + link_all_deplibs_CXX=no + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 +$as_echo "$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no + +with_gnu_ld_CXX=$with_gnu_ld + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_CXX" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_CXX=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_CXX in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc_CXX=no + else + lt_cv_archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } + archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[4-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[23].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[3-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + lt_cv_shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action_CXX= +if test -n "$hardcode_libdir_flag_spec_CXX" || + test -n "$runpath_var_CXX" || + test "X$hardcode_automatic_CXX" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct_CXX" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && + test "$hardcode_minus_L_CXX" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_CXX=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_CXX=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_CXX=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 +$as_echo "$hardcode_action_CXX" >&6; } + +if test "$hardcode_action_CXX" = relink || + test "$inherit_rpath_CXX" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + + fi # test -n "$compiler" + + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + + + + + + + + + + + + + + ac_config_commands="$ac_config_commands libtool" + + + + +# Only expand once: + + + +# TODO(chandlerc@google.com): Currently we aren't running the Python tests +# against the interpreter detected by AM_PATH_PYTHON, and so we condition +# HAVE_PYTHON by requiring "python" to be in the PATH, and that interpreter's +# version to be >= 2.3. This will allow the scripts to use a "/usr/bin/env" +# hashbang. +PYTHON= # We *do not* allow the user to specify a python interpreter +# Extract the first word of "python", so it can be a program name with args. +set dummy python; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PYTHON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PYTHON" && ac_cv_path_PYTHON=":" + ;; +esac +fi +PYTHON=$ac_cv_path_PYTHON +if test -n "$PYTHON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test "$PYTHON" != ":"; then : + prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '2.3'.split('.'))) + [0, 0, 0] +minverhex = 0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] +sys.exit(sys.hexversion < minverhex)" + if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5 + ($PYTHON -c "$prog") >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then : + : +else + PYTHON=":" +fi +fi + if test "$PYTHON" != ":"; then + HAVE_PYTHON_TRUE= + HAVE_PYTHON_FALSE='#' +else + HAVE_PYTHON_TRUE='#' + HAVE_PYTHON_FALSE= +fi + + +# TODO(chandlerc@google.com) Check for the necessary system headers. + +# Configure pthreads. + +# Check whether --with-pthreads was given. +if test "${with_pthreads+set}" = set; then : + withval=$with_pthreads; with_pthreads=$withval +else + with_pthreads=check +fi + + +have_pthreads=no +if test "x$with_pthreads" != "xno"; then : + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +acx_pthread_ok=no + +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on True64 or Sequent). +# It gets checked for in the link test anyway. + +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 +$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_join (); +int +main () +{ +return pthread_join (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + acx_pthread_ok=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5 +$as_echo "$acx_pthread_ok" >&6; } + if test x"$acx_pthread_ok" = xno; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" +fi + +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). + +# Create a list of thread flags to try. Items starting with a "-" are +# C compiler flags, and other items are library names, except for "none" +# which indicates that we try without any flags at all, and "pthread-config" +# which is a program returning the flags for the Pth emulation library. + +acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" + +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: + +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) +# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) +# -pthreads: Solaris/gcc +# -mthreads: Mingw32/gcc, Lynx/gcc +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads too; +# also defines -D_REENTRANT) +# ... -mt is also the pthreads flag for HP/aCC +# pthread: Linux, etcetera +# --thread-safe: KAI C++ +# pthread-config: use pthread-config program (for GNU Pth library) + +case "${host_cpu}-${host_os}" in + *solaris*) + + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (We need to link with -pthreads/-mt/ + # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather + # a function called by this macro, so we could check for that, but + # who knows whether they'll stub that too in a future libc.) So, + # we'll just look for -pthreads and -lpthread first: + + acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags" + ;; +esac + +if test x"$acx_pthread_ok" = xno; then +for flag in $acx_pthread_flags; do + + case $flag in + none) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 +$as_echo_n "checking whether pthreads work without any flags... " >&6; } + ;; + + -*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5 +$as_echo_n "checking whether pthreads work with $flag... " >&6; } + PTHREAD_CFLAGS="$flag" + ;; + + pthread-config) + # Extract the first word of "pthread-config", so it can be a program name with args. +set dummy pthread-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_acx_pthread_config+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$acx_pthread_config"; then + ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_acx_pthread_config="yes" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no" +fi +fi +acx_pthread_config=$ac_cv_prog_acx_pthread_config +if test -n "$acx_pthread_config"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5 +$as_echo "$acx_pthread_config" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test x"$acx_pthread_config" = xno; then continue; fi + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; + + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5 +$as_echo_n "checking for the pthreads library -l$flag... " >&6; } + PTHREAD_LIBS="-l$flag" + ;; + esac + + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +pthread_t th; pthread_join(th, 0); + pthread_attr_init(0); pthread_cleanup_push(0, 0); + pthread_create(0,0,0,0); pthread_cleanup_pop(0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + acx_pthread_ok=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5 +$as_echo "$acx_pthread_ok" >&6; } + if test "x$acx_pthread_ok" = xyes; then + break; + fi + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi + +# Various other checks: +if test "x$acx_pthread_ok" = xyes; then + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 +$as_echo_n "checking for joinable pthread attribute... " >&6; } + attr_name=unknown + for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +int attr=$attr; return attr; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + attr_name=$attr; break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5 +$as_echo "$attr_name" >&6; } + if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then + +cat >>confdefs.h <<_ACEOF +#define PTHREAD_CREATE_JOINABLE $attr_name +_ACEOF + + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5 +$as_echo_n "checking if more special flags are required for pthreads... " >&6; } + flag=no + case "${host_cpu}-${host_os}" in + *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; + *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5 +$as_echo "${flag}" >&6; } + if test "x$flag" != xno; then + PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" + fi + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + # More AIX lossage: must compile with xlc_r or cc_r + if test x"$GCC" != xyes; then + for ac_prog in xlc_r cc_r +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_PTHREAD_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$PTHREAD_CC"; then + ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_PTHREAD_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +PTHREAD_CC=$ac_cv_prog_PTHREAD_CC +if test -n "$PTHREAD_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 +$as_echo "$PTHREAD_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$PTHREAD_CC" && break +done +test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}" + + else + PTHREAD_CC=$CC + fi + + # The next part tries to detect GCC inconsistency with -shared on some + # architectures and systems. The problem is that in certain + # configurations, when -shared is specified, GCC "forgets" to + # internally use various flags which are still necessary. + + # + # Prepare the flags + # + save_CFLAGS="$CFLAGS" + save_LIBS="$LIBS" + save_CC="$CC" + + # Try with the flags determined by the earlier checks. + # + # -Wl,-z,defs forces link-time symbol resolution, so that the + # linking checks with -shared actually have any value + # + # FIXME: -fPIC is required for -shared on many architectures, + # so we specify it here, but the right way would probably be to + # properly detect whether it is actually required. + CFLAGS="-shared -fPIC -Wl,-z,defs $CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + CC="$PTHREAD_CC" + + # In order not to create several levels of indentation, we test + # the value of "$done" until we find the cure or run out of ideas. + done="no" + + # First, make sure the CFLAGS we added are actually accepted by our + # compiler. If not (and OS X's ld, for instance, does not accept -z), + # then we can't do this test. + if test x"$done" = xno; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to check for GCC pthread/shared inconsistencies" >&5 +$as_echo_n "checking whether to check for GCC pthread/shared inconsistencies... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +else + done=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + if test "x$done" = xyes ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + fi + + if test x"$done" = xno; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -pthread is sufficient with -shared" >&5 +$as_echo_n "checking whether -pthread is sufficient with -shared... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +pthread_t th; pthread_join(th, 0); + pthread_attr_init(0); pthread_cleanup_push(0, 0); + pthread_create(0,0,0,0); pthread_cleanup_pop(0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + done=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + if test "x$done" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + fi + + # + # Linux gcc on some architectures such as mips/mipsel forgets + # about -lpthread + # + if test x"$done" = xno; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lpthread fixes that" >&5 +$as_echo_n "checking whether -lpthread fixes that... " >&6; } + LIBS="-lpthread $PTHREAD_LIBS $save_LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +pthread_t th; pthread_join(th, 0); + pthread_attr_init(0); pthread_cleanup_push(0, 0); + pthread_create(0,0,0,0); pthread_cleanup_pop(0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + done=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + if test "x$done" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + PTHREAD_LIBS="-lpthread $PTHREAD_LIBS" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + fi + # + # FreeBSD 4.10 gcc forgets to use -lc_r instead of -lc + # + if test x"$done" = xno; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc_r fixes that" >&5 +$as_echo_n "checking whether -lc_r fixes that... " >&6; } + LIBS="-lc_r $PTHREAD_LIBS $save_LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +pthread_t th; pthread_join(th, 0); + pthread_attr_init(0); pthread_cleanup_push(0, 0); + pthread_create(0,0,0,0); pthread_cleanup_pop(0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + done=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + if test "x$done" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + PTHREAD_LIBS="-lc_r $PTHREAD_LIBS" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + fi + if test x"$done" = xno; then + # OK, we have run out of ideas + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Impossible to determine how to use pthreads with shared libraries" >&5 +$as_echo "$as_me: WARNING: Impossible to determine how to use pthreads with shared libraries" >&2;} + + # so it's not safe to assume that we may use pthreads + acx_pthread_ok=no + fi + + CFLAGS="$save_CFLAGS" + LIBS="$save_LIBS" + CC="$save_CC" +else + PTHREAD_CC="$CC" +fi + + + + + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x"$acx_pthread_ok" = xyes; then + +$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h + + : +else + acx_pthread_ok=no + if test "x$with_pthreads" != "xcheck"; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "--with-pthreads was specified, but unable to be used +See \`config.log' for more details" "$LINENO" 5; } +fi +fi +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + have_pthreads="$acx_pthread_ok" +fi + if test "x$have_pthreads" == "xyes"; then + HAVE_PTHREADS_TRUE= + HAVE_PTHREADS_FALSE='#' +else + HAVE_PTHREADS_TRUE='#' + HAVE_PTHREADS_FALSE= +fi + + + + +# GoogleMock currently has hard dependencies upon GoogleTest above and beyond +# running its own test suite, so we both provide our own version in +# a subdirectory and provide some logic to use a custom version or a system +# installed version. + +# Check whether --with-gtest was given. +if test "${with_gtest+set}" = set; then : + withval=$with_gtest; +else + with_gtest=yes +fi + +# Check whether --enable-external-gtest was given. +if test "${enable_external_gtest+set}" = set; then : + enableval=$enable_external_gtest; +else + enable_external_gtest=yes +fi + +if test "x$with_gtest" == "xno"; then : + as_fn_error $? "Support for GoogleTest was explicitly disabled. Currently GoogleMock has a hard +dependency upon GoogleTest to build, please provide a version, or allow +GoogleMock to use any installed version and fall back upon its internal +version." "$LINENO" 5 +fi + +# Setup various GTEST variables. TODO(chandlerc@google.com): When these are +# used below, they should be used such that any pre-existing values always +# trump values we set them to, so that they can be used to selectively override +# details of the detection process. + + + + + + +HAVE_BUILT_GTEST="no" + +GTEST_MIN_VERSION="1.7.0" + +if test "x${enable_external_gtest}" = "xyes"; then : + # Begin filling in variables as we are able. + if test "x${with_gtest}" != "xyes"; then : + if test -x "${with_gtest}/scripts/gtest-config"; then : + GTEST_CONFIG="${with_gtest}/scripts/gtest-config" +else + GTEST_CONFIG="${with_gtest}/bin/gtest-config" +fi + if test -x "${GTEST_CONFIG}"; then : + +else + as_fn_error $? "Unable to locate either a built or installed Google Test at '${with_gtest}'." "$LINENO" 5 + +fi +fi + + if test -x "${GTEST_CONFIG}"; then : + +else + # Extract the first word of "gtest-config", so it can be a program name with args. +set dummy gtest-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GTEST_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GTEST_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_GTEST_CONFIG="$GTEST_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GTEST_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +GTEST_CONFIG=$ac_cv_path_GTEST_CONFIG +if test -n "$GTEST_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTEST_CONFIG" >&5 +$as_echo "$GTEST_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi + if test -x "${GTEST_CONFIG}"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Google Test version >= ${GTEST_MIN_VERSION}" >&5 +$as_echo_n "checking for Google Test version >= ${GTEST_MIN_VERSION}... " >&6; } + if ${GTEST_CONFIG} --min-version=${GTEST_MIN_VERSION}; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_BUILT_GTEST="yes" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +fi +fi + + + +if test "x${HAVE_BUILT_GTEST}" = "xyes"; then : + GTEST_CPPFLAGS=`${GTEST_CONFIG} --cppflags` + GTEST_CXXFLAGS=`${GTEST_CONFIG} --cxxflags` + GTEST_LDFLAGS=`${GTEST_CONFIG} --ldflags` + GTEST_LIBS=`${GTEST_CONFIG} --libs` + GTEST_VERSION=`${GTEST_CONFIG} --version` +else + subdirs="$subdirs gtest" + + # GTEST_CONFIG needs to be executable both in a Makefile environmont and + # in a shell script environment, so resolve an absolute path for it here. + GTEST_CONFIG="`pwd -P`/gtest/scripts/gtest-config" + GTEST_CPPFLAGS='-I$(top_srcdir)/gtest/include' + GTEST_CXXFLAGS='-g' + GTEST_LDFLAGS='' + GTEST_LIBS='$(top_builddir)/gtest/lib/libgtest.la' + GTEST_VERSION="${GTEST_MIN_VERSION}" +fi + +# TODO(chandlerc@google.com) Check the types, structures, and other compiler +# and architecture characteristics. + +# Output the generated files. No further autoconf macros may be used. +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then + as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_PTHREADS_TRUE}" && test -z "${HAVE_PTHREADS_FALSE}"; then + as_fn_error $? "conditional \"HAVE_PTHREADS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by Google C++ Mocking Framework $as_me 1.7.0, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +Google C++ Mocking Framework config.status 1.7.0 +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2012 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' +enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' +pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' +ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' +host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' +host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' +host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' +build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' +build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' +build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' +SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' +Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' +GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' +EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' +FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' +LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' +NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' +LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' +ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' +exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' +lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' +reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' +AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' +STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' +RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' +lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' +CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' +compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' +GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' +objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' +need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' +LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' +libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' +module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' +version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' +runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' +libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' +soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' +install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' +finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' +old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' +striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' +predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' +postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' +predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' +postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' +LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' +reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' +reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' +compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' +GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' +archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' +module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' +with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' +no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' +inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' +link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' +always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' +exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' +include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' +prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' +postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' +file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' +predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' +postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' +predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' +postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' + +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in SHELL \ +ECHO \ +PATH_SEPARATOR \ +SED \ +GREP \ +EGREP \ +FGREP \ +LD \ +NM \ +LN_S \ +lt_SP2NL \ +lt_NL2SP \ +reload_flag \ +OBJDUMP \ +deplibs_check_method \ +file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +DLLTOOL \ +sharedlib_from_linklib_cmd \ +AR \ +AR_FLAGS \ +archiver_list_spec \ +STRIP \ +RANLIB \ +CC \ +CFLAGS \ +compiler \ +lt_cv_sys_global_symbol_pipe \ +lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_c_name_address \ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +nm_file_list_spec \ +lt_prog_compiler_no_builtin_flag \ +lt_prog_compiler_pic \ +lt_prog_compiler_wl \ +lt_prog_compiler_static \ +lt_cv_prog_compiler_c_o \ +need_locks \ +MANIFEST_TOOL \ +DSYMUTIL \ +NMEDIT \ +LIPO \ +OTOOL \ +OTOOL64 \ +shrext_cmds \ +export_dynamic_flag_spec \ +whole_archive_flag_spec \ +compiler_needs_object \ +with_gnu_ld \ +allow_undefined_flag \ +no_undefined_flag \ +hardcode_libdir_flag_spec \ +hardcode_libdir_separator \ +exclude_expsyms \ +include_expsyms \ +file_list_spec \ +variables_saved_for_relink \ +libname_spec \ +library_names_spec \ +soname_spec \ +install_override_mode \ +finish_eval \ +old_striplib \ +striplib \ +compiler_lib_search_dirs \ +predep_objects \ +postdep_objects \ +predeps \ +postdeps \ +compiler_lib_search_path \ +LD_CXX \ +reload_flag_CXX \ +compiler_CXX \ +lt_prog_compiler_no_builtin_flag_CXX \ +lt_prog_compiler_pic_CXX \ +lt_prog_compiler_wl_CXX \ +lt_prog_compiler_static_CXX \ +lt_cv_prog_compiler_c_o_CXX \ +export_dynamic_flag_spec_CXX \ +whole_archive_flag_spec_CXX \ +compiler_needs_object_CXX \ +with_gnu_ld_CXX \ +allow_undefined_flag_CXX \ +no_undefined_flag_CXX \ +hardcode_libdir_flag_spec_CXX \ +hardcode_libdir_separator_CXX \ +exclude_expsyms_CXX \ +include_expsyms_CXX \ +file_list_spec_CXX \ +compiler_lib_search_dirs_CXX \ +predep_objects_CXX \ +postdep_objects_CXX \ +predeps_CXX \ +postdeps_CXX \ +compiler_lib_search_path_CXX; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in reload_cmds \ +old_postinstall_cmds \ +old_postuninstall_cmds \ +old_archive_cmds \ +extract_expsyms_cmds \ +old_archive_from_new_cmds \ +old_archive_from_expsyms_cmds \ +archive_cmds \ +archive_expsym_cmds \ +module_cmds \ +module_expsym_cmds \ +export_symbols_cmds \ +prelink_cmds \ +postlink_cmds \ +postinstall_cmds \ +postuninstall_cmds \ +finish_cmds \ +sys_lib_search_path_spec \ +sys_lib_dlsearch_path_spec \ +reload_cmds_CXX \ +old_archive_cmds_CXX \ +old_archive_from_new_cmds_CXX \ +old_archive_from_expsyms_cmds_CXX \ +archive_cmds_CXX \ +archive_expsym_cmds_CXX \ +module_cmds_CXX \ +module_expsym_cmds_CXX \ +export_symbols_cmds_CXX \ +prelink_cmds_CXX \ +postlink_cmds_CXX; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +ac_aux_dir='$ac_aux_dir' +xsi_shell='$xsi_shell' +lt_shell_append='$lt_shell_append' + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + + + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile' + + + + + + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "build-aux/config.h") CONFIG_HEADERS="$CONFIG_HEADERS build-aux/config.h" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "scripts/gmock-config") CONFIG_FILES="$CONFIG_FILES scripts/gmock-config" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "scripts/gmock-config":F) chmod +x scripts/gmock-config ;; + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + "libtool":C) + + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +# The names of the tagged configurations supported by this script. +available_tags="CXX " + +# ### BEGIN LIBTOOL CONFIG + +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# What type of objects to build. +pic_mode=$pic_mode + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that protects backslashes. +ECHO=$lt_ECHO + +# The PATH separator for the build system. +PATH_SEPARATOR=$lt_PATH_SEPARATOR + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP=$lt_GREP + +# An ERE matcher. +EGREP=$lt_EGREP + +# A literal string matcher. +FGREP=$lt_FGREP + +# A BSD- or MS-compatible name lister. +NM=$lt_NM + +# Whether we need soft or hard links. +LN_S=$lt_LN_S + +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len + +# Object file suffix (normally "o"). +objext=$ac_objext + +# Executable file suffix (normally ""). +exeext=$exeext + +# whether the shell understands "unset". +lt_unset=$lt_unset + +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL + +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP + +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd + +# An object symbol dumper. +OBJDUMP=$lt_OBJDUMP + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method = "file_magic". +file_magic_cmd=$lt_file_magic_cmd + +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + +# The archiver. +AR=$lt_AR + +# Flags to create an archive. +AR_FLAGS=$lt_AR_FLAGS + +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + +# A symbol stripping program. +STRIP=$lt_STRIP + +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=$lock_old_archive_extraction + +# A C compiler. +LTCC=$lt_CC + +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec + +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL + +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 + +# Old archive suffix (normally "a"). +libext=$libext + +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink + +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Library versioning type. +version_type=$version_type + +# Shared library runtime path variable. +runpath_var=$runpath_var + +# Shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Permission mode override for installation of shared libraries. +install_override_mode=$lt_install_override_mode + +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + + +# The linker used to build libraries. +LD=$lt_LD + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds + +# A language specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU compiler? +with_gcc=$GCC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects +postdep_objects=$lt_postdep_objects +predeps=$lt_predeps +postdeps=$lt_postdeps + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path + +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + +ltmain="$ac_aux_dir/ltmain.sh" + + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi + + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + + + cat <<_LT_EOF >> "$ofile" + +# ### BEGIN LIBTOOL TAG CONFIG: CXX + +# The linker used to build libraries. +LD=$lt_LD_CXX + +# How to create reloadable object files. +reload_flag=$lt_reload_flag_CXX +reload_cmds=$lt_reload_cmds_CXX + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds_CXX + +# A language specific compiler. +CC=$lt_compiler_CXX + +# Is the compiler the GNU compiler? +with_gcc=$GCC_CXX + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object_CXX + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld_CXX + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct_CXX + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute_CXX + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic_CXX + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath_CXX + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds_CXX + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_CXX + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec_CXX + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects_CXX +postdep_objects=$lt_postdep_objects_CXX +predeps=$lt_predeps_CXX +postdeps=$lt_postdeps_CXX + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX + +# ### END LIBTOOL TAG CONFIG: CXX +_LT_EOF + + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi + +# +# CONFIG_SUBDIRS section. +# +if test "$no_recursion" != yes; then + + # Remove --cache-file, --srcdir, and --disable-option-checking arguments + # so they do not pile up. + ac_sub_configure_args= + ac_prev= + eval "set x $ac_configure_args" + shift + for ac_arg + do + if test -n "$ac_prev"; then + ac_prev= + continue + fi + case $ac_arg in + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ + | --c=*) + ;; + --config-cache | -C) + ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + ;; + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + ;; + --disable-option-checking) + ;; + *) + case $ac_arg in + *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append ac_sub_configure_args " '$ac_arg'" ;; + esac + done + + # Always prepend --prefix to ensure using the same prefix + # in subdir configurations. + ac_arg="--prefix=$prefix" + case $ac_arg in + *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" + + # Pass --silent + if test "$silent" = yes; then + ac_sub_configure_args="--silent $ac_sub_configure_args" + fi + + # Always prepend --disable-option-checking to silence warnings, since + # different subdirs can have different --enable and --with options. + ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" + + ac_popdir=`pwd` + for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue + + # Do not complain, so a configure script can configure whichever + # parts of a large source tree are present. + test -d "$srcdir/$ac_dir" || continue + + ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" + $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 + $as_echo "$ac_msg" >&6 + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + cd "$ac_dir" + + # Check for guested configure; otherwise get Cygnus style configure. + if test -f "$ac_srcdir/configure.gnu"; then + ac_sub_configure=$ac_srcdir/configure.gnu + elif test -f "$ac_srcdir/configure"; then + ac_sub_configure=$ac_srcdir/configure + elif test -f "$ac_srcdir/configure.in"; then + # This should be Cygnus configure. + ac_sub_configure=$ac_aux_dir/configure + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 +$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} + ac_sub_configure= + fi + + # The recursion is here. + if test -n "$ac_sub_configure"; then + # Make the cache file name correct relative to the subdirectory. + case $cache_file in + [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; + *) # Relative name. + ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 +$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} + # The eval makes quoting arguments work. + eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ + --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || + as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 + fi + + cd "$ac_popdir" + done +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + diff --git a/ceph/src/gmock/configure.ac b/ceph/src/gmock/configure.ac new file mode 100644 index 00000000..d268d5d7 --- /dev/null +++ b/ceph/src/gmock/configure.ac @@ -0,0 +1,146 @@ +m4_include(gtest/m4/acx_pthread.m4) + +AC_INIT([Google C++ Mocking Framework], + [1.7.0], + [googlemock@googlegroups.com], + [gmock]) + +# Provide various options to initialize the Autoconf and configure processes. +AC_PREREQ([2.59]) +AC_CONFIG_SRCDIR([./LICENSE]) +AC_CONFIG_AUX_DIR([build-aux]) +AC_CONFIG_HEADERS([build-aux/config.h]) +AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([scripts/gmock-config], [chmod +x scripts/gmock-config]) + +# Initialize Automake with various options. We require at least v1.9, prevent +# pedantic complaints about package files, and enable various distribution +# targets. +AM_INIT_AUTOMAKE([1.9 dist-bzip2 dist-zip foreign subdir-objects]) + +# Check for programs used in building Google Test. +AC_PROG_CC +AC_PROG_CXX +AC_LANG([C++]) +AC_PROG_LIBTOOL + +# TODO(chandlerc@google.com): Currently we aren't running the Python tests +# against the interpreter detected by AM_PATH_PYTHON, and so we condition +# HAVE_PYTHON by requiring "python" to be in the PATH, and that interpreter's +# version to be >= 2.3. This will allow the scripts to use a "/usr/bin/env" +# hashbang. +PYTHON= # We *do not* allow the user to specify a python interpreter +AC_PATH_PROG([PYTHON],[python],[:]) +AS_IF([test "$PYTHON" != ":"], + [AM_PYTHON_CHECK_VERSION([$PYTHON],[2.3],[:],[PYTHON=":"])]) +AM_CONDITIONAL([HAVE_PYTHON],[test "$PYTHON" != ":"]) + +# TODO(chandlerc@google.com) Check for the necessary system headers. + +# Configure pthreads. +AC_ARG_WITH([pthreads], + [AS_HELP_STRING([--with-pthreads], + [use pthreads (default is yes)])], + [with_pthreads=$withval], + [with_pthreads=check]) + +have_pthreads=no +AS_IF([test "x$with_pthreads" != "xno"], + [ACX_PTHREAD( + [], + [AS_IF([test "x$with_pthreads" != "xcheck"], + [AC_MSG_FAILURE( + [--with-pthreads was specified, but unable to be used])])]) + have_pthreads="$acx_pthread_ok"]) +AM_CONDITIONAL([HAVE_PTHREADS],[test "x$have_pthreads" == "xyes"]) +AC_SUBST(PTHREAD_CFLAGS) +AC_SUBST(PTHREAD_LIBS) + +# GoogleMock currently has hard dependencies upon GoogleTest above and beyond +# running its own test suite, so we both provide our own version in +# a subdirectory and provide some logic to use a custom version or a system +# installed version. +AC_ARG_WITH([gtest], + [AS_HELP_STRING([--with-gtest], + [Specifies how to find the gtest package. If no + arguments are given, the default behavior, a + system installed gtest will be used if present, + and an internal version built otherwise. If a + path is provided, the gtest built or installed at + that prefix will be used.])], + [], + [with_gtest=yes]) +AC_ARG_ENABLE([external-gtest], + [AS_HELP_STRING([--disable-external-gtest], + [Disables any detection or use of a system + installed or user provided gtest. Any option to + '--with-gtest' is ignored. (Default is enabled.)]) + ], [], [enable_external_gtest=yes]) +AS_IF([test "x$with_gtest" == "xno"], + [AC_MSG_ERROR([dnl +Support for GoogleTest was explicitly disabled. Currently GoogleMock has a hard +dependency upon GoogleTest to build, please provide a version, or allow +GoogleMock to use any installed version and fall back upon its internal +version.])]) + +# Setup various GTEST variables. TODO(chandlerc@google.com): When these are +# used below, they should be used such that any pre-existing values always +# trump values we set them to, so that they can be used to selectively override +# details of the detection process. +AC_ARG_VAR([GTEST_CONFIG], + [The exact path of Google Test's 'gtest-config' script.]) +AC_ARG_VAR([GTEST_CPPFLAGS], + [C-like preprocessor flags for Google Test.]) +AC_ARG_VAR([GTEST_CXXFLAGS], + [C++ compile flags for Google Test.]) +AC_ARG_VAR([GTEST_LDFLAGS], + [Linker path and option flags for Google Test.]) +AC_ARG_VAR([GTEST_LIBS], + [Library linking flags for Google Test.]) +AC_ARG_VAR([GTEST_VERSION], + [The version of Google Test available.]) +HAVE_BUILT_GTEST="no" + +GTEST_MIN_VERSION="1.7.0" + +AS_IF([test "x${enable_external_gtest}" = "xyes"], + [# Begin filling in variables as we are able. + AS_IF([test "x${with_gtest}" != "xyes"], + [AS_IF([test -x "${with_gtest}/scripts/gtest-config"], + [GTEST_CONFIG="${with_gtest}/scripts/gtest-config"], + [GTEST_CONFIG="${with_gtest}/bin/gtest-config"]) + AS_IF([test -x "${GTEST_CONFIG}"], [], + [AC_MSG_ERROR([dnl +Unable to locate either a built or installed Google Test at '${with_gtest}'.]) + ])]) + + AS_IF([test -x "${GTEST_CONFIG}"], [], + [AC_PATH_PROG([GTEST_CONFIG], [gtest-config])]) + AS_IF([test -x "${GTEST_CONFIG}"], + [AC_MSG_CHECKING([for Google Test version >= ${GTEST_MIN_VERSION}]) + AS_IF([${GTEST_CONFIG} --min-version=${GTEST_MIN_VERSION}], + [AC_MSG_RESULT([yes]) + HAVE_BUILT_GTEST="yes"], + [AC_MSG_RESULT([no])])])]) + +AS_IF([test "x${HAVE_BUILT_GTEST}" = "xyes"], + [GTEST_CPPFLAGS=`${GTEST_CONFIG} --cppflags` + GTEST_CXXFLAGS=`${GTEST_CONFIG} --cxxflags` + GTEST_LDFLAGS=`${GTEST_CONFIG} --ldflags` + GTEST_LIBS=`${GTEST_CONFIG} --libs` + GTEST_VERSION=`${GTEST_CONFIG} --version`], + [AC_CONFIG_SUBDIRS([gtest]) + # GTEST_CONFIG needs to be executable both in a Makefile environmont and + # in a shell script environment, so resolve an absolute path for it here. + GTEST_CONFIG="`pwd -P`/gtest/scripts/gtest-config" + GTEST_CPPFLAGS='-I$(top_srcdir)/gtest/include' + GTEST_CXXFLAGS='-g' + GTEST_LDFLAGS='' + GTEST_LIBS='$(top_builddir)/gtest/lib/libgtest.la' + GTEST_VERSION="${GTEST_MIN_VERSION}"]) + +# TODO(chandlerc@google.com) Check the types, structures, and other compiler +# and architecture characteristics. + +# Output the generated files. No further autoconf macros may be used. +AC_OUTPUT diff --git a/ceph/src/gmock/fused-src/gmock-gtest-all.cc b/ceph/src/gmock/fused-src/gmock-gtest-all.cc new file mode 100644 index 00000000..1a63a8ce --- /dev/null +++ b/ceph/src/gmock/fused-src/gmock-gtest-all.cc @@ -0,0 +1,11443 @@ +// Copyright 2008, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Author: mheule@google.com (Markus Heule) +// +// Google C++ Testing Framework (Google Test) +// +// Sometimes it's desirable to build Google Test by compiling a single file. +// This file serves this purpose. + +// This line ensures that gtest.h can be compiled on its own, even +// when it's fused. +#include "gtest/gtest.h" + +// The following lines pull in the real gtest *.cc files. +// Copyright 2005, 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. +// +// Author: wan@google.com (Zhanyong Wan) +// +// The Google C++ Testing Framework (Google Test) + +// Copyright 2007, 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. +// +// Author: wan@google.com (Zhanyong Wan) +// +// Utilities for testing Google Test itself and code that uses Google Test +// (e.g. frameworks built on top of Google Test). + +#ifndef GTEST_INCLUDE_GTEST_GTEST_SPI_H_ +#define GTEST_INCLUDE_GTEST_GTEST_SPI_H_ + + +namespace testing { + +// This helper class can be used to mock out Google Test failure reporting +// so that we can test Google Test or code that builds on Google Test. +// +// An object of this class appends a TestPartResult object to the +// TestPartResultArray object given in the constructor whenever a Google Test +// failure is reported. It can either intercept only failures that are +// generated in the same thread that created this object or it can intercept +// all generated failures. The scope of this mock object can be controlled with +// the second argument to the two arguments constructor. +class GTEST_API_ ScopedFakeTestPartResultReporter + : public TestPartResultReporterInterface { + public: + // The two possible mocking modes of this object. + enum InterceptMode { + INTERCEPT_ONLY_CURRENT_THREAD, // Intercepts only thread local failures. + INTERCEPT_ALL_THREADS // Intercepts all failures. + }; + + // The c'tor sets this object as the test part result reporter used + // by Google Test. The 'result' parameter specifies where to report the + // results. This reporter will only catch failures generated in the current + // thread. DEPRECATED + explicit ScopedFakeTestPartResultReporter(TestPartResultArray* result); + + // Same as above, but you can choose the interception scope of this object. + ScopedFakeTestPartResultReporter(InterceptMode intercept_mode, + TestPartResultArray* result); + + // The d'tor restores the previous test part result reporter. + virtual ~ScopedFakeTestPartResultReporter(); + + // Appends the TestPartResult object to the TestPartResultArray + // received in the constructor. + // + // This method is from the TestPartResultReporterInterface + // interface. + virtual void ReportTestPartResult(const TestPartResult& result); + private: + void Init(); + + const InterceptMode intercept_mode_; + TestPartResultReporterInterface* old_reporter_; + TestPartResultArray* const result_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedFakeTestPartResultReporter); +}; + +namespace internal { + +// A helper class for implementing EXPECT_FATAL_FAILURE() and +// EXPECT_NONFATAL_FAILURE(). Its destructor verifies that the given +// TestPartResultArray contains exactly one failure that has the given +// type and contains the given substring. If that's not the case, a +// non-fatal failure will be generated. +class GTEST_API_ SingleFailureChecker { + public: + // The constructor remembers the arguments. + SingleFailureChecker(const TestPartResultArray* results, + TestPartResult::Type type, + const string& substr); + ~SingleFailureChecker(); + private: + const TestPartResultArray* const results_; + const TestPartResult::Type type_; + const string substr_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(SingleFailureChecker); +}; + +} // namespace internal + +} // namespace testing + +// A set of macros for testing Google Test assertions or code that's expected +// to generate Google Test fatal failures. It verifies that the given +// statement will cause exactly one fatal Google Test failure with 'substr' +// being part of the failure message. +// +// There are two different versions of this macro. EXPECT_FATAL_FAILURE only +// affects and considers failures generated in the current thread and +// EXPECT_FATAL_FAILURE_ON_ALL_THREADS does the same but for all threads. +// +// The verification of the assertion is done correctly even when the statement +// throws an exception or aborts the current function. +// +// Known restrictions: +// - 'statement' cannot reference local non-static variables or +// non-static members of the current object. +// - 'statement' cannot return a value. +// - You cannot stream a failure message to this macro. +// +// Note that even though the implementations of the following two +// macros are much alike, we cannot refactor them to use a common +// helper macro, due to some peculiarity in how the preprocessor +// works. The AcceptsMacroThatExpandsToUnprotectedComma test in +// gtest_unittest.cc will fail to compile if we do that. +#define EXPECT_FATAL_FAILURE(statement, substr) \ + do { \ + class GTestExpectFatalFailureHelper {\ + public:\ + static void Execute() { statement; }\ + };\ + ::testing::TestPartResultArray gtest_failures;\ + ::testing::internal::SingleFailureChecker gtest_checker(\ + >est_failures, ::testing::TestPartResult::kFatalFailure, (substr));\ + {\ + ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\ + ::testing::ScopedFakeTestPartResultReporter:: \ + INTERCEPT_ONLY_CURRENT_THREAD, >est_failures);\ + GTestExpectFatalFailureHelper::Execute();\ + }\ + } while (::testing::internal::AlwaysFalse()) + +#define EXPECT_FATAL_FAILURE_ON_ALL_THREADS(statement, substr) \ + do { \ + class GTestExpectFatalFailureHelper {\ + public:\ + static void Execute() { statement; }\ + };\ + ::testing::TestPartResultArray gtest_failures;\ + ::testing::internal::SingleFailureChecker gtest_checker(\ + >est_failures, ::testing::TestPartResult::kFatalFailure, (substr));\ + {\ + ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\ + ::testing::ScopedFakeTestPartResultReporter:: \ + INTERCEPT_ALL_THREADS, >est_failures);\ + GTestExpectFatalFailureHelper::Execute();\ + }\ + } while (::testing::internal::AlwaysFalse()) + +// A macro for testing Google Test assertions or code that's expected to +// generate Google Test non-fatal failures. It asserts that the given +// statement will cause exactly one non-fatal Google Test failure with 'substr' +// being part of the failure message. +// +// There are two different versions of this macro. EXPECT_NONFATAL_FAILURE only +// affects and considers failures generated in the current thread and +// EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS does the same but for all threads. +// +// 'statement' is allowed to reference local variables and members of +// the current object. +// +// The verification of the assertion is done correctly even when the statement +// throws an exception or aborts the current function. +// +// Known restrictions: +// - You cannot stream a failure message to this macro. +// +// Note that even though the implementations of the following two +// macros are much alike, we cannot refactor them to use a common +// helper macro, due to some peculiarity in how the preprocessor +// works. If we do that, the code won't compile when the user gives +// EXPECT_NONFATAL_FAILURE() a statement that contains a macro that +// expands to code containing an unprotected comma. The +// AcceptsMacroThatExpandsToUnprotectedComma test in gtest_unittest.cc +// catches that. +// +// For the same reason, we have to write +// if (::testing::internal::AlwaysTrue()) { statement; } +// instead of +// GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement) +// to avoid an MSVC warning on unreachable code. +#define EXPECT_NONFATAL_FAILURE(statement, substr) \ + do {\ + ::testing::TestPartResultArray gtest_failures;\ + ::testing::internal::SingleFailureChecker gtest_checker(\ + >est_failures, ::testing::TestPartResult::kNonFatalFailure, \ + (substr));\ + {\ + ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\ + ::testing::ScopedFakeTestPartResultReporter:: \ + INTERCEPT_ONLY_CURRENT_THREAD, >est_failures);\ + if (::testing::internal::AlwaysTrue()) { statement; }\ + }\ + } while (::testing::internal::AlwaysFalse()) + +#define EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS(statement, substr) \ + do {\ + ::testing::TestPartResultArray gtest_failures;\ + ::testing::internal::SingleFailureChecker gtest_checker(\ + >est_failures, ::testing::TestPartResult::kNonFatalFailure, \ + (substr));\ + {\ + ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\ + ::testing::ScopedFakeTestPartResultReporter::INTERCEPT_ALL_THREADS, \ + >est_failures);\ + if (::testing::internal::AlwaysTrue()) { statement; }\ + }\ + } while (::testing::internal::AlwaysFalse()) + +#endif // GTEST_INCLUDE_GTEST_GTEST_SPI_H_ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include // NOLINT +#include +#include + +#if GTEST_OS_LINUX + +// TODO(kenton@google.com): Use autoconf to detect availability of +// gettimeofday(). +# define GTEST_HAS_GETTIMEOFDAY_ 1 + +# include // NOLINT +# include // NOLINT +# include // NOLINT +// Declares vsnprintf(). This header is not available on Windows. +# include // NOLINT +# include // NOLINT +# include // NOLINT +# include // NOLINT +# include + +#elif GTEST_OS_SYMBIAN +# define GTEST_HAS_GETTIMEOFDAY_ 1 +# include // NOLINT + +#elif GTEST_OS_ZOS +# define GTEST_HAS_GETTIMEOFDAY_ 1 +# include // NOLINT + +// On z/OS we additionally need strings.h for strcasecmp. +# include // NOLINT + +#elif GTEST_OS_WINDOWS_MOBILE // We are on Windows CE. + +# include // NOLINT + +#elif GTEST_OS_WINDOWS // We are on Windows proper. + +# include // NOLINT +# include // NOLINT +# include // NOLINT +# include // NOLINT + +# if GTEST_OS_WINDOWS_MINGW +// MinGW has gettimeofday() but not _ftime64(). +// TODO(kenton@google.com): Use autoconf to detect availability of +// gettimeofday(). +// TODO(kenton@google.com): There are other ways to get the time on +// Windows, like GetTickCount() or GetSystemTimeAsFileTime(). MinGW +// supports these. consider using them instead. +# define GTEST_HAS_GETTIMEOFDAY_ 1 +# include // NOLINT +# endif // GTEST_OS_WINDOWS_MINGW + +// cpplint thinks that the header is already included, so we want to +// silence it. +# include // NOLINT + +#else + +// Assume other platforms have gettimeofday(). +// TODO(kenton@google.com): Use autoconf to detect availability of +// gettimeofday(). +# define GTEST_HAS_GETTIMEOFDAY_ 1 + +// cpplint thinks that the header is already included, so we want to +// silence it. +# include // NOLINT +# include // NOLINT + +#endif // GTEST_OS_LINUX + +#if GTEST_HAS_EXCEPTIONS +# include +#endif + +#if GTEST_CAN_STREAM_RESULTS_ +# include // NOLINT +# include // NOLINT +#endif + +// Indicates that this translation unit is part of Google Test's +// implementation. It must come before gtest-internal-inl.h is +// included, or there will be a compiler error. This trick is to +// prevent a user from accidentally including gtest-internal-inl.h in +// his code. +#define GTEST_IMPLEMENTATION_ 1 +// Copyright 2005, 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. + +// Utility functions and classes used by the Google C++ testing framework. +// +// Author: wan@google.com (Zhanyong Wan) +// +// This file contains purely Google Test's internal implementation. Please +// DO NOT #INCLUDE IT IN A USER PROGRAM. + +#ifndef GTEST_SRC_GTEST_INTERNAL_INL_H_ +#define GTEST_SRC_GTEST_INTERNAL_INL_H_ + +// GTEST_IMPLEMENTATION_ is defined to 1 iff the current translation unit is +// part of Google Test's implementation; otherwise it's undefined. +#if !GTEST_IMPLEMENTATION_ +// A user is trying to include this from his code - just say no. +# error "gtest-internal-inl.h is part of Google Test's internal implementation." +# error "It must not be included except by Google Test itself." +#endif // GTEST_IMPLEMENTATION_ + +#ifndef _WIN32_WCE +# include +#endif // !_WIN32_WCE +#include +#include // For strtoll/_strtoul64/malloc/free. +#include // For memmove. + +#include +#include +#include + + +#if GTEST_CAN_STREAM_RESULTS_ +# include // NOLINT +# include // NOLINT +#endif + +#if GTEST_OS_WINDOWS +# include // NOLINT +#endif // GTEST_OS_WINDOWS + + +namespace testing { + +// Declares the flags. +// +// We don't want the users to modify this flag in the code, but want +// Google Test's own unit tests to be able to access it. Therefore we +// declare it here as opposed to in gtest.h. +GTEST_DECLARE_bool_(death_test_use_fork); + +namespace internal { + +// The value of GetTestTypeId() as seen from within the Google Test +// library. This is solely for testing GetTestTypeId(). +GTEST_API_ extern const TypeId kTestTypeIdInGoogleTest; + +// Names of the flags (needed for parsing Google Test flags). +const char kAlsoRunDisabledTestsFlag[] = "also_run_disabled_tests"; +const char kBreakOnFailureFlag[] = "break_on_failure"; +const char kCatchExceptionsFlag[] = "catch_exceptions"; +const char kColorFlag[] = "color"; +const char kFilterFlag[] = "filter"; +const char kListTestsFlag[] = "list_tests"; +const char kOutputFlag[] = "output"; +const char kPrintTimeFlag[] = "print_time"; +const char kRandomSeedFlag[] = "random_seed"; +const char kRepeatFlag[] = "repeat"; +const char kShuffleFlag[] = "shuffle"; +const char kStackTraceDepthFlag[] = "stack_trace_depth"; +const char kStreamResultToFlag[] = "stream_result_to"; +const char kThrowOnFailureFlag[] = "throw_on_failure"; + +// A valid random seed must be in [1, kMaxRandomSeed]. +const int kMaxRandomSeed = 99999; + +// g_help_flag is true iff the --help flag or an equivalent form is +// specified on the command line. +GTEST_API_ extern bool g_help_flag; + +// Returns the current time in milliseconds. +GTEST_API_ TimeInMillis GetTimeInMillis(); + +// Returns true iff Google Test should use colors in the output. +GTEST_API_ bool ShouldUseColor(bool stdout_is_tty); + +// Formats the given time in milliseconds as seconds. +GTEST_API_ std::string FormatTimeInMillisAsSeconds(TimeInMillis ms); + +// Converts the given time in milliseconds to a date string in the ISO 8601 +// format, without the timezone information. N.B.: due to the use the +// non-reentrant localtime() function, this function is not thread safe. Do +// not use it in any code that can be called from multiple threads. +GTEST_API_ std::string FormatEpochTimeInMillisAsIso8601(TimeInMillis ms); + +// Parses a string for an Int32 flag, in the form of "--flag=value". +// +// On success, stores the value of the flag in *value, and returns +// true. On failure, returns false without changing *value. +GTEST_API_ bool ParseInt32Flag( + const char* str, const char* flag, Int32* value); + +// Returns a random seed in range [1, kMaxRandomSeed] based on the +// given --gtest_random_seed flag value. +inline int GetRandomSeedFromFlag(Int32 random_seed_flag) { + const unsigned int raw_seed = (random_seed_flag == 0) ? + static_cast(GetTimeInMillis()) : + static_cast(random_seed_flag); + + // Normalizes the actual seed to range [1, kMaxRandomSeed] such that + // it's easy to type. + const int normalized_seed = + static_cast((raw_seed - 1U) % + static_cast(kMaxRandomSeed)) + 1; + return normalized_seed; +} + +// Returns the first valid random seed after 'seed'. The behavior is +// undefined if 'seed' is invalid. The seed after kMaxRandomSeed is +// considered to be 1. +inline int GetNextRandomSeed(int seed) { + GTEST_CHECK_(1 <= seed && seed <= kMaxRandomSeed) + << "Invalid random seed " << seed << " - must be in [1, " + << kMaxRandomSeed << "]."; + const int next_seed = seed + 1; + return (next_seed > kMaxRandomSeed) ? 1 : next_seed; +} + +// This class saves the values of all Google Test flags in its c'tor, and +// restores them in its d'tor. +class GTestFlagSaver { + public: + // The c'tor. + GTestFlagSaver() { + also_run_disabled_tests_ = GTEST_FLAG(also_run_disabled_tests); + break_on_failure_ = GTEST_FLAG(break_on_failure); + catch_exceptions_ = GTEST_FLAG(catch_exceptions); + color_ = GTEST_FLAG(color); + death_test_style_ = GTEST_FLAG(death_test_style); + death_test_use_fork_ = GTEST_FLAG(death_test_use_fork); + filter_ = GTEST_FLAG(filter); + internal_run_death_test_ = GTEST_FLAG(internal_run_death_test); + list_tests_ = GTEST_FLAG(list_tests); + output_ = GTEST_FLAG(output); + print_time_ = GTEST_FLAG(print_time); + random_seed_ = GTEST_FLAG(random_seed); + repeat_ = GTEST_FLAG(repeat); + shuffle_ = GTEST_FLAG(shuffle); + stack_trace_depth_ = GTEST_FLAG(stack_trace_depth); + stream_result_to_ = GTEST_FLAG(stream_result_to); + throw_on_failure_ = GTEST_FLAG(throw_on_failure); + } + + // The d'tor is not virtual. DO NOT INHERIT FROM THIS CLASS. + ~GTestFlagSaver() { + GTEST_FLAG(also_run_disabled_tests) = also_run_disabled_tests_; + GTEST_FLAG(break_on_failure) = break_on_failure_; + GTEST_FLAG(catch_exceptions) = catch_exceptions_; + GTEST_FLAG(color) = color_; + GTEST_FLAG(death_test_style) = death_test_style_; + GTEST_FLAG(death_test_use_fork) = death_test_use_fork_; + GTEST_FLAG(filter) = filter_; + GTEST_FLAG(internal_run_death_test) = internal_run_death_test_; + GTEST_FLAG(list_tests) = list_tests_; + GTEST_FLAG(output) = output_; + GTEST_FLAG(print_time) = print_time_; + GTEST_FLAG(random_seed) = random_seed_; + GTEST_FLAG(repeat) = repeat_; + GTEST_FLAG(shuffle) = shuffle_; + GTEST_FLAG(stack_trace_depth) = stack_trace_depth_; + GTEST_FLAG(stream_result_to) = stream_result_to_; + GTEST_FLAG(throw_on_failure) = throw_on_failure_; + } + + private: + // Fields for saving the original values of flags. + bool also_run_disabled_tests_; + bool break_on_failure_; + bool catch_exceptions_; + std::string color_; + std::string death_test_style_; + bool death_test_use_fork_; + std::string filter_; + std::string internal_run_death_test_; + bool list_tests_; + std::string output_; + bool print_time_; + internal::Int32 random_seed_; + internal::Int32 repeat_; + bool shuffle_; + internal::Int32 stack_trace_depth_; + std::string stream_result_to_; + bool throw_on_failure_; +} GTEST_ATTRIBUTE_UNUSED_; + +// Converts a Unicode code point to a narrow string in UTF-8 encoding. +// code_point parameter is of type UInt32 because wchar_t may not be +// wide enough to contain a code point. +// If the code_point is not a valid Unicode code point +// (i.e. outside of Unicode range U+0 to U+10FFFF) it will be converted +// to "(Invalid Unicode 0xXXXXXXXX)". +GTEST_API_ std::string CodePointToUtf8(UInt32 code_point); + +// Converts a wide string to a narrow string in UTF-8 encoding. +// The wide string is assumed to have the following encoding: +// UTF-16 if sizeof(wchar_t) == 2 (on Windows, Cygwin, Symbian OS) +// UTF-32 if sizeof(wchar_t) == 4 (on Linux) +// Parameter str points to a null-terminated wide string. +// Parameter num_chars may additionally limit the number +// of wchar_t characters processed. -1 is used when the entire string +// should be processed. +// If the string contains code points that are not valid Unicode code points +// (i.e. outside of Unicode range U+0 to U+10FFFF) they will be output +// as '(Invalid Unicode 0xXXXXXXXX)'. If the string is in UTF16 encoding +// and contains invalid UTF-16 surrogate pairs, values in those pairs +// will be encoded as individual Unicode characters from Basic Normal Plane. +GTEST_API_ std::string WideStringToUtf8(const wchar_t* str, int num_chars); + +// Reads the GTEST_SHARD_STATUS_FILE environment variable, and creates the file +// if the variable is present. If a file already exists at this location, this +// function will write over it. If the variable is present, but the file cannot +// be created, prints an error and exits. +void WriteToShardStatusFileIfNeeded(); + +// Checks whether sharding is enabled by examining the relevant +// environment variable values. If the variables are present, +// but inconsistent (e.g., shard_index >= total_shards), prints +// an error and exits. If in_subprocess_for_death_test, sharding is +// disabled because it must only be applied to the original test +// process. Otherwise, we could filter out death tests we intended to execute. +GTEST_API_ bool ShouldShard(const char* total_shards_str, + const char* shard_index_str, + bool in_subprocess_for_death_test); + +// Parses the environment variable var as an Int32. If it is unset, +// returns default_val. If it is not an Int32, prints an error and +// and aborts. +GTEST_API_ Int32 Int32FromEnvOrDie(const char* env_var, Int32 default_val); + +// Given the total number of shards, the shard index, and the test id, +// returns true iff the test should be run on this shard. The test id is +// some arbitrary but unique non-negative integer assigned to each test +// method. Assumes that 0 <= shard_index < total_shards. +GTEST_API_ bool ShouldRunTestOnShard( + int total_shards, int shard_index, int test_id); + +// STL container utilities. + +// Returns the number of elements in the given container that satisfy +// the given predicate. +template +inline int CountIf(const Container& c, Predicate predicate) { + // Implemented as an explicit loop since std::count_if() in libCstd on + // Solaris has a non-standard signature. + int count = 0; + for (typename Container::const_iterator it = c.begin(); it != c.end(); ++it) { + if (predicate(*it)) + ++count; + } + return count; +} + +// Applies a function/functor to each element in the container. +template +void ForEach(const Container& c, Functor functor) { + std::for_each(c.begin(), c.end(), functor); +} + +// Returns the i-th element of the vector, or default_value if i is not +// in range [0, v.size()). +template +inline E GetElementOr(const std::vector& v, int i, E default_value) { + return (i < 0 || i >= static_cast(v.size())) ? default_value : v[i]; +} + +// Performs an in-place shuffle of a range of the vector's elements. +// 'begin' and 'end' are element indices as an STL-style range; +// i.e. [begin, end) are shuffled, where 'end' == size() means to +// shuffle to the end of the vector. +template +void ShuffleRange(internal::Random* random, int begin, int end, + std::vector* v) { + const int size = static_cast(v->size()); + GTEST_CHECK_(0 <= begin && begin <= size) + << "Invalid shuffle range start " << begin << ": must be in range [0, " + << size << "]."; + GTEST_CHECK_(begin <= end && end <= size) + << "Invalid shuffle range finish " << end << ": must be in range [" + << begin << ", " << size << "]."; + + // Fisher-Yates shuffle, from + // http://en.wikipedia.org/wiki/Fisher-Yates_shuffle + for (int range_width = end - begin; range_width >= 2; range_width--) { + const int last_in_range = begin + range_width - 1; + const int selected = begin + random->Generate(range_width); + std::swap((*v)[selected], (*v)[last_in_range]); + } +} + +// Performs an in-place shuffle of the vector's elements. +template +inline void Shuffle(internal::Random* random, std::vector* v) { + ShuffleRange(random, 0, static_cast(v->size()), v); +} + +// A function for deleting an object. Handy for being used as a +// functor. +template +static void Delete(T* x) { + delete x; +} + +// A predicate that checks the key of a TestProperty against a known key. +// +// TestPropertyKeyIs is copyable. +class TestPropertyKeyIs { + public: + // Constructor. + // + // TestPropertyKeyIs has NO default constructor. + explicit TestPropertyKeyIs(const std::string& key) : key_(key) {} + + // Returns true iff the test name of test property matches on key_. + bool operator()(const TestProperty& test_property) const { + return test_property.key() == key_; + } + + private: + std::string key_; +}; + +// Class UnitTestOptions. +// +// This class contains functions for processing options the user +// specifies when running the tests. It has only static members. +// +// In most cases, the user can specify an option using either an +// environment variable or a command line flag. E.g. you can set the +// test filter using either GTEST_FILTER or --gtest_filter. If both +// the variable and the flag are present, the latter overrides the +// former. +class GTEST_API_ UnitTestOptions { + public: + // Functions for processing the gtest_output flag. + + // Returns the output format, or "" for normal printed output. + static std::string GetOutputFormat(); + + // Returns the absolute path of the requested output file, or the + // default (test_detail.xml in the original working directory) if + // none was explicitly specified. + static std::string GetAbsolutePathToOutputFile(); + + // Functions for processing the gtest_filter flag. + + // Returns true iff the wildcard pattern matches the string. The + // first ':' or '\0' character in pattern marks the end of it. + // + // This recursive algorithm isn't very efficient, but is clear and + // works well enough for matching test names, which are short. + static bool PatternMatchesString(const char *pattern, const char *str); + + // Returns true iff the user-specified filter matches the test case + // name and the test name. + static bool FilterMatchesTest(const std::string &test_case_name, + const std::string &test_name); + +#if GTEST_OS_WINDOWS + // Function for supporting the gtest_catch_exception flag. + + // Returns EXCEPTION_EXECUTE_HANDLER if Google Test should handle the + // given SEH exception, or EXCEPTION_CONTINUE_SEARCH otherwise. + // This function is useful as an __except condition. + static int GTestShouldProcessSEH(DWORD exception_code); +#endif // GTEST_OS_WINDOWS + + // Returns true if "name" matches the ':' separated list of glob-style + // filters in "filter". + static bool MatchesFilter(const std::string& name, const char* filter); +}; + +// Returns the current application's name, removing directory path if that +// is present. Used by UnitTestOptions::GetOutputFile. +GTEST_API_ FilePath GetCurrentExecutableName(); + +// The role interface for getting the OS stack trace as a string. +class OsStackTraceGetterInterface { + public: + OsStackTraceGetterInterface() {} + virtual ~OsStackTraceGetterInterface() {} + + // Returns the current OS stack trace as an std::string. Parameters: + // + // max_depth - the maximum number of stack frames to be included + // in the trace. + // skip_count - the number of top frames to be skipped; doesn't count + // against max_depth. + virtual string CurrentStackTrace(int max_depth, int skip_count) = 0; + + // UponLeavingGTest() should be called immediately before Google Test calls + // user code. It saves some information about the current stack that + // CurrentStackTrace() will use to find and hide Google Test stack frames. + virtual void UponLeavingGTest() = 0; + + private: + GTEST_DISALLOW_COPY_AND_ASSIGN_(OsStackTraceGetterInterface); +}; + +// A working implementation of the OsStackTraceGetterInterface interface. +class OsStackTraceGetter : public OsStackTraceGetterInterface { + public: + OsStackTraceGetter() : caller_frame_(NULL) {} + + virtual string CurrentStackTrace(int max_depth, int skip_count) + GTEST_LOCK_EXCLUDED_(mutex_); + + virtual void UponLeavingGTest() GTEST_LOCK_EXCLUDED_(mutex_); + + // This string is inserted in place of stack frames that are part of + // Google Test's implementation. + static const char* const kElidedFramesMarker; + + private: + Mutex mutex_; // protects all internal state + + // We save the stack frame below the frame that calls user code. + // We do this because the address of the frame immediately below + // the user code changes between the call to UponLeavingGTest() + // and any calls to CurrentStackTrace() from within the user code. + void* caller_frame_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(OsStackTraceGetter); +}; + +// Information about a Google Test trace point. +struct TraceInfo { + const char* file; + int line; + std::string message; +}; + +// This is the default global test part result reporter used in UnitTestImpl. +// This class should only be used by UnitTestImpl. +class DefaultGlobalTestPartResultReporter + : public TestPartResultReporterInterface { + public: + explicit DefaultGlobalTestPartResultReporter(UnitTestImpl* unit_test); + // Implements the TestPartResultReporterInterface. Reports the test part + // result in the current test. + virtual void ReportTestPartResult(const TestPartResult& result); + + private: + UnitTestImpl* const unit_test_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(DefaultGlobalTestPartResultReporter); +}; + +// This is the default per thread test part result reporter used in +// UnitTestImpl. This class should only be used by UnitTestImpl. +class DefaultPerThreadTestPartResultReporter + : public TestPartResultReporterInterface { + public: + explicit DefaultPerThreadTestPartResultReporter(UnitTestImpl* unit_test); + // Implements the TestPartResultReporterInterface. The implementation just + // delegates to the current global test part result reporter of *unit_test_. + virtual void ReportTestPartResult(const TestPartResult& result); + + private: + UnitTestImpl* const unit_test_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(DefaultPerThreadTestPartResultReporter); +}; + +// The private implementation of the UnitTest class. We don't protect +// the methods under a mutex, as this class is not accessible by a +// user and the UnitTest class that delegates work to this class does +// proper locking. +class GTEST_API_ UnitTestImpl { + public: + explicit UnitTestImpl(UnitTest* parent); + virtual ~UnitTestImpl(); + + // There are two different ways to register your own TestPartResultReporter. + // You can register your own repoter to listen either only for test results + // from the current thread or for results from all threads. + // By default, each per-thread test result repoter just passes a new + // TestPartResult to the global test result reporter, which registers the + // test part result for the currently running test. + + // Returns the global test part result reporter. + TestPartResultReporterInterface* GetGlobalTestPartResultReporter(); + + // Sets the global test part result reporter. + void SetGlobalTestPartResultReporter( + TestPartResultReporterInterface* reporter); + + // Returns the test part result reporter for the current thread. + TestPartResultReporterInterface* GetTestPartResultReporterForCurrentThread(); + + // Sets the test part result reporter for the current thread. + void SetTestPartResultReporterForCurrentThread( + TestPartResultReporterInterface* reporter); + + // Gets the number of successful test cases. + int successful_test_case_count() const; + + // Gets the number of failed test cases. + int failed_test_case_count() const; + + // Gets the number of all test cases. + int total_test_case_count() const; + + // Gets the number of all test cases that contain at least one test + // that should run. + int test_case_to_run_count() const; + + // Gets the number of successful tests. + int successful_test_count() const; + + // Gets the number of failed tests. + int failed_test_count() const; + + // Gets the number of disabled tests that will be reported in the XML report. + int reportable_disabled_test_count() const; + + // Gets the number of disabled tests. + int disabled_test_count() const; + + // Gets the number of tests to be printed in the XML report. + int reportable_test_count() const; + + // Gets the number of all tests. + int total_test_count() const; + + // Gets the number of tests that should run. + int test_to_run_count() const; + + // Gets the time of the test program start, in ms from the start of the + // UNIX epoch. + TimeInMillis start_timestamp() const { return start_timestamp_; } + + // Gets the elapsed time, in milliseconds. + TimeInMillis elapsed_time() const { return elapsed_time_; } + + // Returns true iff the unit test passed (i.e. all test cases passed). + bool Passed() const { return !Failed(); } + + // Returns true iff the unit test failed (i.e. some test case failed + // or something outside of all tests failed). + bool Failed() const { + return failed_test_case_count() > 0 || ad_hoc_test_result()->Failed(); + } + + // Gets the i-th test case among all the test cases. i can range from 0 to + // total_test_case_count() - 1. If i is not in that range, returns NULL. + const TestCase* GetTestCase(int i) const { + const int index = GetElementOr(test_case_indices_, i, -1); + return index < 0 ? NULL : test_cases_[i]; + } + + // Gets the i-th test case among all the test cases. i can range from 0 to + // total_test_case_count() - 1. If i is not in that range, returns NULL. + TestCase* GetMutableTestCase(int i) { + const int index = GetElementOr(test_case_indices_, i, -1); + return index < 0 ? NULL : test_cases_[index]; + } + + // Provides access to the event listener list. + TestEventListeners* listeners() { return &listeners_; } + + // Returns the TestResult for the test that's currently running, or + // the TestResult for the ad hoc test if no test is running. + TestResult* current_test_result(); + + // Returns the TestResult for the ad hoc test. + const TestResult* ad_hoc_test_result() const { return &ad_hoc_test_result_; } + + // Sets the OS stack trace getter. + // + // Does nothing if the input and the current OS stack trace getter + // are the same; otherwise, deletes the old getter and makes the + // input the current getter. + void set_os_stack_trace_getter(OsStackTraceGetterInterface* getter); + + // Returns the current OS stack trace getter if it is not NULL; + // otherwise, creates an OsStackTraceGetter, makes it the current + // getter, and returns it. + OsStackTraceGetterInterface* os_stack_trace_getter(); + + // Returns the current OS stack trace as an std::string. + // + // The maximum number of stack frames to be included is specified by + // the gtest_stack_trace_depth flag. The skip_count parameter + // specifies the number of top frames to be skipped, which doesn't + // count against the number of frames to be included. + // + // For example, if Foo() calls Bar(), which in turn calls + // CurrentOsStackTraceExceptTop(1), Foo() will be included in the + // trace but Bar() and CurrentOsStackTraceExceptTop() won't. + std::string CurrentOsStackTraceExceptTop(int skip_count) GTEST_NO_INLINE_; + + // Finds and returns a TestCase with the given name. If one doesn't + // exist, creates one and returns it. + // + // Arguments: + // + // test_case_name: name of the test case + // type_param: the name of the test's type parameter, or NULL if + // this is not a typed or a type-parameterized test. + // set_up_tc: pointer to the function that sets up the test case + // tear_down_tc: pointer to the function that tears down the test case + TestCase* GetTestCase(const char* test_case_name, + const char* type_param, + Test::SetUpTestCaseFunc set_up_tc, + Test::TearDownTestCaseFunc tear_down_tc); + + // Adds a TestInfo to the unit test. + // + // Arguments: + // + // set_up_tc: pointer to the function that sets up the test case + // tear_down_tc: pointer to the function that tears down the test case + // test_info: the TestInfo object + void AddTestInfo(Test::SetUpTestCaseFunc set_up_tc, + Test::TearDownTestCaseFunc tear_down_tc, + TestInfo* test_info) { + // In order to support thread-safe death tests, we need to + // remember the original working directory when the test program + // was first invoked. We cannot do this in RUN_ALL_TESTS(), as + // the user may have changed the current directory before calling + // RUN_ALL_TESTS(). Therefore we capture the current directory in + // AddTestInfo(), which is called to register a TEST or TEST_F + // before main() is reached. + if (original_working_dir_.IsEmpty()) { + original_working_dir_.Set(FilePath::GetCurrentDir()); + GTEST_CHECK_(!original_working_dir_.IsEmpty()) + << "Failed to get the current working directory."; + } + + GetTestCase(test_info->test_case_name(), + test_info->type_param(), + set_up_tc, + tear_down_tc)->AddTestInfo(test_info); + } + +#if GTEST_HAS_PARAM_TEST + // Returns ParameterizedTestCaseRegistry object used to keep track of + // value-parameterized tests and instantiate and register them. + internal::ParameterizedTestCaseRegistry& parameterized_test_registry() { + return parameterized_test_registry_; + } +#endif // GTEST_HAS_PARAM_TEST + + // Sets the TestCase object for the test that's currently running. + void set_current_test_case(TestCase* a_current_test_case) { + current_test_case_ = a_current_test_case; + } + + // Sets the TestInfo object for the test that's currently running. If + // current_test_info is NULL, the assertion results will be stored in + // ad_hoc_test_result_. + void set_current_test_info(TestInfo* a_current_test_info) { + current_test_info_ = a_current_test_info; + } + + // Registers all parameterized tests defined using TEST_P and + // INSTANTIATE_TEST_CASE_P, creating regular tests for each test/parameter + // combination. This method can be called more then once; it has guards + // protecting from registering the tests more then once. If + // value-parameterized tests are disabled, RegisterParameterizedTests is + // present but does nothing. + void RegisterParameterizedTests(); + + // Runs all tests in this UnitTest object, prints the result, and + // returns true if all tests are successful. If any exception is + // thrown during a test, this test is considered to be failed, but + // the rest of the tests will still be run. + bool RunAllTests(); + + // Clears the results of all tests, except the ad hoc tests. + void ClearNonAdHocTestResult() { + ForEach(test_cases_, TestCase::ClearTestCaseResult); + } + + // Clears the results of ad-hoc test assertions. + void ClearAdHocTestResult() { + ad_hoc_test_result_.Clear(); + } + + // Adds a TestProperty to the current TestResult object when invoked in a + // context of a test or a test case, or to the global property set. If the + // result already contains a property with the same key, the value will be + // updated. + void RecordProperty(const TestProperty& test_property); + + enum ReactionToSharding { + HONOR_SHARDING_PROTOCOL, + IGNORE_SHARDING_PROTOCOL + }; + + // Matches the full name of each test against the user-specified + // filter to decide whether the test should run, then records the + // result in each TestCase and TestInfo object. + // If shard_tests == HONOR_SHARDING_PROTOCOL, further filters tests + // based on sharding variables in the environment. + // Returns the number of tests that should run. + int FilterTests(ReactionToSharding shard_tests); + + // Prints the names of the tests matching the user-specified filter flag. + void ListTestsMatchingFilter(); + + const TestCase* current_test_case() const { return current_test_case_; } + TestInfo* current_test_info() { return current_test_info_; } + const TestInfo* current_test_info() const { return current_test_info_; } + + // Returns the vector of environments that need to be set-up/torn-down + // before/after the tests are run. + std::vector& environments() { return environments_; } + + // Getters for the per-thread Google Test trace stack. + std::vector& gtest_trace_stack() { + return *(gtest_trace_stack_.pointer()); + } + const std::vector& gtest_trace_stack() const { + return gtest_trace_stack_.get(); + } + +#if GTEST_HAS_DEATH_TEST + void InitDeathTestSubprocessControlInfo() { + internal_run_death_test_flag_.reset(ParseInternalRunDeathTestFlag()); + } + // Returns a pointer to the parsed --gtest_internal_run_death_test + // flag, or NULL if that flag was not specified. + // This information is useful only in a death test child process. + // Must not be called before a call to InitGoogleTest. + const InternalRunDeathTestFlag* internal_run_death_test_flag() const { + return internal_run_death_test_flag_.get(); + } + + // Returns a pointer to the current death test factory. + internal::DeathTestFactory* death_test_factory() { + return death_test_factory_.get(); + } + + void SuppressTestEventsIfInSubprocess(); + + friend class ReplaceDeathTestFactory; +#endif // GTEST_HAS_DEATH_TEST + + // Initializes the event listener performing XML output as specified by + // UnitTestOptions. Must not be called before InitGoogleTest. + void ConfigureXmlOutput(); + +#if GTEST_CAN_STREAM_RESULTS_ + // Initializes the event listener for streaming test results to a socket. + // Must not be called before InitGoogleTest. + void ConfigureStreamingOutput(); +#endif + + // Performs initialization dependent upon flag values obtained in + // ParseGoogleTestFlagsOnly. Is called from InitGoogleTest after the call to + // ParseGoogleTestFlagsOnly. In case a user neglects to call InitGoogleTest + // this function is also called from RunAllTests. Since this function can be + // called more than once, it has to be idempotent. + void PostFlagParsingInit(); + + // Gets the random seed used at the start of the current test iteration. + int random_seed() const { return random_seed_; } + + // Gets the random number generator. + internal::Random* random() { return &random_; } + + // Shuffles all test cases, and the tests within each test case, + // making sure that death tests are still run first. + void ShuffleTests(); + + // Restores the test cases and tests to their order before the first shuffle. + void UnshuffleTests(); + + // Returns the value of GTEST_FLAG(catch_exceptions) at the moment + // UnitTest::Run() starts. + bool catch_exceptions() const { return catch_exceptions_; } + + private: + friend class ::testing::UnitTest; + + // Used by UnitTest::Run() to capture the state of + // GTEST_FLAG(catch_exceptions) at the moment it starts. + void set_catch_exceptions(bool value) { catch_exceptions_ = value; } + + // The UnitTest object that owns this implementation object. + UnitTest* const parent_; + + // The working directory when the first TEST() or TEST_F() was + // executed. + internal::FilePath original_working_dir_; + + // The default test part result reporters. + DefaultGlobalTestPartResultReporter default_global_test_part_result_reporter_; + DefaultPerThreadTestPartResultReporter + default_per_thread_test_part_result_reporter_; + + // Points to (but doesn't own) the global test part result reporter. + TestPartResultReporterInterface* global_test_part_result_repoter_; + + // Protects read and write access to global_test_part_result_reporter_. + internal::Mutex global_test_part_result_reporter_mutex_; + + // Points to (but doesn't own) the per-thread test part result reporter. + internal::ThreadLocal + per_thread_test_part_result_reporter_; + + // The vector of environments that need to be set-up/torn-down + // before/after the tests are run. + std::vector environments_; + + // The vector of TestCases in their original order. It owns the + // elements in the vector. + std::vector test_cases_; + + // Provides a level of indirection for the test case list to allow + // easy shuffling and restoring the test case order. The i-th + // element of this vector is the index of the i-th test case in the + // shuffled order. + std::vector test_case_indices_; + +#if GTEST_HAS_PARAM_TEST + // ParameterizedTestRegistry object used to register value-parameterized + // tests. + internal::ParameterizedTestCaseRegistry parameterized_test_registry_; + + // Indicates whether RegisterParameterizedTests() has been called already. + bool parameterized_tests_registered_; +#endif // GTEST_HAS_PARAM_TEST + + // Index of the last death test case registered. Initially -1. + int last_death_test_case_; + + // This points to the TestCase for the currently running test. It + // changes as Google Test goes through one test case after another. + // When no test is running, this is set to NULL and Google Test + // stores assertion results in ad_hoc_test_result_. Initially NULL. + TestCase* current_test_case_; + + // This points to the TestInfo for the currently running test. It + // changes as Google Test goes through one test after another. When + // no test is running, this is set to NULL and Google Test stores + // assertion results in ad_hoc_test_result_. Initially NULL. + TestInfo* current_test_info_; + + // Normally, a user only writes assertions inside a TEST or TEST_F, + // or inside a function called by a TEST or TEST_F. Since Google + // Test keeps track of which test is current running, it can + // associate such an assertion with the test it belongs to. + // + // If an assertion is encountered when no TEST or TEST_F is running, + // Google Test attributes the assertion result to an imaginary "ad hoc" + // test, and records the result in ad_hoc_test_result_. + TestResult ad_hoc_test_result_; + + // The list of event listeners that can be used to track events inside + // Google Test. + TestEventListeners listeners_; + + // The OS stack trace getter. Will be deleted when the UnitTest + // object is destructed. By default, an OsStackTraceGetter is used, + // but the user can set this field to use a custom getter if that is + // desired. + OsStackTraceGetterInterface* os_stack_trace_getter_; + + // True iff PostFlagParsingInit() has been called. + bool post_flag_parse_init_performed_; + + // The random number seed used at the beginning of the test run. + int random_seed_; + + // Our random number generator. + internal::Random random_; + + // The time of the test program start, in ms from the start of the + // UNIX epoch. + TimeInMillis start_timestamp_; + + // How long the test took to run, in milliseconds. + TimeInMillis elapsed_time_; + +#if GTEST_HAS_DEATH_TEST + // The decomposed components of the gtest_internal_run_death_test flag, + // parsed when RUN_ALL_TESTS is called. + internal::scoped_ptr internal_run_death_test_flag_; + internal::scoped_ptr death_test_factory_; +#endif // GTEST_HAS_DEATH_TEST + + // A per-thread stack of traces created by the SCOPED_TRACE() macro. + internal::ThreadLocal > gtest_trace_stack_; + + // The value of GTEST_FLAG(catch_exceptions) at the moment RunAllTests() + // starts. + bool catch_exceptions_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(UnitTestImpl); +}; // class UnitTestImpl + +// Convenience function for accessing the global UnitTest +// implementation object. +inline UnitTestImpl* GetUnitTestImpl() { + return UnitTest::GetInstance()->impl(); +} + +#if GTEST_USES_SIMPLE_RE + +// Internal helper functions for implementing the simple regular +// expression matcher. +GTEST_API_ bool IsInSet(char ch, const char* str); +GTEST_API_ bool IsAsciiDigit(char ch); +GTEST_API_ bool IsAsciiPunct(char ch); +GTEST_API_ bool IsRepeat(char ch); +GTEST_API_ bool IsAsciiWhiteSpace(char ch); +GTEST_API_ bool IsAsciiWordChar(char ch); +GTEST_API_ bool IsValidEscape(char ch); +GTEST_API_ bool AtomMatchesChar(bool escaped, char pattern, char ch); +GTEST_API_ bool ValidateRegex(const char* regex); +GTEST_API_ bool MatchRegexAtHead(const char* regex, const char* str); +GTEST_API_ bool MatchRepetitionAndRegexAtHead( + bool escaped, char ch, char repeat, const char* regex, const char* str); +GTEST_API_ bool MatchRegexAnywhere(const char* regex, const char* str); + +#endif // GTEST_USES_SIMPLE_RE + +// Parses the command line for Google Test flags, without initializing +// other parts of Google Test. +GTEST_API_ void ParseGoogleTestFlagsOnly(int* argc, char** argv); +GTEST_API_ void ParseGoogleTestFlagsOnly(int* argc, wchar_t** argv); + +#if GTEST_HAS_DEATH_TEST + +// Returns the message describing the last system error, regardless of the +// platform. +GTEST_API_ std::string GetLastErrnoDescription(); + +# if GTEST_OS_WINDOWS +// Provides leak-safe Windows kernel handle ownership. +class AutoHandle { + public: + AutoHandle() : handle_(INVALID_HANDLE_VALUE) {} + explicit AutoHandle(HANDLE handle) : handle_(handle) {} + + ~AutoHandle() { Reset(); } + + HANDLE Get() const { return handle_; } + void Reset() { Reset(INVALID_HANDLE_VALUE); } + void Reset(HANDLE handle) { + if (handle != handle_) { + if (handle_ != INVALID_HANDLE_VALUE) + ::CloseHandle(handle_); + handle_ = handle; + } + } + + private: + HANDLE handle_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(AutoHandle); +}; +# endif // GTEST_OS_WINDOWS + +// Attempts to parse a string into a positive integer pointed to by the +// number parameter. Returns true if that is possible. +// GTEST_HAS_DEATH_TEST implies that we have ::std::string, so we can use +// it here. +template +bool ParseNaturalNumber(const ::std::string& str, Integer* number) { + // Fail fast if the given string does not begin with a digit; + // this bypasses strtoXXX's "optional leading whitespace and plus + // or minus sign" semantics, which are undesirable here. + if (str.empty() || !IsDigit(str[0])) { + return false; + } + errno = 0; + + char* end; + // BiggestConvertible is the largest integer type that system-provided + // string-to-number conversion routines can return. + +# if GTEST_OS_WINDOWS && !defined(__GNUC__) + + // MSVC and C++ Builder define __int64 instead of the standard long long. + typedef unsigned __int64 BiggestConvertible; + const BiggestConvertible parsed = _strtoui64(str.c_str(), &end, 10); + +# else + + typedef unsigned long long BiggestConvertible; // NOLINT + const BiggestConvertible parsed = strtoull(str.c_str(), &end, 10); + +# endif // GTEST_OS_WINDOWS && !defined(__GNUC__) + + const bool parse_success = *end == '\0' && errno == 0; + + // TODO(vladl@google.com): Convert this to compile time assertion when it is + // available. + GTEST_CHECK_(sizeof(Integer) <= sizeof(parsed)); + + const Integer result = static_cast(parsed); + if (parse_success && static_cast(result) == parsed) { + *number = result; + return true; + } + return false; +} +#endif // GTEST_HAS_DEATH_TEST + +// TestResult contains some private methods that should be hidden from +// Google Test user but are required for testing. This class allow our tests +// to access them. +// +// This class is supplied only for the purpose of testing Google Test's own +// constructs. Do not use it in user tests, either directly or indirectly. +class TestResultAccessor { + public: + static void RecordProperty(TestResult* test_result, + const std::string& xml_element, + const TestProperty& property) { + test_result->RecordProperty(xml_element, property); + } + + static void ClearTestPartResults(TestResult* test_result) { + test_result->ClearTestPartResults(); + } + + static const std::vector& test_part_results( + const TestResult& test_result) { + return test_result.test_part_results(); + } +}; + +#if GTEST_CAN_STREAM_RESULTS_ + +// Streams test results to the given port on the given host machine. +class StreamingListener : public EmptyTestEventListener { + public: + // Abstract base class for writing strings to a socket. + class AbstractSocketWriter { + public: + virtual ~AbstractSocketWriter() {} + + // Sends a string to the socket. + virtual void Send(const string& message) = 0; + + // Closes the socket. + virtual void CloseConnection() {} + + // Sends a string and a newline to the socket. + void SendLn(const string& message) { + Send(message + "\n"); + } + }; + + // Concrete class for actually writing strings to a socket. + class SocketWriter : public AbstractSocketWriter { + public: + SocketWriter(const string& host, const string& port) + : sockfd_(-1), host_name_(host), port_num_(port) { + MakeConnection(); + } + + virtual ~SocketWriter() { + if (sockfd_ != -1) + CloseConnection(); + } + + // Sends a string to the socket. + virtual void Send(const string& message) { + GTEST_CHECK_(sockfd_ != -1) + << "Send() can be called only when there is a connection."; + + const int len = static_cast(message.length()); + if (write(sockfd_, message.c_str(), len) != len) { + GTEST_LOG_(WARNING) + << "stream_result_to: failed to stream to " + << host_name_ << ":" << port_num_; + } + } + + private: + // Creates a client socket and connects to the server. + void MakeConnection(); + + // Closes the socket. + void CloseConnection() { + GTEST_CHECK_(sockfd_ != -1) + << "CloseConnection() can be called only when there is a connection."; + + close(sockfd_); + sockfd_ = -1; + } + + int sockfd_; // socket file descriptor + const string host_name_; + const string port_num_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(SocketWriter); + }; // class SocketWriter + + // Escapes '=', '&', '%', and '\n' characters in str as "%xx". + static string UrlEncode(const char* str); + + StreamingListener(const string& host, const string& port) + : socket_writer_(new SocketWriter(host, port)) { Start(); } + + explicit StreamingListener(AbstractSocketWriter* socket_writer) + : socket_writer_(socket_writer) { Start(); } + + void OnTestProgramStart(const UnitTest& /* unit_test */) { + SendLn("event=TestProgramStart"); + } + + void OnTestProgramEnd(const UnitTest& unit_test) { + // Note that Google Test current only report elapsed time for each + // test iteration, not for the entire test program. + SendLn("event=TestProgramEnd&passed=" + FormatBool(unit_test.Passed())); + + // Notify the streaming server to stop. + socket_writer_->CloseConnection(); + } + + void OnTestIterationStart(const UnitTest& /* unit_test */, int iteration) { + SendLn("event=TestIterationStart&iteration=" + + StreamableToString(iteration)); + } + + void OnTestIterationEnd(const UnitTest& unit_test, int /* iteration */) { + SendLn("event=TestIterationEnd&passed=" + + FormatBool(unit_test.Passed()) + "&elapsed_time=" + + StreamableToString(unit_test.elapsed_time()) + "ms"); + } + + void OnTestCaseStart(const TestCase& test_case) { + SendLn(std::string("event=TestCaseStart&name=") + test_case.name()); + } + + void OnTestCaseEnd(const TestCase& test_case) { + SendLn("event=TestCaseEnd&passed=" + FormatBool(test_case.Passed()) + + "&elapsed_time=" + StreamableToString(test_case.elapsed_time()) + + "ms"); + } + + void OnTestStart(const TestInfo& test_info) { + SendLn(std::string("event=TestStart&name=") + test_info.name()); + } + + void OnTestEnd(const TestInfo& test_info) { + SendLn("event=TestEnd&passed=" + + FormatBool((test_info.result())->Passed()) + + "&elapsed_time=" + + StreamableToString((test_info.result())->elapsed_time()) + "ms"); + } + + void OnTestPartResult(const TestPartResult& test_part_result) { + const char* file_name = test_part_result.file_name(); + if (file_name == NULL) + file_name = ""; + SendLn("event=TestPartResult&file=" + UrlEncode(file_name) + + "&line=" + StreamableToString(test_part_result.line_number()) + + "&message=" + UrlEncode(test_part_result.message())); + } + + private: + // Sends the given message and a newline to the socket. + void SendLn(const string& message) { socket_writer_->SendLn(message); } + + // Called at the start of streaming to notify the receiver what + // protocol we are using. + void Start() { SendLn("gtest_streaming_protocol_version=1.0"); } + + string FormatBool(bool value) { return value ? "1" : "0"; } + + const scoped_ptr socket_writer_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(StreamingListener); +}; // class StreamingListener + +#endif // GTEST_CAN_STREAM_RESULTS_ + +} // namespace internal +} // namespace testing + +#endif // GTEST_SRC_GTEST_INTERNAL_INL_H_ +#undef GTEST_IMPLEMENTATION_ + +#if GTEST_OS_WINDOWS +# define vsnprintf _vsnprintf +#endif // GTEST_OS_WINDOWS + +namespace testing { + +using internal::CountIf; +using internal::ForEach; +using internal::GetElementOr; +using internal::Shuffle; + +// Constants. + +// A test whose test case name or test name matches this filter is +// disabled and not run. +static const char kDisableTestFilter[] = "DISABLED_*:*/DISABLED_*"; + +// A test case whose name matches this filter is considered a death +// test case and will be run before test cases whose name doesn't +// match this filter. +static const char kDeathTestCaseFilter[] = "*DeathTest:*DeathTest/*"; + +// A test filter that matches everything. +static const char kUniversalFilter[] = "*"; + +// The default output file for XML output. +static const char kDefaultOutputFile[] = "test_detail.xml"; + +// The environment variable name for the test shard index. +static const char kTestShardIndex[] = "GTEST_SHARD_INDEX"; +// The environment variable name for the total number of test shards. +static const char kTestTotalShards[] = "GTEST_TOTAL_SHARDS"; +// The environment variable name for the test shard status file. +static const char kTestShardStatusFile[] = "GTEST_SHARD_STATUS_FILE"; + +namespace internal { + +// The text used in failure messages to indicate the start of the +// stack trace. +const char kStackTraceMarker[] = "\nStack trace:\n"; + +// g_help_flag is true iff the --help flag or an equivalent form is +// specified on the command line. +bool g_help_flag = false; + +} // namespace internal + +static const char* GetDefaultFilter() { + return kUniversalFilter; +} + +GTEST_DEFINE_bool_( + also_run_disabled_tests, + internal::BoolFromGTestEnv("also_run_disabled_tests", false), + "Run disabled tests too, in addition to the tests normally being run."); + +GTEST_DEFINE_bool_( + break_on_failure, + internal::BoolFromGTestEnv("break_on_failure", false), + "True iff a failed assertion should be a debugger break-point."); + +GTEST_DEFINE_bool_( + catch_exceptions, + internal::BoolFromGTestEnv("catch_exceptions", true), + "True iff " GTEST_NAME_ + " should catch exceptions and treat them as test failures."); + +GTEST_DEFINE_string_( + color, + internal::StringFromGTestEnv("color", "auto"), + "Whether to use colors in the output. Valid values: yes, no, " + "and auto. 'auto' means to use colors if the output is " + "being sent to a terminal and the TERM environment variable " + "is set to a terminal type that supports colors."); + +GTEST_DEFINE_string_( + filter, + internal::StringFromGTestEnv("filter", GetDefaultFilter()), + "A colon-separated list of glob (not regex) patterns " + "for filtering the tests to run, optionally followed by a " + "'-' and a : separated list of negative patterns (tests to " + "exclude). A test is run if it matches one of the positive " + "patterns and does not match any of the negative patterns."); + +GTEST_DEFINE_bool_(list_tests, false, + "List all tests without running them."); + +GTEST_DEFINE_string_( + output, + internal::StringFromGTestEnv("output", ""), + "A format (currently must be \"xml\"), optionally followed " + "by a colon and an output file name or directory. A directory " + "is indicated by a trailing pathname separator. " + "Examples: \"xml:filename.xml\", \"xml::directoryname/\". " + "If a directory is specified, output files will be created " + "within that directory, with file-names based on the test " + "executable's name and, if necessary, made unique by adding " + "digits."); + +GTEST_DEFINE_bool_( + print_time, + internal::BoolFromGTestEnv("print_time", true), + "True iff " GTEST_NAME_ + " should display elapsed time in text output."); + +GTEST_DEFINE_int32_( + random_seed, + internal::Int32FromGTestEnv("random_seed", 0), + "Random number seed to use when shuffling test orders. Must be in range " + "[1, 99999], or 0 to use a seed based on the current time."); + +GTEST_DEFINE_int32_( + repeat, + internal::Int32FromGTestEnv("repeat", 1), + "How many times to repeat each test. Specify a negative number " + "for repeating forever. Useful for shaking out flaky tests."); + +GTEST_DEFINE_bool_( + show_internal_stack_frames, false, + "True iff " GTEST_NAME_ " should include internal stack frames when " + "printing test failure stack traces."); + +GTEST_DEFINE_bool_( + shuffle, + internal::BoolFromGTestEnv("shuffle", false), + "True iff " GTEST_NAME_ + " should randomize tests' order on every run."); + +GTEST_DEFINE_int32_( + stack_trace_depth, + internal::Int32FromGTestEnv("stack_trace_depth", kMaxStackTraceDepth), + "The maximum number of stack frames to print when an " + "assertion fails. The valid range is 0 through 100, inclusive."); + +GTEST_DEFINE_string_( + stream_result_to, + internal::StringFromGTestEnv("stream_result_to", ""), + "This flag specifies the host name and the port number on which to stream " + "test results. Example: \"localhost:555\". The flag is effective only on " + "Linux."); + +GTEST_DEFINE_bool_( + throw_on_failure, + internal::BoolFromGTestEnv("throw_on_failure", false), + "When this flag is specified, a failed assertion will throw an exception " + "if exceptions are enabled or exit the program with a non-zero code " + "otherwise."); + +namespace internal { + +// Generates a random number from [0, range), using a Linear +// Congruential Generator (LCG). Crashes if 'range' is 0 or greater +// than kMaxRange. +UInt32 Random::Generate(UInt32 range) { + // These constants are the same as are used in glibc's rand(3). + state_ = (1103515245U*state_ + 12345U) % kMaxRange; + + GTEST_CHECK_(range > 0) + << "Cannot generate a number in the range [0, 0)."; + GTEST_CHECK_(range <= kMaxRange) + << "Generation of a number in [0, " << range << ") was requested, " + << "but this can only generate numbers in [0, " << kMaxRange << ")."; + + // Converting via modulus introduces a bit of downward bias, but + // it's simple, and a linear congruential generator isn't too good + // to begin with. + return state_ % range; +} + +// GTestIsInitialized() returns true iff the user has initialized +// Google Test. Useful for catching the user mistake of not initializing +// Google Test before calling RUN_ALL_TESTS(). +// +// A user must call testing::InitGoogleTest() to initialize Google +// Test. g_init_gtest_count is set to the number of times +// InitGoogleTest() has been called. We don't protect this variable +// under a mutex as it is only accessed in the main thread. +GTEST_API_ int g_init_gtest_count = 0; +static bool GTestIsInitialized() { return g_init_gtest_count != 0; } + +// Iterates over a vector of TestCases, keeping a running sum of the +// results of calling a given int-returning method on each. +// Returns the sum. +static int SumOverTestCaseList(const std::vector& case_list, + int (TestCase::*method)() const) { + int sum = 0; + for (size_t i = 0; i < case_list.size(); i++) { + sum += (case_list[i]->*method)(); + } + return sum; +} + +// Returns true iff the test case passed. +static bool TestCasePassed(const TestCase* test_case) { + return test_case->should_run() && test_case->Passed(); +} + +// Returns true iff the test case failed. +static bool TestCaseFailed(const TestCase* test_case) { + return test_case->should_run() && test_case->Failed(); +} + +// Returns true iff test_case contains at least one test that should +// run. +static bool ShouldRunTestCase(const TestCase* test_case) { + return test_case->should_run(); +} + +// AssertHelper constructor. +AssertHelper::AssertHelper(TestPartResult::Type type, + const char* file, + int line, + const char* message) + : data_(new AssertHelperData(type, file, line, message)) { +} + +AssertHelper::~AssertHelper() { + delete data_; +} + +// Message assignment, for assertion streaming support. +void AssertHelper::operator=(const Message& message) const { + UnitTest::GetInstance()-> + AddTestPartResult(data_->type, data_->file, data_->line, + AppendUserMessage(data_->message, message), + UnitTest::GetInstance()->impl() + ->CurrentOsStackTraceExceptTop(1) + // Skips the stack frame for this function itself. + ); // NOLINT +} + +// Mutex for linked pointers. +GTEST_API_ GTEST_DEFINE_STATIC_MUTEX_(g_linked_ptr_mutex); + +// Application pathname gotten in InitGoogleTest. +std::string g_executable_path; + +// Returns the current application's name, removing directory path if that +// is present. +FilePath GetCurrentExecutableName() { + FilePath result; + +#if GTEST_OS_WINDOWS + result.Set(FilePath(g_executable_path).RemoveExtension("exe")); +#else + result.Set(FilePath(g_executable_path)); +#endif // GTEST_OS_WINDOWS + + return result.RemoveDirectoryName(); +} + +// Functions for processing the gtest_output flag. + +// Returns the output format, or "" for normal printed output. +std::string UnitTestOptions::GetOutputFormat() { + const char* const gtest_output_flag = GTEST_FLAG(output).c_str(); + if (gtest_output_flag == NULL) return std::string(""); + + const char* const colon = strchr(gtest_output_flag, ':'); + return (colon == NULL) ? + std::string(gtest_output_flag) : + std::string(gtest_output_flag, colon - gtest_output_flag); +} + +// Returns the name of the requested output file, or the default if none +// was explicitly specified. +std::string UnitTestOptions::GetAbsolutePathToOutputFile() { + const char* const gtest_output_flag = GTEST_FLAG(output).c_str(); + if (gtest_output_flag == NULL) + return ""; + + const char* const colon = strchr(gtest_output_flag, ':'); + if (colon == NULL) + return internal::FilePath::ConcatPaths( + internal::FilePath( + UnitTest::GetInstance()->original_working_dir()), + internal::FilePath(kDefaultOutputFile)).string(); + + internal::FilePath output_name(colon + 1); + if (!output_name.IsAbsolutePath()) + // TODO(wan@google.com): on Windows \some\path is not an absolute + // path (as its meaning depends on the current drive), yet the + // following logic for turning it into an absolute path is wrong. + // Fix it. + output_name = internal::FilePath::ConcatPaths( + internal::FilePath(UnitTest::GetInstance()->original_working_dir()), + internal::FilePath(colon + 1)); + + if (!output_name.IsDirectory()) + return output_name.string(); + + internal::FilePath result(internal::FilePath::GenerateUniqueFileName( + output_name, internal::GetCurrentExecutableName(), + GetOutputFormat().c_str())); + return result.string(); +} + +// Returns true iff the wildcard pattern matches the string. The +// first ':' or '\0' character in pattern marks the end of it. +// +// This recursive algorithm isn't very efficient, but is clear and +// works well enough for matching test names, which are short. +bool UnitTestOptions::PatternMatchesString(const char *pattern, + const char *str) { + switch (*pattern) { + case '\0': + case ':': // Either ':' or '\0' marks the end of the pattern. + return *str == '\0'; + case '?': // Matches any single character. + return *str != '\0' && PatternMatchesString(pattern + 1, str + 1); + case '*': // Matches any string (possibly empty) of characters. + return (*str != '\0' && PatternMatchesString(pattern, str + 1)) || + PatternMatchesString(pattern + 1, str); + default: // Non-special character. Matches itself. + return *pattern == *str && + PatternMatchesString(pattern + 1, str + 1); + } +} + +bool UnitTestOptions::MatchesFilter( + const std::string& name, const char* filter) { + const char *cur_pattern = filter; + for (;;) { + if (PatternMatchesString(cur_pattern, name.c_str())) { + return true; + } + + // Finds the next pattern in the filter. + cur_pattern = strchr(cur_pattern, ':'); + + // Returns if no more pattern can be found. + if (cur_pattern == NULL) { + return false; + } + + // Skips the pattern separater (the ':' character). + cur_pattern++; + } +} + +// Returns true iff the user-specified filter matches the test case +// name and the test name. +bool UnitTestOptions::FilterMatchesTest(const std::string &test_case_name, + const std::string &test_name) { + const std::string& full_name = test_case_name + "." + test_name.c_str(); + + // Split --gtest_filter at '-', if there is one, to separate into + // positive filter and negative filter portions + const char* const p = GTEST_FLAG(filter).c_str(); + const char* const dash = strchr(p, '-'); + std::string positive; + std::string negative; + if (dash == NULL) { + positive = GTEST_FLAG(filter).c_str(); // Whole string is a positive filter + negative = ""; + } else { + positive = std::string(p, dash); // Everything up to the dash + negative = std::string(dash + 1); // Everything after the dash + if (positive.empty()) { + // Treat '-test1' as the same as '*-test1' + positive = kUniversalFilter; + } + } + + // A filter is a colon-separated list of patterns. It matches a + // test if any pattern in it matches the test. + return (MatchesFilter(full_name, positive.c_str()) && + !MatchesFilter(full_name, negative.c_str())); +} + +#if GTEST_HAS_SEH +// Returns EXCEPTION_EXECUTE_HANDLER if Google Test should handle the +// given SEH exception, or EXCEPTION_CONTINUE_SEARCH otherwise. +// This function is useful as an __except condition. +int UnitTestOptions::GTestShouldProcessSEH(DWORD exception_code) { + // Google Test should handle a SEH exception if: + // 1. the user wants it to, AND + // 2. this is not a breakpoint exception, AND + // 3. this is not a C++ exception (VC++ implements them via SEH, + // apparently). + // + // SEH exception code for C++ exceptions. + // (see http://support.microsoft.com/kb/185294 for more information). + const DWORD kCxxExceptionCode = 0xe06d7363; + + bool should_handle = true; + + if (!GTEST_FLAG(catch_exceptions)) + should_handle = false; + else if (exception_code == EXCEPTION_BREAKPOINT) + should_handle = false; + else if (exception_code == kCxxExceptionCode) + should_handle = false; + + return should_handle ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH; +} +#endif // GTEST_HAS_SEH + +} // namespace internal + +// The c'tor sets this object as the test part result reporter used by +// Google Test. The 'result' parameter specifies where to report the +// results. Intercepts only failures from the current thread. +ScopedFakeTestPartResultReporter::ScopedFakeTestPartResultReporter( + TestPartResultArray* result) + : intercept_mode_(INTERCEPT_ONLY_CURRENT_THREAD), + result_(result) { + Init(); +} + +// The c'tor sets this object as the test part result reporter used by +// Google Test. The 'result' parameter specifies where to report the +// results. +ScopedFakeTestPartResultReporter::ScopedFakeTestPartResultReporter( + InterceptMode intercept_mode, TestPartResultArray* result) + : intercept_mode_(intercept_mode), + result_(result) { + Init(); +} + +void ScopedFakeTestPartResultReporter::Init() { + internal::UnitTestImpl* const impl = internal::GetUnitTestImpl(); + if (intercept_mode_ == INTERCEPT_ALL_THREADS) { + old_reporter_ = impl->GetGlobalTestPartResultReporter(); + impl->SetGlobalTestPartResultReporter(this); + } else { + old_reporter_ = impl->GetTestPartResultReporterForCurrentThread(); + impl->SetTestPartResultReporterForCurrentThread(this); + } +} + +// The d'tor restores the test part result reporter used by Google Test +// before. +ScopedFakeTestPartResultReporter::~ScopedFakeTestPartResultReporter() { + internal::UnitTestImpl* const impl = internal::GetUnitTestImpl(); + if (intercept_mode_ == INTERCEPT_ALL_THREADS) { + impl->SetGlobalTestPartResultReporter(old_reporter_); + } else { + impl->SetTestPartResultReporterForCurrentThread(old_reporter_); + } +} + +// Increments the test part result count and remembers the result. +// This method is from the TestPartResultReporterInterface interface. +void ScopedFakeTestPartResultReporter::ReportTestPartResult( + const TestPartResult& result) { + result_->Append(result); +} + +namespace internal { + +// Returns the type ID of ::testing::Test. We should always call this +// instead of GetTypeId< ::testing::Test>() to get the type ID of +// testing::Test. This is to work around a suspected linker bug when +// using Google Test as a framework on Mac OS X. The bug causes +// GetTypeId< ::testing::Test>() to return different values depending +// on whether the call is from the Google Test framework itself or +// from user test code. GetTestTypeId() is guaranteed to always +// return the same value, as it always calls GetTypeId<>() from the +// gtest.cc, which is within the Google Test framework. +TypeId GetTestTypeId() { + return GetTypeId(); +} + +// The value of GetTestTypeId() as seen from within the Google Test +// library. This is solely for testing GetTestTypeId(). +extern const TypeId kTestTypeIdInGoogleTest = GetTestTypeId(); + +// This predicate-formatter checks that 'results' contains a test part +// failure of the given type and that the failure message contains the +// given substring. +AssertionResult HasOneFailure(const char* /* results_expr */, + const char* /* type_expr */, + const char* /* substr_expr */, + const TestPartResultArray& results, + TestPartResult::Type type, + const string& substr) { + const std::string expected(type == TestPartResult::kFatalFailure ? + "1 fatal failure" : + "1 non-fatal failure"); + Message msg; + if (results.size() != 1) { + msg << "Expected: " << expected << "\n" + << " Actual: " << results.size() << " failures"; + for (int i = 0; i < results.size(); i++) { + msg << "\n" << results.GetTestPartResult(i); + } + return AssertionFailure() << msg; + } + + const TestPartResult& r = results.GetTestPartResult(0); + if (r.type() != type) { + return AssertionFailure() << "Expected: " << expected << "\n" + << " Actual:\n" + << r; + } + + if (strstr(r.message(), substr.c_str()) == NULL) { + return AssertionFailure() << "Expected: " << expected << " containing \"" + << substr << "\"\n" + << " Actual:\n" + << r; + } + + return AssertionSuccess(); +} + +// The constructor of SingleFailureChecker remembers where to look up +// test part results, what type of failure we expect, and what +// substring the failure message should contain. +SingleFailureChecker:: SingleFailureChecker( + const TestPartResultArray* results, + TestPartResult::Type type, + const string& substr) + : results_(results), + type_(type), + substr_(substr) {} + +// The destructor of SingleFailureChecker verifies that the given +// TestPartResultArray contains exactly one failure that has the given +// type and contains the given substring. If that's not the case, a +// non-fatal failure will be generated. +SingleFailureChecker::~SingleFailureChecker() { + EXPECT_PRED_FORMAT3(HasOneFailure, *results_, type_, substr_); +} + +DefaultGlobalTestPartResultReporter::DefaultGlobalTestPartResultReporter( + UnitTestImpl* unit_test) : unit_test_(unit_test) {} + +void DefaultGlobalTestPartResultReporter::ReportTestPartResult( + const TestPartResult& result) { + unit_test_->current_test_result()->AddTestPartResult(result); + unit_test_->listeners()->repeater()->OnTestPartResult(result); +} + +DefaultPerThreadTestPartResultReporter::DefaultPerThreadTestPartResultReporter( + UnitTestImpl* unit_test) : unit_test_(unit_test) {} + +void DefaultPerThreadTestPartResultReporter::ReportTestPartResult( + const TestPartResult& result) { + unit_test_->GetGlobalTestPartResultReporter()->ReportTestPartResult(result); +} + +// Returns the global test part result reporter. +TestPartResultReporterInterface* +UnitTestImpl::GetGlobalTestPartResultReporter() { + internal::MutexLock lock(&global_test_part_result_reporter_mutex_); + return global_test_part_result_repoter_; +} + +// Sets the global test part result reporter. +void UnitTestImpl::SetGlobalTestPartResultReporter( + TestPartResultReporterInterface* reporter) { + internal::MutexLock lock(&global_test_part_result_reporter_mutex_); + global_test_part_result_repoter_ = reporter; +} + +// Returns the test part result reporter for the current thread. +TestPartResultReporterInterface* +UnitTestImpl::GetTestPartResultReporterForCurrentThread() { + return per_thread_test_part_result_reporter_.get(); +} + +// Sets the test part result reporter for the current thread. +void UnitTestImpl::SetTestPartResultReporterForCurrentThread( + TestPartResultReporterInterface* reporter) { + per_thread_test_part_result_reporter_.set(reporter); +} + +// Gets the number of successful test cases. +int UnitTestImpl::successful_test_case_count() const { + return CountIf(test_cases_, TestCasePassed); +} + +// Gets the number of failed test cases. +int UnitTestImpl::failed_test_case_count() const { + return CountIf(test_cases_, TestCaseFailed); +} + +// Gets the number of all test cases. +int UnitTestImpl::total_test_case_count() const { + return static_cast(test_cases_.size()); +} + +// Gets the number of all test cases that contain at least one test +// that should run. +int UnitTestImpl::test_case_to_run_count() const { + return CountIf(test_cases_, ShouldRunTestCase); +} + +// Gets the number of successful tests. +int UnitTestImpl::successful_test_count() const { + return SumOverTestCaseList(test_cases_, &TestCase::successful_test_count); +} + +// Gets the number of failed tests. +int UnitTestImpl::failed_test_count() const { + return SumOverTestCaseList(test_cases_, &TestCase::failed_test_count); +} + +// Gets the number of disabled tests that will be reported in the XML report. +int UnitTestImpl::reportable_disabled_test_count() const { + return SumOverTestCaseList(test_cases_, + &TestCase::reportable_disabled_test_count); +} + +// Gets the number of disabled tests. +int UnitTestImpl::disabled_test_count() const { + return SumOverTestCaseList(test_cases_, &TestCase::disabled_test_count); +} + +// Gets the number of tests to be printed in the XML report. +int UnitTestImpl::reportable_test_count() const { + return SumOverTestCaseList(test_cases_, &TestCase::reportable_test_count); +} + +// Gets the number of all tests. +int UnitTestImpl::total_test_count() const { + return SumOverTestCaseList(test_cases_, &TestCase::total_test_count); +} + +// Gets the number of tests that should run. +int UnitTestImpl::test_to_run_count() const { + return SumOverTestCaseList(test_cases_, &TestCase::test_to_run_count); +} + +// Returns the current OS stack trace as an std::string. +// +// The maximum number of stack frames to be included is specified by +// the gtest_stack_trace_depth flag. The skip_count parameter +// specifies the number of top frames to be skipped, which doesn't +// count against the number of frames to be included. +// +// For example, if Foo() calls Bar(), which in turn calls +// CurrentOsStackTraceExceptTop(1), Foo() will be included in the +// trace but Bar() and CurrentOsStackTraceExceptTop() won't. +std::string UnitTestImpl::CurrentOsStackTraceExceptTop(int skip_count) { + (void)skip_count; + return ""; +} + +// Returns the current time in milliseconds. +TimeInMillis GetTimeInMillis() { +#if GTEST_OS_WINDOWS_MOBILE || defined(__BORLANDC__) + // Difference between 1970-01-01 and 1601-01-01 in milliseconds. + // http://analogous.blogspot.com/2005/04/epoch.html + const TimeInMillis kJavaEpochToWinFileTimeDelta = + static_cast(116444736UL) * 100000UL; + const DWORD kTenthMicrosInMilliSecond = 10000; + + SYSTEMTIME now_systime; + FILETIME now_filetime; + ULARGE_INTEGER now_int64; + // TODO(kenton@google.com): Shouldn't this just use + // GetSystemTimeAsFileTime()? + GetSystemTime(&now_systime); + if (SystemTimeToFileTime(&now_systime, &now_filetime)) { + now_int64.LowPart = now_filetime.dwLowDateTime; + now_int64.HighPart = now_filetime.dwHighDateTime; + now_int64.QuadPart = (now_int64.QuadPart / kTenthMicrosInMilliSecond) - + kJavaEpochToWinFileTimeDelta; + return now_int64.QuadPart; + } + return 0; +#elif GTEST_OS_WINDOWS && !GTEST_HAS_GETTIMEOFDAY_ + __timeb64 now; + +# ifdef _MSC_VER + + // MSVC 8 deprecates _ftime64(), so we want to suppress warning 4996 + // (deprecated function) there. + // TODO(kenton@google.com): Use GetTickCount()? Or use + // SystemTimeToFileTime() +# pragma warning(push) // Saves the current warning state. +# pragma warning(disable:4996) // Temporarily disables warning 4996. + _ftime64(&now); +# pragma warning(pop) // Restores the warning state. +# else + + _ftime64(&now); + +# endif // _MSC_VER + + return static_cast(now.time) * 1000 + now.millitm; +#elif GTEST_HAS_GETTIMEOFDAY_ + struct timeval now; + gettimeofday(&now, NULL); + return static_cast(now.tv_sec) * 1000 + now.tv_usec / 1000; +#else +# error "Don't know how to get the current time on your system." +#endif +} + +// Utilities + +// class String. + +#if GTEST_OS_WINDOWS_MOBILE +// Creates a UTF-16 wide string from the given ANSI string, allocating +// memory using new. The caller is responsible for deleting the return +// value using delete[]. Returns the wide string, or NULL if the +// input is NULL. +LPCWSTR String::AnsiToUtf16(const char* ansi) { + if (!ansi) return NULL; + const int length = strlen(ansi); + const int unicode_length = + MultiByteToWideChar(CP_ACP, 0, ansi, length, + NULL, 0); + WCHAR* unicode = new WCHAR[unicode_length + 1]; + MultiByteToWideChar(CP_ACP, 0, ansi, length, + unicode, unicode_length); + unicode[unicode_length] = 0; + return unicode; +} + +// Creates an ANSI string from the given wide string, allocating +// memory using new. The caller is responsible for deleting the return +// value using delete[]. Returns the ANSI string, or NULL if the +// input is NULL. +const char* String::Utf16ToAnsi(LPCWSTR utf16_str) { + if (!utf16_str) return NULL; + const int ansi_length = + WideCharToMultiByte(CP_ACP, 0, utf16_str, -1, + NULL, 0, NULL, NULL); + char* ansi = new char[ansi_length + 1]; + WideCharToMultiByte(CP_ACP, 0, utf16_str, -1, + ansi, ansi_length, NULL, NULL); + ansi[ansi_length] = 0; + return ansi; +} + +#endif // GTEST_OS_WINDOWS_MOBILE + +// Compares two C strings. Returns true iff they have the same content. +// +// Unlike strcmp(), this function can handle NULL argument(s). A NULL +// C string is considered different to any non-NULL C string, +// including the empty string. +bool String::CStringEquals(const char * lhs, const char * rhs) { + if ( lhs == NULL ) return rhs == NULL; + + if ( rhs == NULL ) return false; + + return strcmp(lhs, rhs) == 0; +} + +#if GTEST_HAS_STD_WSTRING || GTEST_HAS_GLOBAL_WSTRING + +// Converts an array of wide chars to a narrow string using the UTF-8 +// encoding, and streams the result to the given Message object. +static void StreamWideCharsToMessage(const wchar_t* wstr, size_t length, + Message* msg) { + for (size_t i = 0; i != length; ) { // NOLINT + if (wstr[i] != L'\0') { + *msg << WideStringToUtf8(wstr + i, static_cast(length - i)); + while (i != length && wstr[i] != L'\0') + i++; + } else { + *msg << '\0'; + i++; + } + } +} + +#endif // GTEST_HAS_STD_WSTRING || GTEST_HAS_GLOBAL_WSTRING + +} // namespace internal + +// Constructs an empty Message. +// We allocate the stringstream separately because otherwise each use of +// ASSERT/EXPECT in a procedure adds over 200 bytes to the procedure's +// stack frame leading to huge stack frames in some cases; gcc does not reuse +// the stack space. +Message::Message() : ss_(new ::std::stringstream) { + // By default, we want there to be enough precision when printing + // a double to a Message. + *ss_ << std::setprecision(std::numeric_limits::digits10 + 2); +} + +// These two overloads allow streaming a wide C string to a Message +// using the UTF-8 encoding. +Message& Message::operator <<(const wchar_t* wide_c_str) { + return *this << internal::String::ShowWideCString(wide_c_str); +} +Message& Message::operator <<(wchar_t* wide_c_str) { + return *this << internal::String::ShowWideCString(wide_c_str); +} + +#if GTEST_HAS_STD_WSTRING +// Converts the given wide string to a narrow string using the UTF-8 +// encoding, and streams the result to this Message object. +Message& Message::operator <<(const ::std::wstring& wstr) { + internal::StreamWideCharsToMessage(wstr.c_str(), wstr.length(), this); + return *this; +} +#endif // GTEST_HAS_STD_WSTRING + +#if GTEST_HAS_GLOBAL_WSTRING +// Converts the given wide string to a narrow string using the UTF-8 +// encoding, and streams the result to this Message object. +Message& Message::operator <<(const ::wstring& wstr) { + internal::StreamWideCharsToMessage(wstr.c_str(), wstr.length(), this); + return *this; +} +#endif // GTEST_HAS_GLOBAL_WSTRING + +// Gets the text streamed to this object so far as an std::string. +// Each '\0' character in the buffer is replaced with "\\0". +std::string Message::GetString() const { + return internal::StringStreamToString(ss_.get()); +} + +// AssertionResult constructors. +// Used in EXPECT_TRUE/FALSE(assertion_result). +AssertionResult::AssertionResult(const AssertionResult& other) + : success_(other.success_), + message_(other.message_.get() != NULL ? + new ::std::string(*other.message_) : + static_cast< ::std::string*>(NULL)) { +} + +// Returns the assertion's negation. Used with EXPECT/ASSERT_FALSE. +AssertionResult AssertionResult::operator!() const { + AssertionResult negation(!success_); + if (message_.get() != NULL) + negation << *message_; + return negation; +} + +// Makes a successful assertion result. +AssertionResult AssertionSuccess() { + return AssertionResult(true); +} + +// Makes a failed assertion result. +AssertionResult AssertionFailure() { + return AssertionResult(false); +} + +// Makes a failed assertion result with the given failure message. +// Deprecated; use AssertionFailure() << message. +AssertionResult AssertionFailure(const Message& message) { + return AssertionFailure() << message; +} + +namespace internal { + +// Constructs and returns the message for an equality assertion +// (e.g. ASSERT_EQ, EXPECT_STREQ, etc) failure. +// +// The first four parameters are the expressions used in the assertion +// and their values, as strings. For example, for ASSERT_EQ(foo, bar) +// where foo is 5 and bar is 6, we have: +// +// expected_expression: "foo" +// actual_expression: "bar" +// expected_value: "5" +// actual_value: "6" +// +// The ignoring_case parameter is true iff the assertion is a +// *_STRCASEEQ*. When it's true, the string " (ignoring case)" will +// be inserted into the message. +AssertionResult EqFailure(const char* expected_expression, + const char* actual_expression, + const std::string& expected_value, + const std::string& actual_value, + bool ignoring_case) { + Message msg; + msg << "Value of: " << actual_expression; + if (actual_value != actual_expression) { + msg << "\n Actual: " << actual_value; + } + + msg << "\nExpected: " << expected_expression; + if (ignoring_case) { + msg << " (ignoring case)"; + } + if (expected_value != expected_expression) { + msg << "\nWhich is: " << expected_value; + } + + return AssertionFailure() << msg; +} + +// Constructs a failure message for Boolean assertions such as EXPECT_TRUE. +std::string GetBoolAssertionFailureMessage( + const AssertionResult& assertion_result, + const char* expression_text, + const char* actual_predicate_value, + const char* expected_predicate_value) { + const char* actual_message = assertion_result.message(); + Message msg; + msg << "Value of: " << expression_text + << "\n Actual: " << actual_predicate_value; + if (actual_message[0] != '\0') + msg << " (" << actual_message << ")"; + msg << "\nExpected: " << expected_predicate_value; + return msg.GetString(); +} + +// Helper function for implementing ASSERT_NEAR. +AssertionResult DoubleNearPredFormat(const char* expr1, + const char* expr2, + const char* abs_error_expr, + double val1, + double val2, + double abs_error) { + const double diff = fabs(val1 - val2); + if (diff <= abs_error) return AssertionSuccess(); + + // TODO(wan): do not print the value of an expression if it's + // already a literal. + return AssertionFailure() + << "The difference between " << expr1 << " and " << expr2 + << " is " << diff << ", which exceeds " << abs_error_expr << ", where\n" + << expr1 << " evaluates to " << val1 << ",\n" + << expr2 << " evaluates to " << val2 << ", and\n" + << abs_error_expr << " evaluates to " << abs_error << "."; +} + + +// Helper template for implementing FloatLE() and DoubleLE(). +template +AssertionResult FloatingPointLE(const char* expr1, + const char* expr2, + RawType val1, + RawType val2) { + // Returns success if val1 is less than val2, + if (val1 < val2) { + return AssertionSuccess(); + } + + // or if val1 is almost equal to val2. + const FloatingPoint lhs(val1), rhs(val2); + if (lhs.AlmostEquals(rhs)) { + return AssertionSuccess(); + } + + // Note that the above two checks will both fail if either val1 or + // val2 is NaN, as the IEEE floating-point standard requires that + // any predicate involving a NaN must return false. + + ::std::stringstream val1_ss; + val1_ss << std::setprecision(std::numeric_limits::digits10 + 2) + << val1; + + ::std::stringstream val2_ss; + val2_ss << std::setprecision(std::numeric_limits::digits10 + 2) + << val2; + + return AssertionFailure() + << "Expected: (" << expr1 << ") <= (" << expr2 << ")\n" + << " Actual: " << StringStreamToString(&val1_ss) << " vs " + << StringStreamToString(&val2_ss); +} + +} // namespace internal + +// Asserts that val1 is less than, or almost equal to, val2. Fails +// otherwise. In particular, it fails if either val1 or val2 is NaN. +AssertionResult FloatLE(const char* expr1, const char* expr2, + float val1, float val2) { + return internal::FloatingPointLE(expr1, expr2, val1, val2); +} + +// Asserts that val1 is less than, or almost equal to, val2. Fails +// otherwise. In particular, it fails if either val1 or val2 is NaN. +AssertionResult DoubleLE(const char* expr1, const char* expr2, + double val1, double val2) { + return internal::FloatingPointLE(expr1, expr2, val1, val2); +} + +namespace internal { + +// The helper function for {ASSERT|EXPECT}_EQ with int or enum +// arguments. +AssertionResult CmpHelperEQ(const char* expected_expression, + const char* actual_expression, + BiggestInt expected, + BiggestInt actual) { + if (expected == actual) { + return AssertionSuccess(); + } + + return EqFailure(expected_expression, + actual_expression, + FormatForComparisonFailureMessage(expected, actual), + FormatForComparisonFailureMessage(actual, expected), + false); +} + +// A macro for implementing the helper functions needed to implement +// ASSERT_?? and EXPECT_?? with integer or enum arguments. It is here +// just to avoid copy-and-paste of similar code. +#define GTEST_IMPL_CMP_HELPER_(op_name, op)\ +AssertionResult CmpHelper##op_name(const char* expr1, const char* expr2, \ + BiggestInt val1, BiggestInt val2) {\ + if (val1 op val2) {\ + return AssertionSuccess();\ + } else {\ + return AssertionFailure() \ + << "Expected: (" << expr1 << ") " #op " (" << expr2\ + << "), actual: " << FormatForComparisonFailureMessage(val1, val2)\ + << " vs " << FormatForComparisonFailureMessage(val2, val1);\ + }\ +} + +// Implements the helper function for {ASSERT|EXPECT}_NE with int or +// enum arguments. +GTEST_IMPL_CMP_HELPER_(NE, !=) +// Implements the helper function for {ASSERT|EXPECT}_LE with int or +// enum arguments. +GTEST_IMPL_CMP_HELPER_(LE, <=) +// Implements the helper function for {ASSERT|EXPECT}_LT with int or +// enum arguments. +GTEST_IMPL_CMP_HELPER_(LT, < ) +// Implements the helper function for {ASSERT|EXPECT}_GE with int or +// enum arguments. +GTEST_IMPL_CMP_HELPER_(GE, >=) +// Implements the helper function for {ASSERT|EXPECT}_GT with int or +// enum arguments. +GTEST_IMPL_CMP_HELPER_(GT, > ) + +#undef GTEST_IMPL_CMP_HELPER_ + +// The helper function for {ASSERT|EXPECT}_STREQ. +AssertionResult CmpHelperSTREQ(const char* expected_expression, + const char* actual_expression, + const char* expected, + const char* actual) { + if (String::CStringEquals(expected, actual)) { + return AssertionSuccess(); + } + + return EqFailure(expected_expression, + actual_expression, + PrintToString(expected), + PrintToString(actual), + false); +} + +// The helper function for {ASSERT|EXPECT}_STRCASEEQ. +AssertionResult CmpHelperSTRCASEEQ(const char* expected_expression, + const char* actual_expression, + const char* expected, + const char* actual) { + if (String::CaseInsensitiveCStringEquals(expected, actual)) { + return AssertionSuccess(); + } + + return EqFailure(expected_expression, + actual_expression, + PrintToString(expected), + PrintToString(actual), + true); +} + +// The helper function for {ASSERT|EXPECT}_STRNE. +AssertionResult CmpHelperSTRNE(const char* s1_expression, + const char* s2_expression, + const char* s1, + const char* s2) { + if (!String::CStringEquals(s1, s2)) { + return AssertionSuccess(); + } else { + return AssertionFailure() << "Expected: (" << s1_expression << ") != (" + << s2_expression << "), actual: \"" + << s1 << "\" vs \"" << s2 << "\""; + } +} + +// The helper function for {ASSERT|EXPECT}_STRCASENE. +AssertionResult CmpHelperSTRCASENE(const char* s1_expression, + const char* s2_expression, + const char* s1, + const char* s2) { + if (!String::CaseInsensitiveCStringEquals(s1, s2)) { + return AssertionSuccess(); + } else { + return AssertionFailure() + << "Expected: (" << s1_expression << ") != (" + << s2_expression << ") (ignoring case), actual: \"" + << s1 << "\" vs \"" << s2 << "\""; + } +} + +} // namespace internal + +namespace { + +// Helper functions for implementing IsSubString() and IsNotSubstring(). + +// This group of overloaded functions return true iff needle is a +// substring of haystack. NULL is considered a substring of itself +// only. + +bool IsSubstringPred(const char* needle, const char* haystack) { + if (needle == NULL || haystack == NULL) + return needle == haystack; + + return strstr(haystack, needle) != NULL; +} + +bool IsSubstringPred(const wchar_t* needle, const wchar_t* haystack) { + if (needle == NULL || haystack == NULL) + return needle == haystack; + + return wcsstr(haystack, needle) != NULL; +} + +// StringType here can be either ::std::string or ::std::wstring. +template +bool IsSubstringPred(const StringType& needle, + const StringType& haystack) { + return haystack.find(needle) != StringType::npos; +} + +// This function implements either IsSubstring() or IsNotSubstring(), +// depending on the value of the expected_to_be_substring parameter. +// StringType here can be const char*, const wchar_t*, ::std::string, +// or ::std::wstring. +template +AssertionResult IsSubstringImpl( + bool expected_to_be_substring, + const char* needle_expr, const char* haystack_expr, + const StringType& needle, const StringType& haystack) { + if (IsSubstringPred(needle, haystack) == expected_to_be_substring) + return AssertionSuccess(); + + const bool is_wide_string = sizeof(needle[0]) > 1; + const char* const begin_string_quote = is_wide_string ? "L\"" : "\""; + return AssertionFailure() + << "Value of: " << needle_expr << "\n" + << " Actual: " << begin_string_quote << needle << "\"\n" + << "Expected: " << (expected_to_be_substring ? "" : "not ") + << "a substring of " << haystack_expr << "\n" + << "Which is: " << begin_string_quote << haystack << "\""; +} + +} // namespace + +// IsSubstring() and IsNotSubstring() check whether needle is a +// substring of haystack (NULL is considered a substring of itself +// only), and return an appropriate error message when they fail. + +AssertionResult IsSubstring( + const char* needle_expr, const char* haystack_expr, + const char* needle, const char* haystack) { + return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack); +} + +AssertionResult IsSubstring( + const char* needle_expr, const char* haystack_expr, + const wchar_t* needle, const wchar_t* haystack) { + return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack); +} + +AssertionResult IsNotSubstring( + const char* needle_expr, const char* haystack_expr, + const char* needle, const char* haystack) { + return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack); +} + +AssertionResult IsNotSubstring( + const char* needle_expr, const char* haystack_expr, + const wchar_t* needle, const wchar_t* haystack) { + return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack); +} + +AssertionResult IsSubstring( + const char* needle_expr, const char* haystack_expr, + const ::std::string& needle, const ::std::string& haystack) { + return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack); +} + +AssertionResult IsNotSubstring( + const char* needle_expr, const char* haystack_expr, + const ::std::string& needle, const ::std::string& haystack) { + return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack); +} + +#if GTEST_HAS_STD_WSTRING +AssertionResult IsSubstring( + const char* needle_expr, const char* haystack_expr, + const ::std::wstring& needle, const ::std::wstring& haystack) { + return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack); +} + +AssertionResult IsNotSubstring( + const char* needle_expr, const char* haystack_expr, + const ::std::wstring& needle, const ::std::wstring& haystack) { + return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack); +} +#endif // GTEST_HAS_STD_WSTRING + +namespace internal { + +#if GTEST_OS_WINDOWS + +namespace { + +// Helper function for IsHRESULT{SuccessFailure} predicates +AssertionResult HRESULTFailureHelper(const char* expr, + const char* expected, + long hr) { // NOLINT +# if GTEST_OS_WINDOWS_MOBILE + + // Windows CE doesn't support FormatMessage. + const char error_text[] = ""; + +# else + + // Looks up the human-readable system message for the HRESULT code + // and since we're not passing any params to FormatMessage, we don't + // want inserts expanded. + const DWORD kFlags = FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS; + const DWORD kBufSize = 4096; + // Gets the system's human readable message string for this HRESULT. + char error_text[kBufSize] = { '\0' }; + DWORD message_length = ::FormatMessageA(kFlags, + 0, // no source, we're asking system + hr, // the error + 0, // no line width restrictions + error_text, // output buffer + kBufSize, // buf size + NULL); // no arguments for inserts + // Trims tailing white space (FormatMessage leaves a trailing CR-LF) + for (; message_length && IsSpace(error_text[message_length - 1]); + --message_length) { + error_text[message_length - 1] = '\0'; + } + +# endif // GTEST_OS_WINDOWS_MOBILE + + const std::string error_hex("0x" + String::FormatHexInt(hr)); + return ::testing::AssertionFailure() + << "Expected: " << expr << " " << expected << ".\n" + << " Actual: " << error_hex << " " << error_text << "\n"; +} + +} // namespace + +AssertionResult IsHRESULTSuccess(const char* expr, long hr) { // NOLINT + if (SUCCEEDED(hr)) { + return AssertionSuccess(); + } + return HRESULTFailureHelper(expr, "succeeds", hr); +} + +AssertionResult IsHRESULTFailure(const char* expr, long hr) { // NOLINT + if (FAILED(hr)) { + return AssertionSuccess(); + } + return HRESULTFailureHelper(expr, "fails", hr); +} + +#endif // GTEST_OS_WINDOWS + +// Utility functions for encoding Unicode text (wide strings) in +// UTF-8. + +// A Unicode code-point can have upto 21 bits, and is encoded in UTF-8 +// like this: +// +// Code-point length Encoding +// 0 - 7 bits 0xxxxxxx +// 8 - 11 bits 110xxxxx 10xxxxxx +// 12 - 16 bits 1110xxxx 10xxxxxx 10xxxxxx +// 17 - 21 bits 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + +// The maximum code-point a one-byte UTF-8 sequence can represent. +const UInt32 kMaxCodePoint1 = (static_cast(1) << 7) - 1; + +// The maximum code-point a two-byte UTF-8 sequence can represent. +const UInt32 kMaxCodePoint2 = (static_cast(1) << (5 + 6)) - 1; + +// The maximum code-point a three-byte UTF-8 sequence can represent. +const UInt32 kMaxCodePoint3 = (static_cast(1) << (4 + 2*6)) - 1; + +// The maximum code-point a four-byte UTF-8 sequence can represent. +const UInt32 kMaxCodePoint4 = (static_cast(1) << (3 + 3*6)) - 1; + +// Chops off the n lowest bits from a bit pattern. Returns the n +// lowest bits. As a side effect, the original bit pattern will be +// shifted to the right by n bits. +inline UInt32 ChopLowBits(UInt32* bits, int n) { + const UInt32 low_bits = *bits & ((static_cast(1) << n) - 1); + *bits >>= n; + return low_bits; +} + +// Converts a Unicode code point to a narrow string in UTF-8 encoding. +// code_point parameter is of type UInt32 because wchar_t may not be +// wide enough to contain a code point. +// If the code_point is not a valid Unicode code point +// (i.e. outside of Unicode range U+0 to U+10FFFF) it will be converted +// to "(Invalid Unicode 0xXXXXXXXX)". +std::string CodePointToUtf8(UInt32 code_point) { + if (code_point > kMaxCodePoint4) { + return "(Invalid Unicode 0x" + String::FormatHexInt(code_point) + ")"; + } + + char str[5]; // Big enough for the largest valid code point. + if (code_point <= kMaxCodePoint1) { + str[1] = '\0'; + str[0] = static_cast(code_point); // 0xxxxxxx + } else if (code_point <= kMaxCodePoint2) { + str[2] = '\0'; + str[1] = static_cast(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx + str[0] = static_cast(0xC0 | code_point); // 110xxxxx + } else if (code_point <= kMaxCodePoint3) { + str[3] = '\0'; + str[2] = static_cast(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx + str[1] = static_cast(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx + str[0] = static_cast(0xE0 | code_point); // 1110xxxx + } else { // code_point <= kMaxCodePoint4 + str[4] = '\0'; + str[3] = static_cast(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx + str[2] = static_cast(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx + str[1] = static_cast(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx + str[0] = static_cast(0xF0 | code_point); // 11110xxx + } + return str; +} + +// The following two functions only make sense if the the system +// uses UTF-16 for wide string encoding. All supported systems +// with 16 bit wchar_t (Windows, Cygwin, Symbian OS) do use UTF-16. + +// Determines if the arguments constitute UTF-16 surrogate pair +// and thus should be combined into a single Unicode code point +// using CreateCodePointFromUtf16SurrogatePair. +inline bool IsUtf16SurrogatePair(wchar_t first, wchar_t second) { + return sizeof(wchar_t) == 2 && + (first & 0xFC00) == 0xD800 && (second & 0xFC00) == 0xDC00; +} + +// Creates a Unicode code point from UTF16 surrogate pair. +inline UInt32 CreateCodePointFromUtf16SurrogatePair(wchar_t first, + wchar_t second) { + const UInt32 mask = (1 << 10) - 1; + return (sizeof(wchar_t) == 2) ? + (((first & mask) << 10) | (second & mask)) + 0x10000 : + // This function should not be called when the condition is + // false, but we provide a sensible default in case it is. + static_cast(first); +} + +// Converts a wide string to a narrow string in UTF-8 encoding. +// The wide string is assumed to have the following encoding: +// UTF-16 if sizeof(wchar_t) == 2 (on Windows, Cygwin, Symbian OS) +// UTF-32 if sizeof(wchar_t) == 4 (on Linux) +// Parameter str points to a null-terminated wide string. +// Parameter num_chars may additionally limit the number +// of wchar_t characters processed. -1 is used when the entire string +// should be processed. +// If the string contains code points that are not valid Unicode code points +// (i.e. outside of Unicode range U+0 to U+10FFFF) they will be output +// as '(Invalid Unicode 0xXXXXXXXX)'. If the string is in UTF16 encoding +// and contains invalid UTF-16 surrogate pairs, values in those pairs +// will be encoded as individual Unicode characters from Basic Normal Plane. +std::string WideStringToUtf8(const wchar_t* str, int num_chars) { + if (num_chars == -1) + num_chars = static_cast(wcslen(str)); + + ::std::stringstream stream; + for (int i = 0; i < num_chars; ++i) { + UInt32 unicode_code_point; + + if (str[i] == L'\0') { + break; + } else if (i + 1 < num_chars && IsUtf16SurrogatePair(str[i], str[i + 1])) { + unicode_code_point = CreateCodePointFromUtf16SurrogatePair(str[i], + str[i + 1]); + i++; + } else { + unicode_code_point = static_cast(str[i]); + } + + stream << CodePointToUtf8(unicode_code_point); + } + return StringStreamToString(&stream); +} + +// Converts a wide C string to an std::string using the UTF-8 encoding. +// NULL will be converted to "(null)". +std::string String::ShowWideCString(const wchar_t * wide_c_str) { + if (wide_c_str == NULL) return "(null)"; + + return internal::WideStringToUtf8(wide_c_str, -1); +} + +// Compares two wide C strings. Returns true iff they have the same +// content. +// +// Unlike wcscmp(), this function can handle NULL argument(s). A NULL +// C string is considered different to any non-NULL C string, +// including the empty string. +bool String::WideCStringEquals(const wchar_t * lhs, const wchar_t * rhs) { + if (lhs == NULL) return rhs == NULL; + + if (rhs == NULL) return false; + + return wcscmp(lhs, rhs) == 0; +} + +// Helper function for *_STREQ on wide strings. +AssertionResult CmpHelperSTREQ(const char* expected_expression, + const char* actual_expression, + const wchar_t* expected, + const wchar_t* actual) { + if (String::WideCStringEquals(expected, actual)) { + return AssertionSuccess(); + } + + return EqFailure(expected_expression, + actual_expression, + PrintToString(expected), + PrintToString(actual), + false); +} + +// Helper function for *_STRNE on wide strings. +AssertionResult CmpHelperSTRNE(const char* s1_expression, + const char* s2_expression, + const wchar_t* s1, + const wchar_t* s2) { + if (!String::WideCStringEquals(s1, s2)) { + return AssertionSuccess(); + } + + return AssertionFailure() << "Expected: (" << s1_expression << ") != (" + << s2_expression << "), actual: " + << PrintToString(s1) + << " vs " << PrintToString(s2); +} + +// Compares two C strings, ignoring case. Returns true iff they have +// the same content. +// +// Unlike strcasecmp(), this function can handle NULL argument(s). A +// NULL C string is considered different to any non-NULL C string, +// including the empty string. +bool String::CaseInsensitiveCStringEquals(const char * lhs, const char * rhs) { + if (lhs == NULL) + return rhs == NULL; + if (rhs == NULL) + return false; + return posix::StrCaseCmp(lhs, rhs) == 0; +} + + // Compares two wide C strings, ignoring case. Returns true iff they + // have the same content. + // + // Unlike wcscasecmp(), this function can handle NULL argument(s). + // A NULL C string is considered different to any non-NULL wide C string, + // including the empty string. + // NB: The implementations on different platforms slightly differ. + // On windows, this method uses _wcsicmp which compares according to LC_CTYPE + // environment variable. On GNU platform this method uses wcscasecmp + // which compares according to LC_CTYPE category of the current locale. + // On MacOS X, it uses towlower, which also uses LC_CTYPE category of the + // current locale. +bool String::CaseInsensitiveWideCStringEquals(const wchar_t* lhs, + const wchar_t* rhs) { + if (lhs == NULL) return rhs == NULL; + + if (rhs == NULL) return false; + +#if GTEST_OS_WINDOWS + return _wcsicmp(lhs, rhs) == 0; +#elif GTEST_OS_LINUX && !GTEST_OS_LINUX_ANDROID + return wcscasecmp(lhs, rhs) == 0; +#else + // Android, Mac OS X and Cygwin don't define wcscasecmp. + // Other unknown OSes may not define it either. + wint_t left, right; + do { + left = towlower(*lhs++); + right = towlower(*rhs++); + } while (left && left == right); + return left == right; +#endif // OS selector +} + +// Returns true iff str ends with the given suffix, ignoring case. +// Any string is considered to end with an empty suffix. +bool String::EndsWithCaseInsensitive( + const std::string& str, const std::string& suffix) { + const size_t str_len = str.length(); + const size_t suffix_len = suffix.length(); + return (str_len >= suffix_len) && + CaseInsensitiveCStringEquals(str.c_str() + str_len - suffix_len, + suffix.c_str()); +} + +// Formats an int value as "%02d". +std::string String::FormatIntWidth2(int value) { + std::stringstream ss; + ss << std::setfill('0') << std::setw(2) << value; + return ss.str(); +} + +// Formats an int value as "%X". +std::string String::FormatHexInt(int value) { + std::stringstream ss; + ss << std::hex << std::uppercase << value; + return ss.str(); +} + +// Formats a byte as "%02X". +std::string String::FormatByte(unsigned char value) { + std::stringstream ss; + ss << std::setfill('0') << std::setw(2) << std::hex << std::uppercase + << static_cast(value); + return ss.str(); +} + +// Converts the buffer in a stringstream to an std::string, converting NUL +// bytes to "\\0" along the way. +std::string StringStreamToString(::std::stringstream* ss) { + const ::std::string& str = ss->str(); + const char* const start = str.c_str(); + const char* const end = start + str.length(); + + std::string result; + result.reserve(2 * (end - start)); + for (const char* ch = start; ch != end; ++ch) { + if (*ch == '\0') { + result += "\\0"; // Replaces NUL with "\\0"; + } else { + result += *ch; + } + } + + return result; +} + +// Appends the user-supplied message to the Google-Test-generated message. +std::string AppendUserMessage(const std::string& gtest_msg, + const Message& user_msg) { + // Appends the user message if it's non-empty. + const std::string user_msg_string = user_msg.GetString(); + if (user_msg_string.empty()) { + return gtest_msg; + } + + return gtest_msg + "\n" + user_msg_string; +} + +} // namespace internal + +// class TestResult + +// Creates an empty TestResult. +TestResult::TestResult() + : death_test_count_(0), + elapsed_time_(0) { +} + +// D'tor. +TestResult::~TestResult() { +} + +// Returns the i-th test part result among all the results. i can +// range from 0 to total_part_count() - 1. If i is not in that range, +// aborts the program. +const TestPartResult& TestResult::GetTestPartResult(int i) const { + if (i < 0 || i >= total_part_count()) + internal::posix::Abort(); + return test_part_results_.at(i); +} + +// Returns the i-th test property. i can range from 0 to +// test_property_count() - 1. If i is not in that range, aborts the +// program. +const TestProperty& TestResult::GetTestProperty(int i) const { + if (i < 0 || i >= test_property_count()) + internal::posix::Abort(); + return test_properties_.at(i); +} + +// Clears the test part results. +void TestResult::ClearTestPartResults() { + test_part_results_.clear(); +} + +// Adds a test part result to the list. +void TestResult::AddTestPartResult(const TestPartResult& test_part_result) { + test_part_results_.push_back(test_part_result); +} + +// Adds a test property to the list. If a property with the same key as the +// supplied property is already represented, the value of this test_property +// replaces the old value for that key. +void TestResult::RecordProperty(const std::string& xml_element, + const TestProperty& test_property) { + if (!ValidateTestProperty(xml_element, test_property)) { + return; + } + internal::MutexLock lock(&test_properites_mutex_); + const std::vector::iterator property_with_matching_key = + std::find_if(test_properties_.begin(), test_properties_.end(), + internal::TestPropertyKeyIs(test_property.key())); + if (property_with_matching_key == test_properties_.end()) { + test_properties_.push_back(test_property); + return; + } + property_with_matching_key->SetValue(test_property.value()); +} + +// The list of reserved attributes used in the element of XML +// output. +static const char* const kReservedTestSuitesAttributes[] = { + "disabled", + "errors", + "failures", + "name", + "random_seed", + "tests", + "time", + "timestamp" +}; + +// The list of reserved attributes used in the element of XML +// output. +static const char* const kReservedTestSuiteAttributes[] = { + "disabled", + "errors", + "failures", + "name", + "tests", + "time" +}; + +// The list of reserved attributes used in the element of XML output. +static const char* const kReservedTestCaseAttributes[] = { + "classname", + "name", + "status", + "time", + "type_param", + "value_param" +}; + +template +std::vector ArrayAsVector(const char* const (&array)[kSize]) { + return std::vector(array, array + kSize); +} + +static std::vector GetReservedAttributesForElement( + const std::string& xml_element) { + if (xml_element == "testsuites") { + return ArrayAsVector(kReservedTestSuitesAttributes); + } else if (xml_element == "testsuite") { + return ArrayAsVector(kReservedTestSuiteAttributes); + } else if (xml_element == "testcase") { + return ArrayAsVector(kReservedTestCaseAttributes); + } else { + GTEST_CHECK_(false) << "Unrecognized xml_element provided: " << xml_element; + } + // This code is unreachable but some compilers may not realizes that. + return std::vector(); +} + +static std::string FormatWordList(const std::vector& words) { + Message word_list; + for (size_t i = 0; i < words.size(); ++i) { + if (i > 0 && words.size() > 2) { + word_list << ", "; + } + if (i == words.size() - 1) { + word_list << "and "; + } + word_list << "'" << words[i] << "'"; + } + return word_list.GetString(); +} + +bool ValidateTestPropertyName(const std::string& property_name, + const std::vector& reserved_names) { + if (std::find(reserved_names.begin(), reserved_names.end(), property_name) != + reserved_names.end()) { + ADD_FAILURE() << "Reserved key used in RecordProperty(): " << property_name + << " (" << FormatWordList(reserved_names) + << " are reserved by " << GTEST_NAME_ << ")"; + return false; + } + return true; +} + +// Adds a failure if the key is a reserved attribute of the element named +// xml_element. Returns true if the property is valid. +bool TestResult::ValidateTestProperty(const std::string& xml_element, + const TestProperty& test_property) { + return ValidateTestPropertyName(test_property.key(), + GetReservedAttributesForElement(xml_element)); +} + +// Clears the object. +void TestResult::Clear() { + test_part_results_.clear(); + test_properties_.clear(); + death_test_count_ = 0; + elapsed_time_ = 0; +} + +// Returns true iff the test failed. +bool TestResult::Failed() const { + for (int i = 0; i < total_part_count(); ++i) { + if (GetTestPartResult(i).failed()) + return true; + } + return false; +} + +// Returns true iff the test part fatally failed. +static bool TestPartFatallyFailed(const TestPartResult& result) { + return result.fatally_failed(); +} + +// Returns true iff the test fatally failed. +bool TestResult::HasFatalFailure() const { + return CountIf(test_part_results_, TestPartFatallyFailed) > 0; +} + +// Returns true iff the test part non-fatally failed. +static bool TestPartNonfatallyFailed(const TestPartResult& result) { + return result.nonfatally_failed(); +} + +// Returns true iff the test has a non-fatal failure. +bool TestResult::HasNonfatalFailure() const { + return CountIf(test_part_results_, TestPartNonfatallyFailed) > 0; +} + +// Gets the number of all test parts. This is the sum of the number +// of successful test parts and the number of failed test parts. +int TestResult::total_part_count() const { + return static_cast(test_part_results_.size()); +} + +// Returns the number of the test properties. +int TestResult::test_property_count() const { + return static_cast(test_properties_.size()); +} + +// class Test + +// Creates a Test object. + +// The c'tor saves the values of all Google Test flags. +Test::Test() + : gtest_flag_saver_(new internal::GTestFlagSaver) { +} + +// The d'tor restores the values of all Google Test flags. +Test::~Test() { + delete gtest_flag_saver_; +} + +// Sets up the test fixture. +// +// A sub-class may override this. +void Test::SetUp() { +} + +// Tears down the test fixture. +// +// A sub-class may override this. +void Test::TearDown() { +} + +// Allows user supplied key value pairs to be recorded for later output. +void Test::RecordProperty(const std::string& key, const std::string& value) { + UnitTest::GetInstance()->RecordProperty(key, value); +} + +// Allows user supplied key value pairs to be recorded for later output. +void Test::RecordProperty(const std::string& key, int value) { + Message value_message; + value_message << value; + RecordProperty(key, value_message.GetString().c_str()); +} + +namespace internal { + +void ReportFailureInUnknownLocation(TestPartResult::Type result_type, + const std::string& message) { + // This function is a friend of UnitTest and as such has access to + // AddTestPartResult. + UnitTest::GetInstance()->AddTestPartResult( + result_type, + NULL, // No info about the source file where the exception occurred. + -1, // We have no info on which line caused the exception. + message, + ""); // No stack trace, either. +} + +} // namespace internal + +// Google Test requires all tests in the same test case to use the same test +// fixture class. This function checks if the current test has the +// same fixture class as the first test in the current test case. If +// yes, it returns true; otherwise it generates a Google Test failure and +// returns false. +bool Test::HasSameFixtureClass() { + internal::UnitTestImpl* const impl = internal::GetUnitTestImpl(); + const TestCase* const test_case = impl->current_test_case(); + + // Info about the first test in the current test case. + const TestInfo* const first_test_info = test_case->test_info_list()[0]; + const internal::TypeId first_fixture_id = first_test_info->fixture_class_id_; + const char* const first_test_name = first_test_info->name(); + + // Info about the current test. + const TestInfo* const this_test_info = impl->current_test_info(); + const internal::TypeId this_fixture_id = this_test_info->fixture_class_id_; + const char* const this_test_name = this_test_info->name(); + + if (this_fixture_id != first_fixture_id) { + // Is the first test defined using TEST? + const bool first_is_TEST = first_fixture_id == internal::GetTestTypeId(); + // Is this test defined using TEST? + const bool this_is_TEST = this_fixture_id == internal::GetTestTypeId(); + + if (first_is_TEST || this_is_TEST) { + // The user mixed TEST and TEST_F in this test case - we'll tell + // him/her how to fix it. + + // Gets the name of the TEST and the name of the TEST_F. Note + // that first_is_TEST and this_is_TEST cannot both be true, as + // the fixture IDs are different for the two tests. + const char* const TEST_name = + first_is_TEST ? first_test_name : this_test_name; + const char* const TEST_F_name = + first_is_TEST ? this_test_name : first_test_name; + + ADD_FAILURE() + << "All tests in the same test case must use the same test fixture\n" + << "class, so mixing TEST_F and TEST in the same test case is\n" + << "illegal. In test case " << this_test_info->test_case_name() + << ",\n" + << "test " << TEST_F_name << " is defined using TEST_F but\n" + << "test " << TEST_name << " is defined using TEST. You probably\n" + << "want to change the TEST to TEST_F or move it to another test\n" + << "case."; + } else { + // The user defined two fixture classes with the same name in + // two namespaces - we'll tell him/her how to fix it. + ADD_FAILURE() + << "All tests in the same test case must use the same test fixture\n" + << "class. However, in test case " + << this_test_info->test_case_name() << ",\n" + << "you defined test " << first_test_name + << " and test " << this_test_name << "\n" + << "using two different test fixture classes. This can happen if\n" + << "the two classes are from different namespaces or translation\n" + << "units and have the same name. You should probably rename one\n" + << "of the classes to put the tests into different test cases."; + } + return false; + } + + return true; +} + +#if GTEST_HAS_SEH + +// Adds an "exception thrown" fatal failure to the current test. This +// function returns its result via an output parameter pointer because VC++ +// prohibits creation of objects with destructors on stack in functions +// using __try (see error C2712). +static std::string* FormatSehExceptionMessage(DWORD exception_code, + const char* location) { + Message message; + message << "SEH exception with code 0x" << std::setbase(16) << + exception_code << std::setbase(10) << " thrown in " << location << "."; + + return new std::string(message.GetString()); +} + +#endif // GTEST_HAS_SEH + +namespace internal { + +#if GTEST_HAS_EXCEPTIONS + +// Adds an "exception thrown" fatal failure to the current test. +static std::string FormatCxxExceptionMessage(const char* description, + const char* location) { + Message message; + if (description != NULL) { + message << "C++ exception with description \"" << description << "\""; + } else { + message << "Unknown C++ exception"; + } + message << " thrown in " << location << "."; + + return message.GetString(); +} + +static std::string PrintTestPartResultToString( + const TestPartResult& test_part_result); + +GoogleTestFailureException::GoogleTestFailureException( + const TestPartResult& failure) + : ::std::runtime_error(PrintTestPartResultToString(failure).c_str()) {} + +#endif // GTEST_HAS_EXCEPTIONS + +// We put these helper functions in the internal namespace as IBM's xlC +// compiler rejects the code if they were declared static. + +// Runs the given method and handles SEH exceptions it throws, when +// SEH is supported; returns the 0-value for type Result in case of an +// SEH exception. (Microsoft compilers cannot handle SEH and C++ +// exceptions in the same function. Therefore, we provide a separate +// wrapper function for handling SEH exceptions.) +template +Result HandleSehExceptionsInMethodIfSupported( + T* object, Result (T::*method)(), const char* location) { +#if GTEST_HAS_SEH + __try { + return (object->*method)(); + } __except (internal::UnitTestOptions::GTestShouldProcessSEH( // NOLINT + GetExceptionCode())) { + // We create the exception message on the heap because VC++ prohibits + // creation of objects with destructors on stack in functions using __try + // (see error C2712). + std::string* exception_message = FormatSehExceptionMessage( + GetExceptionCode(), location); + internal::ReportFailureInUnknownLocation(TestPartResult::kFatalFailure, + *exception_message); + delete exception_message; + return static_cast(0); + } +#else + (void)location; + return (object->*method)(); +#endif // GTEST_HAS_SEH +} + +// Runs the given method and catches and reports C++ and/or SEH-style +// exceptions, if they are supported; returns the 0-value for type +// Result in case of an SEH exception. +template +Result HandleExceptionsInMethodIfSupported( + T* object, Result (T::*method)(), const char* location) { + // NOTE: The user code can affect the way in which Google Test handles + // exceptions by setting GTEST_FLAG(catch_exceptions), but only before + // RUN_ALL_TESTS() starts. It is technically possible to check the flag + // after the exception is caught and either report or re-throw the + // exception based on the flag's value: + // + // try { + // // Perform the test method. + // } catch (...) { + // if (GTEST_FLAG(catch_exceptions)) + // // Report the exception as failure. + // else + // throw; // Re-throws the original exception. + // } + // + // However, the purpose of this flag is to allow the program to drop into + // the debugger when the exception is thrown. On most platforms, once the + // control enters the catch block, the exception origin information is + // lost and the debugger will stop the program at the point of the + // re-throw in this function -- instead of at the point of the original + // throw statement in the code under test. For this reason, we perform + // the check early, sacrificing the ability to affect Google Test's + // exception handling in the method where the exception is thrown. + if (internal::GetUnitTestImpl()->catch_exceptions()) { +#if GTEST_HAS_EXCEPTIONS + try { + return HandleSehExceptionsInMethodIfSupported(object, method, location); + } catch (const internal::GoogleTestFailureException&) { // NOLINT + // This exception type can only be thrown by a failed Google + // Test assertion with the intention of letting another testing + // framework catch it. Therefore we just re-throw it. + throw; + } catch (const std::exception& e) { // NOLINT + internal::ReportFailureInUnknownLocation( + TestPartResult::kFatalFailure, + FormatCxxExceptionMessage(e.what(), location)); + } catch (...) { // NOLINT + internal::ReportFailureInUnknownLocation( + TestPartResult::kFatalFailure, + FormatCxxExceptionMessage(NULL, location)); + } + return static_cast(0); +#else + return HandleSehExceptionsInMethodIfSupported(object, method, location); +#endif // GTEST_HAS_EXCEPTIONS + } else { + return (object->*method)(); + } +} + +} // namespace internal + +// Runs the test and updates the test result. +void Test::Run() { + if (!HasSameFixtureClass()) return; + + internal::UnitTestImpl* const impl = internal::GetUnitTestImpl(); + impl->os_stack_trace_getter()->UponLeavingGTest(); + internal::HandleExceptionsInMethodIfSupported(this, &Test::SetUp, "SetUp()"); + // We will run the test only if SetUp() was successful. + if (!HasFatalFailure()) { + impl->os_stack_trace_getter()->UponLeavingGTest(); + internal::HandleExceptionsInMethodIfSupported( + this, &Test::TestBody, "the test body"); + } + + // However, we want to clean up as much as possible. Hence we will + // always call TearDown(), even if SetUp() or the test body has + // failed. + impl->os_stack_trace_getter()->UponLeavingGTest(); + internal::HandleExceptionsInMethodIfSupported( + this, &Test::TearDown, "TearDown()"); +} + +// Returns true iff the current test has a fatal failure. +bool Test::HasFatalFailure() { + return internal::GetUnitTestImpl()->current_test_result()->HasFatalFailure(); +} + +// Returns true iff the current test has a non-fatal failure. +bool Test::HasNonfatalFailure() { + return internal::GetUnitTestImpl()->current_test_result()-> + HasNonfatalFailure(); +} + +// class TestInfo + +// Constructs a TestInfo object. It assumes ownership of the test factory +// object. +TestInfo::TestInfo(const std::string& a_test_case_name, + const std::string& a_name, + const char* a_type_param, + const char* a_value_param, + internal::TypeId fixture_class_id, + internal::TestFactoryBase* factory) + : test_case_name_(a_test_case_name), + name_(a_name), + type_param_(a_type_param ? new std::string(a_type_param) : NULL), + value_param_(a_value_param ? new std::string(a_value_param) : NULL), + fixture_class_id_(fixture_class_id), + should_run_(false), + is_disabled_(false), + matches_filter_(false), + factory_(factory), + result_() {} + +// Destructs a TestInfo object. +TestInfo::~TestInfo() { delete factory_; } + +namespace internal { + +// Creates a new TestInfo object and registers it with Google Test; +// returns the created object. +// +// Arguments: +// +// test_case_name: name of the test case +// name: name of the test +// type_param: the name of the test's type parameter, or NULL if +// this is not a typed or a type-parameterized test. +// value_param: text representation of the test's value parameter, +// or NULL if this is not a value-parameterized test. +// fixture_class_id: ID of the test fixture class +// set_up_tc: pointer to the function that sets up the test case +// tear_down_tc: pointer to the function that tears down the test case +// factory: pointer to the factory that creates a test object. +// The newly created TestInfo instance will assume +// ownership of the factory object. +TestInfo* MakeAndRegisterTestInfo( + const char* test_case_name, + const char* name, + const char* type_param, + const char* value_param, + TypeId fixture_class_id, + SetUpTestCaseFunc set_up_tc, + TearDownTestCaseFunc tear_down_tc, + TestFactoryBase* factory) { + TestInfo* const test_info = + new TestInfo(test_case_name, name, type_param, value_param, + fixture_class_id, factory); + GetUnitTestImpl()->AddTestInfo(set_up_tc, tear_down_tc, test_info); + return test_info; +} + +#if GTEST_HAS_PARAM_TEST +void ReportInvalidTestCaseType(const char* test_case_name, + const char* file, int line) { + Message errors; + errors + << "Attempted redefinition of test case " << test_case_name << ".\n" + << "All tests in the same test case must use the same test fixture\n" + << "class. However, in test case " << test_case_name << ", you tried\n" + << "to define a test using a fixture class different from the one\n" + << "used earlier. This can happen if the two fixture classes are\n" + << "from different namespaces and have the same name. You should\n" + << "probably rename one of the classes to put the tests into different\n" + << "test cases."; + + fprintf(stderr, "%s %s", FormatFileLocation(file, line).c_str(), + errors.GetString().c_str()); +} +#endif // GTEST_HAS_PARAM_TEST + +} // namespace internal + +namespace { + +// A predicate that checks the test name of a TestInfo against a known +// value. +// +// This is used for implementation of the TestCase class only. We put +// it in the anonymous namespace to prevent polluting the outer +// namespace. +// +// TestNameIs is copyable. +class TestNameIs { + public: + // Constructor. + // + // TestNameIs has NO default constructor. + explicit TestNameIs(const char* name) + : name_(name) {} + + // Returns true iff the test name of test_info matches name_. + bool operator()(const TestInfo * test_info) const { + return test_info && test_info->name() == name_; + } + + private: + std::string name_; +}; + +} // namespace + +namespace internal { + +// This method expands all parameterized tests registered with macros TEST_P +// and INSTANTIATE_TEST_CASE_P into regular tests and registers those. +// This will be done just once during the program runtime. +void UnitTestImpl::RegisterParameterizedTests() { +#if GTEST_HAS_PARAM_TEST + if (!parameterized_tests_registered_) { + parameterized_test_registry_.RegisterTests(); + parameterized_tests_registered_ = true; + } +#endif +} + +} // namespace internal + +// Creates the test object, runs it, records its result, and then +// deletes it. +void TestInfo::Run() { + if (!should_run_) return; + + // Tells UnitTest where to store test result. + internal::UnitTestImpl* const impl = internal::GetUnitTestImpl(); + impl->set_current_test_info(this); + + TestEventListener* repeater = UnitTest::GetInstance()->listeners().repeater(); + + // Notifies the unit test event listeners that a test is about to start. + repeater->OnTestStart(*this); + + const TimeInMillis start = internal::GetTimeInMillis(); + + impl->os_stack_trace_getter()->UponLeavingGTest(); + + // Creates the test object. + Test* const test = internal::HandleExceptionsInMethodIfSupported( + factory_, &internal::TestFactoryBase::CreateTest, + "the test fixture's constructor"); + + // Runs the test only if the test object was created and its + // constructor didn't generate a fatal failure. + if ((test != NULL) && !Test::HasFatalFailure()) { + // This doesn't throw as all user code that can throw are wrapped into + // exception handling code. + test->Run(); + } + + // Deletes the test object. + impl->os_stack_trace_getter()->UponLeavingGTest(); + internal::HandleExceptionsInMethodIfSupported( + test, &Test::DeleteSelf_, "the test fixture's destructor"); + + result_.set_elapsed_time(internal::GetTimeInMillis() - start); + + // Notifies the unit test event listener that a test has just finished. + repeater->OnTestEnd(*this); + + // Tells UnitTest to stop associating assertion results to this + // test. + impl->set_current_test_info(NULL); +} + +// class TestCase + +// Gets the number of successful tests in this test case. +int TestCase::successful_test_count() const { + return CountIf(test_info_list_, TestPassed); +} + +// Gets the number of failed tests in this test case. +int TestCase::failed_test_count() const { + return CountIf(test_info_list_, TestFailed); +} + +// Gets the number of disabled tests that will be reported in the XML report. +int TestCase::reportable_disabled_test_count() const { + return CountIf(test_info_list_, TestReportableDisabled); +} + +// Gets the number of disabled tests in this test case. +int TestCase::disabled_test_count() const { + return CountIf(test_info_list_, TestDisabled); +} + +// Gets the number of tests to be printed in the XML report. +int TestCase::reportable_test_count() const { + return CountIf(test_info_list_, TestReportable); +} + +// Get the number of tests in this test case that should run. +int TestCase::test_to_run_count() const { + return CountIf(test_info_list_, ShouldRunTest); +} + +// Gets the number of all tests. +int TestCase::total_test_count() const { + return static_cast(test_info_list_.size()); +} + +// Creates a TestCase with the given name. +// +// Arguments: +// +// name: name of the test case +// a_type_param: the name of the test case's type parameter, or NULL if +// this is not a typed or a type-parameterized test case. +// set_up_tc: pointer to the function that sets up the test case +// tear_down_tc: pointer to the function that tears down the test case +TestCase::TestCase(const char* a_name, const char* a_type_param, + Test::SetUpTestCaseFunc set_up_tc, + Test::TearDownTestCaseFunc tear_down_tc) + : name_(a_name), + type_param_(a_type_param ? new std::string(a_type_param) : NULL), + set_up_tc_(set_up_tc), + tear_down_tc_(tear_down_tc), + should_run_(false), + elapsed_time_(0) { +} + +// Destructor of TestCase. +TestCase::~TestCase() { + // Deletes every Test in the collection. + ForEach(test_info_list_, internal::Delete); +} + +// Returns the i-th test among all the tests. i can range from 0 to +// total_test_count() - 1. If i is not in that range, returns NULL. +const TestInfo* TestCase::GetTestInfo(int i) const { + const int index = GetElementOr(test_indices_, i, -1); + return index < 0 ? NULL : test_info_list_[index]; +} + +// Returns the i-th test among all the tests. i can range from 0 to +// total_test_count() - 1. If i is not in that range, returns NULL. +TestInfo* TestCase::GetMutableTestInfo(int i) { + const int index = GetElementOr(test_indices_, i, -1); + return index < 0 ? NULL : test_info_list_[index]; +} + +// Adds a test to this test case. Will delete the test upon +// destruction of the TestCase object. +void TestCase::AddTestInfo(TestInfo * test_info) { + test_info_list_.push_back(test_info); + test_indices_.push_back(static_cast(test_indices_.size())); +} + +// Runs every test in this TestCase. +void TestCase::Run() { + if (!should_run_) return; + + internal::UnitTestImpl* const impl = internal::GetUnitTestImpl(); + impl->set_current_test_case(this); + + TestEventListener* repeater = UnitTest::GetInstance()->listeners().repeater(); + + repeater->OnTestCaseStart(*this); + impl->os_stack_trace_getter()->UponLeavingGTest(); + internal::HandleExceptionsInMethodIfSupported( + this, &TestCase::RunSetUpTestCase, "SetUpTestCase()"); + + const internal::TimeInMillis start = internal::GetTimeInMillis(); + for (int i = 0; i < total_test_count(); i++) { + GetMutableTestInfo(i)->Run(); + } + elapsed_time_ = internal::GetTimeInMillis() - start; + + impl->os_stack_trace_getter()->UponLeavingGTest(); + internal::HandleExceptionsInMethodIfSupported( + this, &TestCase::RunTearDownTestCase, "TearDownTestCase()"); + + repeater->OnTestCaseEnd(*this); + impl->set_current_test_case(NULL); +} + +// Clears the results of all tests in this test case. +void TestCase::ClearResult() { + ad_hoc_test_result_.Clear(); + ForEach(test_info_list_, TestInfo::ClearTestResult); +} + +// Shuffles the tests in this test case. +void TestCase::ShuffleTests(internal::Random* random) { + Shuffle(random, &test_indices_); +} + +// Restores the test order to before the first shuffle. +void TestCase::UnshuffleTests() { + for (size_t i = 0; i < test_indices_.size(); i++) { + test_indices_[i] = static_cast(i); + } +} + +// Formats a countable noun. Depending on its quantity, either the +// singular form or the plural form is used. e.g. +// +// FormatCountableNoun(1, "formula", "formuli") returns "1 formula". +// FormatCountableNoun(5, "book", "books") returns "5 books". +static std::string FormatCountableNoun(int count, + const char * singular_form, + const char * plural_form) { + return internal::StreamableToString(count) + " " + + (count == 1 ? singular_form : plural_form); +} + +// Formats the count of tests. +static std::string FormatTestCount(int test_count) { + return FormatCountableNoun(test_count, "test", "tests"); +} + +// Formats the count of test cases. +static std::string FormatTestCaseCount(int test_case_count) { + return FormatCountableNoun(test_case_count, "test case", "test cases"); +} + +// Converts a TestPartResult::Type enum to human-friendly string +// representation. Both kNonFatalFailure and kFatalFailure are translated +// to "Failure", as the user usually doesn't care about the difference +// between the two when viewing the test result. +static const char * TestPartResultTypeToString(TestPartResult::Type type) { + switch (type) { + case TestPartResult::kSuccess: + return "Success"; + + case TestPartResult::kNonFatalFailure: + case TestPartResult::kFatalFailure: +#ifdef _MSC_VER + return "error: "; +#else + return "Failure\n"; +#endif + default: + return "Unknown result type"; + } +} + +namespace internal { + +// Prints a TestPartResult to an std::string. +static std::string PrintTestPartResultToString( + const TestPartResult& test_part_result) { + return (Message() + << internal::FormatFileLocation(test_part_result.file_name(), + test_part_result.line_number()) + << " " << TestPartResultTypeToString(test_part_result.type()) + << test_part_result.message()).GetString(); +} + +// Prints a TestPartResult. +static void PrintTestPartResult(const TestPartResult& test_part_result) { + const std::string& result = + PrintTestPartResultToString(test_part_result); + printf("%s\n", result.c_str()); + fflush(stdout); + // If the test program runs in Visual Studio or a debugger, the + // following statements add the test part result message to the Output + // window such that the user can double-click on it to jump to the + // corresponding source code location; otherwise they do nothing. +#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE + // We don't call OutputDebugString*() on Windows Mobile, as printing + // to stdout is done by OutputDebugString() there already - we don't + // want the same message printed twice. + ::OutputDebugStringA(result.c_str()); + ::OutputDebugStringA("\n"); +#endif +} + +// class PrettyUnitTestResultPrinter + +enum GTestColor { + COLOR_DEFAULT, + COLOR_RED, + COLOR_GREEN, + COLOR_YELLOW +}; + +#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE + +// Returns the character attribute for the given color. +WORD GetColorAttribute(GTestColor color) { + switch (color) { + case COLOR_RED: return FOREGROUND_RED; + case COLOR_GREEN: return FOREGROUND_GREEN; + case COLOR_YELLOW: return FOREGROUND_RED | FOREGROUND_GREEN; + default: return 0; + } +} + +#else + +// Returns the ANSI color code for the given color. COLOR_DEFAULT is +// an invalid input. +const char* GetAnsiColorCode(GTestColor color) { + switch (color) { + case COLOR_RED: return "1"; + case COLOR_GREEN: return "2"; + case COLOR_YELLOW: return "3"; + default: return NULL; + }; +} + +#endif // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE + +// Returns true iff Google Test should use colors in the output. +bool ShouldUseColor(bool stdout_is_tty) { + const char* const gtest_color = GTEST_FLAG(color).c_str(); + + if (String::CaseInsensitiveCStringEquals(gtest_color, "auto")) { +#if GTEST_OS_WINDOWS + // On Windows the TERM variable is usually not set, but the + // console there does support colors. + return stdout_is_tty; +#else + // On non-Windows platforms, we rely on the TERM variable. + const char* const term = posix::GetEnv("TERM"); + const bool term_supports_color = + String::CStringEquals(term, "xterm") || + String::CStringEquals(term, "xterm-color") || + String::CStringEquals(term, "xterm-256color") || + String::CStringEquals(term, "screen") || + String::CStringEquals(term, "screen-256color") || + String::CStringEquals(term, "linux") || + String::CStringEquals(term, "cygwin"); + return stdout_is_tty && term_supports_color; +#endif // GTEST_OS_WINDOWS + } + + return String::CaseInsensitiveCStringEquals(gtest_color, "yes") || + String::CaseInsensitiveCStringEquals(gtest_color, "true") || + String::CaseInsensitiveCStringEquals(gtest_color, "t") || + String::CStringEquals(gtest_color, "1"); + // We take "yes", "true", "t", and "1" as meaning "yes". If the + // value is neither one of these nor "auto", we treat it as "no" to + // be conservative. +} + +// Helpers for printing colored strings to stdout. Note that on Windows, we +// cannot simply emit special characters and have the terminal change colors. +// This routine must actually emit the characters rather than return a string +// that would be colored when printed, as can be done on Linux. +void ColoredPrintf(GTestColor color, const char* fmt, ...) { + va_list args; + va_start(args, fmt); + +#if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_SYMBIAN || GTEST_OS_ZOS || GTEST_OS_IOS + const bool use_color = false; +#else + static const bool in_color_mode = + ShouldUseColor(posix::IsATTY(posix::FileNo(stdout)) != 0); + const bool use_color = in_color_mode && (color != COLOR_DEFAULT); +#endif // GTEST_OS_WINDOWS_MOBILE || GTEST_OS_SYMBIAN || GTEST_OS_ZOS + // The '!= 0' comparison is necessary to satisfy MSVC 7.1. + + if (!use_color) { + vprintf(fmt, args); + va_end(args); + return; + } + +#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE + const HANDLE stdout_handle = GetStdHandle(STD_OUTPUT_HANDLE); + + // Gets the current text color. + CONSOLE_SCREEN_BUFFER_INFO buffer_info; + GetConsoleScreenBufferInfo(stdout_handle, &buffer_info); + const WORD old_color_attrs = buffer_info.wAttributes; + + // We need to flush the stream buffers into the console before each + // SetConsoleTextAttribute call lest it affect the text that is already + // printed but has not yet reached the console. + fflush(stdout); + SetConsoleTextAttribute(stdout_handle, + GetColorAttribute(color) | FOREGROUND_INTENSITY); + vprintf(fmt, args); + + fflush(stdout); + // Restores the text color. + SetConsoleTextAttribute(stdout_handle, old_color_attrs); +#else + printf("\033[0;3%sm", GetAnsiColorCode(color)); + vprintf(fmt, args); + printf("\033[m"); // Resets the terminal to default. +#endif // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE + va_end(args); +} + +// Text printed in Google Test's text output and --gunit_list_tests +// output to label the type parameter and value parameter for a test. +static const char kTypeParamLabel[] = "TypeParam"; +static const char kValueParamLabel[] = "GetParam()"; + +void PrintFullTestCommentIfPresent(const TestInfo& test_info) { + const char* const type_param = test_info.type_param(); + const char* const value_param = test_info.value_param(); + + if (type_param != NULL || value_param != NULL) { + printf(", where "); + if (type_param != NULL) { + printf("%s = %s", kTypeParamLabel, type_param); + if (value_param != NULL) + printf(" and "); + } + if (value_param != NULL) { + printf("%s = %s", kValueParamLabel, value_param); + } + } +} + +// This class implements the TestEventListener interface. +// +// Class PrettyUnitTestResultPrinter is copyable. +class PrettyUnitTestResultPrinter : public TestEventListener { + public: + PrettyUnitTestResultPrinter() {} + static void PrintTestName(const char * test_case, const char * test) { + printf("%s.%s", test_case, test); + } + + // The following methods override what's in the TestEventListener class. + virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {} + virtual void OnTestIterationStart(const UnitTest& unit_test, int iteration); + virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test); + virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) {} + virtual void OnTestCaseStart(const TestCase& test_case); + virtual void OnTestStart(const TestInfo& test_info); + virtual void OnTestPartResult(const TestPartResult& result); + virtual void OnTestEnd(const TestInfo& test_info); + virtual void OnTestCaseEnd(const TestCase& test_case); + virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test); + virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/) {} + virtual void OnTestIterationEnd(const UnitTest& unit_test, int iteration); + virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) {} + + private: + static void PrintFailedTests(const UnitTest& unit_test); +}; + + // Fired before each iteration of tests starts. +void PrettyUnitTestResultPrinter::OnTestIterationStart( + const UnitTest& unit_test, int iteration) { + if (GTEST_FLAG(repeat) != 1) + printf("\nRepeating all tests (iteration %d) . . .\n\n", iteration + 1); + + const char* const filter = GTEST_FLAG(filter).c_str(); + + // Prints the filter if it's not *. This reminds the user that some + // tests may be skipped. + if (!String::CStringEquals(filter, kUniversalFilter)) { + ColoredPrintf(COLOR_YELLOW, + "Note: %s filter = %s\n", GTEST_NAME_, filter); + } + + if (internal::ShouldShard(kTestTotalShards, kTestShardIndex, false)) { + const Int32 shard_index = Int32FromEnvOrDie(kTestShardIndex, -1); + ColoredPrintf(COLOR_YELLOW, + "Note: This is test shard %d of %s.\n", + static_cast(shard_index) + 1, + internal::posix::GetEnv(kTestTotalShards)); + } + + if (GTEST_FLAG(shuffle)) { + ColoredPrintf(COLOR_YELLOW, + "Note: Randomizing tests' orders with a seed of %d .\n", + unit_test.random_seed()); + } + + ColoredPrintf(COLOR_GREEN, "[==========] "); + printf("Running %s from %s.\n", + FormatTestCount(unit_test.test_to_run_count()).c_str(), + FormatTestCaseCount(unit_test.test_case_to_run_count()).c_str()); + fflush(stdout); +} + +void PrettyUnitTestResultPrinter::OnEnvironmentsSetUpStart( + const UnitTest& /*unit_test*/) { + ColoredPrintf(COLOR_GREEN, "[----------] "); + printf("Global test environment set-up.\n"); + fflush(stdout); +} + +void PrettyUnitTestResultPrinter::OnTestCaseStart(const TestCase& test_case) { + const std::string counts = + FormatCountableNoun(test_case.test_to_run_count(), "test", "tests"); + ColoredPrintf(COLOR_GREEN, "[----------] "); + printf("%s from %s", counts.c_str(), test_case.name()); + if (test_case.type_param() == NULL) { + printf("\n"); + } else { + printf(", where %s = %s\n", kTypeParamLabel, test_case.type_param()); + } + fflush(stdout); +} + +void PrettyUnitTestResultPrinter::OnTestStart(const TestInfo& test_info) { + ColoredPrintf(COLOR_GREEN, "[ RUN ] "); + PrintTestName(test_info.test_case_name(), test_info.name()); + printf("\n"); + fflush(stdout); +} + +// Called after an assertion failure. +void PrettyUnitTestResultPrinter::OnTestPartResult( + const TestPartResult& result) { + // If the test part succeeded, we don't need to do anything. + if (result.type() == TestPartResult::kSuccess) + return; + + // Print failure message from the assertion (e.g. expected this and got that). + PrintTestPartResult(result); + fflush(stdout); +} + +void PrettyUnitTestResultPrinter::OnTestEnd(const TestInfo& test_info) { + if (test_info.result()->Passed()) { + ColoredPrintf(COLOR_GREEN, "[ OK ] "); + } else { + ColoredPrintf(COLOR_RED, "[ FAILED ] "); + } + PrintTestName(test_info.test_case_name(), test_info.name()); + if (test_info.result()->Failed()) + PrintFullTestCommentIfPresent(test_info); + + if (GTEST_FLAG(print_time)) { + printf(" (%s ms)\n", internal::StreamableToString( + test_info.result()->elapsed_time()).c_str()); + } else { + printf("\n"); + } + fflush(stdout); +} + +void PrettyUnitTestResultPrinter::OnTestCaseEnd(const TestCase& test_case) { + if (!GTEST_FLAG(print_time)) return; + + const std::string counts = + FormatCountableNoun(test_case.test_to_run_count(), "test", "tests"); + ColoredPrintf(COLOR_GREEN, "[----------] "); + printf("%s from %s (%s ms total)\n\n", + counts.c_str(), test_case.name(), + internal::StreamableToString(test_case.elapsed_time()).c_str()); + fflush(stdout); +} + +void PrettyUnitTestResultPrinter::OnEnvironmentsTearDownStart( + const UnitTest& /*unit_test*/) { + ColoredPrintf(COLOR_GREEN, "[----------] "); + printf("Global test environment tear-down\n"); + fflush(stdout); +} + +// Internal helper for printing the list of failed tests. +void PrettyUnitTestResultPrinter::PrintFailedTests(const UnitTest& unit_test) { + const int failed_test_count = unit_test.failed_test_count(); + if (failed_test_count == 0) { + return; + } + + for (int i = 0; i < unit_test.total_test_case_count(); ++i) { + const TestCase& test_case = *unit_test.GetTestCase(i); + if (!test_case.should_run() || (test_case.failed_test_count() == 0)) { + continue; + } + for (int j = 0; j < test_case.total_test_count(); ++j) { + const TestInfo& test_info = *test_case.GetTestInfo(j); + if (!test_info.should_run() || test_info.result()->Passed()) { + continue; + } + ColoredPrintf(COLOR_RED, "[ FAILED ] "); + printf("%s.%s", test_case.name(), test_info.name()); + PrintFullTestCommentIfPresent(test_info); + printf("\n"); + } + } +} + +void PrettyUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test, + int /*iteration*/) { + ColoredPrintf(COLOR_GREEN, "[==========] "); + printf("%s from %s ran.", + FormatTestCount(unit_test.test_to_run_count()).c_str(), + FormatTestCaseCount(unit_test.test_case_to_run_count()).c_str()); + if (GTEST_FLAG(print_time)) { + printf(" (%s ms total)", + internal::StreamableToString(unit_test.elapsed_time()).c_str()); + } + printf("\n"); + ColoredPrintf(COLOR_GREEN, "[ PASSED ] "); + printf("%s.\n", FormatTestCount(unit_test.successful_test_count()).c_str()); + + int num_failures = unit_test.failed_test_count(); + if (!unit_test.Passed()) { + const int failed_test_count = unit_test.failed_test_count(); + ColoredPrintf(COLOR_RED, "[ FAILED ] "); + printf("%s, listed below:\n", FormatTestCount(failed_test_count).c_str()); + PrintFailedTests(unit_test); + printf("\n%2d FAILED %s\n", num_failures, + num_failures == 1 ? "TEST" : "TESTS"); + } + + int num_disabled = unit_test.reportable_disabled_test_count(); + if (num_disabled && !GTEST_FLAG(also_run_disabled_tests)) { + if (!num_failures) { + printf("\n"); // Add a spacer if no FAILURE banner is displayed. + } + ColoredPrintf(COLOR_YELLOW, + " YOU HAVE %d DISABLED %s\n\n", + num_disabled, + num_disabled == 1 ? "TEST" : "TESTS"); + } + // Ensure that Google Test output is printed before, e.g., heapchecker output. + fflush(stdout); +} + +// End PrettyUnitTestResultPrinter + +// class TestEventRepeater +// +// This class forwards events to other event listeners. +class TestEventRepeater : public TestEventListener { + public: + TestEventRepeater() : forwarding_enabled_(true) {} + virtual ~TestEventRepeater(); + void Append(TestEventListener *listener); + TestEventListener* Release(TestEventListener* listener); + + // Controls whether events will be forwarded to listeners_. Set to false + // in death test child processes. + bool forwarding_enabled() const { return forwarding_enabled_; } + void set_forwarding_enabled(bool enable) { forwarding_enabled_ = enable; } + + virtual void OnTestProgramStart(const UnitTest& unit_test); + virtual void OnTestIterationStart(const UnitTest& unit_test, int iteration); + virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test); + virtual void OnEnvironmentsSetUpEnd(const UnitTest& unit_test); + virtual void OnTestCaseStart(const TestCase& test_case); + virtual void OnTestStart(const TestInfo& test_info); + virtual void OnTestPartResult(const TestPartResult& result); + virtual void OnTestEnd(const TestInfo& test_info); + virtual void OnTestCaseEnd(const TestCase& test_case); + virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test); + virtual void OnEnvironmentsTearDownEnd(const UnitTest& unit_test); + virtual void OnTestIterationEnd(const UnitTest& unit_test, int iteration); + virtual void OnTestProgramEnd(const UnitTest& unit_test); + + private: + // Controls whether events will be forwarded to listeners_. Set to false + // in death test child processes. + bool forwarding_enabled_; + // The list of listeners that receive events. + std::vector listeners_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(TestEventRepeater); +}; + +TestEventRepeater::~TestEventRepeater() { + ForEach(listeners_, Delete); +} + +void TestEventRepeater::Append(TestEventListener *listener) { + listeners_.push_back(listener); +} + +// TODO(vladl@google.com): Factor the search functionality into Vector::Find. +TestEventListener* TestEventRepeater::Release(TestEventListener *listener) { + for (size_t i = 0; i < listeners_.size(); ++i) { + if (listeners_[i] == listener) { + listeners_.erase(listeners_.begin() + i); + return listener; + } + } + + return NULL; +} + +// Since most methods are very similar, use macros to reduce boilerplate. +// This defines a member that forwards the call to all listeners. +#define GTEST_REPEATER_METHOD_(Name, Type) \ +void TestEventRepeater::Name(const Type& parameter) { \ + if (forwarding_enabled_) { \ + for (size_t i = 0; i < listeners_.size(); i++) { \ + listeners_[i]->Name(parameter); \ + } \ + } \ +} +// This defines a member that forwards the call to all listeners in reverse +// order. +#define GTEST_REVERSE_REPEATER_METHOD_(Name, Type) \ +void TestEventRepeater::Name(const Type& parameter) { \ + if (forwarding_enabled_) { \ + for (int i = static_cast(listeners_.size()) - 1; i >= 0; i--) { \ + listeners_[i]->Name(parameter); \ + } \ + } \ +} + +GTEST_REPEATER_METHOD_(OnTestProgramStart, UnitTest) +GTEST_REPEATER_METHOD_(OnEnvironmentsSetUpStart, UnitTest) +GTEST_REPEATER_METHOD_(OnTestCaseStart, TestCase) +GTEST_REPEATER_METHOD_(OnTestStart, TestInfo) +GTEST_REPEATER_METHOD_(OnTestPartResult, TestPartResult) +GTEST_REPEATER_METHOD_(OnEnvironmentsTearDownStart, UnitTest) +GTEST_REVERSE_REPEATER_METHOD_(OnEnvironmentsSetUpEnd, UnitTest) +GTEST_REVERSE_REPEATER_METHOD_(OnEnvironmentsTearDownEnd, UnitTest) +GTEST_REVERSE_REPEATER_METHOD_(OnTestEnd, TestInfo) +GTEST_REVERSE_REPEATER_METHOD_(OnTestCaseEnd, TestCase) +GTEST_REVERSE_REPEATER_METHOD_(OnTestProgramEnd, UnitTest) + +#undef GTEST_REPEATER_METHOD_ +#undef GTEST_REVERSE_REPEATER_METHOD_ + +void TestEventRepeater::OnTestIterationStart(const UnitTest& unit_test, + int iteration) { + if (forwarding_enabled_) { + for (size_t i = 0; i < listeners_.size(); i++) { + listeners_[i]->OnTestIterationStart(unit_test, iteration); + } + } +} + +void TestEventRepeater::OnTestIterationEnd(const UnitTest& unit_test, + int iteration) { + if (forwarding_enabled_) { + for (int i = static_cast(listeners_.size()) - 1; i >= 0; i--) { + listeners_[i]->OnTestIterationEnd(unit_test, iteration); + } + } +} + +// End TestEventRepeater + +// This class generates an XML output file. +class XmlUnitTestResultPrinter : public EmptyTestEventListener { + public: + explicit XmlUnitTestResultPrinter(const char* output_file); + + virtual void OnTestIterationEnd(const UnitTest& unit_test, int iteration); + + private: + // Is c a whitespace character that is normalized to a space character + // when it appears in an XML attribute value? + static bool IsNormalizableWhitespace(char c) { + return c == 0x9 || c == 0xA || c == 0xD; + } + + // May c appear in a well-formed XML document? + static bool IsValidXmlCharacter(char c) { + return IsNormalizableWhitespace(c) || c >= 0x20; + } + + // Returns an XML-escaped copy of the input string str. If + // is_attribute is true, the text is meant to appear as an attribute + // value, and normalizable whitespace is preserved by replacing it + // with character references. + static std::string EscapeXml(const std::string& str, bool is_attribute); + + // Returns the given string with all characters invalid in XML removed. + static std::string RemoveInvalidXmlCharacters(const std::string& str); + + // Convenience wrapper around EscapeXml when str is an attribute value. + static std::string EscapeXmlAttribute(const std::string& str) { + return EscapeXml(str, true); + } + + // Convenience wrapper around EscapeXml when str is not an attribute value. + static std::string EscapeXmlText(const char* str) { + return EscapeXml(str, false); + } + + // Verifies that the given attribute belongs to the given element and + // streams the attribute as XML. + static void OutputXmlAttribute(std::ostream* stream, + const std::string& element_name, + const std::string& name, + const std::string& value); + + // Streams an XML CDATA section, escaping invalid CDATA sequences as needed. + static void OutputXmlCDataSection(::std::ostream* stream, const char* data); + + // Streams an XML representation of a TestInfo object. + static void OutputXmlTestInfo(::std::ostream* stream, + const char* test_case_name, + const TestInfo& test_info); + + // Prints an XML representation of a TestCase object + static void PrintXmlTestCase(::std::ostream* stream, + const TestCase& test_case); + + // Prints an XML summary of unit_test to output stream out. + static void PrintXmlUnitTest(::std::ostream* stream, + const UnitTest& unit_test); + + // Produces a string representing the test properties in a result as space + // delimited XML attributes based on the property key="value" pairs. + // When the std::string is not empty, it includes a space at the beginning, + // to delimit this attribute from prior attributes. + static std::string TestPropertiesAsXmlAttributes(const TestResult& result); + + // The output file. + const std::string output_file_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(XmlUnitTestResultPrinter); +}; + +// Creates a new XmlUnitTestResultPrinter. +XmlUnitTestResultPrinter::XmlUnitTestResultPrinter(const char* output_file) + : output_file_(output_file) { + if (output_file_.c_str() == NULL || output_file_.empty()) { + fprintf(stderr, "XML output file may not be null\n"); + fflush(stderr); + exit(EXIT_FAILURE); + } +} + +// Called after the unit test ends. +void XmlUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test, + int /*iteration*/) { + FILE* xmlout = NULL; + FilePath output_file(output_file_); + FilePath output_dir(output_file.RemoveFileName()); + + if (output_dir.CreateDirectoriesRecursively()) { + xmlout = posix::FOpen(output_file_.c_str(), "w"); + } + if (xmlout == NULL) { + // TODO(wan): report the reason of the failure. + // + // We don't do it for now as: + // + // 1. There is no urgent need for it. + // 2. It's a bit involved to make the errno variable thread-safe on + // all three operating systems (Linux, Windows, and Mac OS). + // 3. To interpret the meaning of errno in a thread-safe way, + // we need the strerror_r() function, which is not available on + // Windows. + fprintf(stderr, + "Unable to open file \"%s\"\n", + output_file_.c_str()); + fflush(stderr); + exit(EXIT_FAILURE); + } + std::stringstream stream; + PrintXmlUnitTest(&stream, unit_test); + fprintf(xmlout, "%s", StringStreamToString(&stream).c_str()); + fclose(xmlout); +} + +// Returns an XML-escaped copy of the input string str. If is_attribute +// is true, the text is meant to appear as an attribute value, and +// normalizable whitespace is preserved by replacing it with character +// references. +// +// Invalid XML characters in str, if any, are stripped from the output. +// It is expected that most, if not all, of the text processed by this +// module will consist of ordinary English text. +// If this module is ever modified to produce version 1.1 XML output, +// most invalid characters can be retained using character references. +// TODO(wan): It might be nice to have a minimally invasive, human-readable +// escaping scheme for invalid characters, rather than dropping them. +std::string XmlUnitTestResultPrinter::EscapeXml( + const std::string& str, bool is_attribute) { + Message m; + + for (size_t i = 0; i < str.size(); ++i) { + const char ch = str[i]; + switch (ch) { + case '<': + m << "<"; + break; + case '>': + m << ">"; + break; + case '&': + m << "&"; + break; + case '\'': + if (is_attribute) + m << "'"; + else + m << '\''; + break; + case '"': + if (is_attribute) + m << """; + else + m << '"'; + break; + default: + if (IsValidXmlCharacter(ch)) { + if (is_attribute && IsNormalizableWhitespace(ch)) + m << "&#x" << String::FormatByte(static_cast(ch)) + << ";"; + else + m << ch; + } + break; + } + } + + return m.GetString(); +} + +// Returns the given string with all characters invalid in XML removed. +// Currently invalid characters are dropped from the string. An +// alternative is to replace them with certain characters such as . or ?. +std::string XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters( + const std::string& str) { + std::string output; + output.reserve(str.size()); + for (std::string::const_iterator it = str.begin(); it != str.end(); ++it) + if (IsValidXmlCharacter(*it)) + output.push_back(*it); + + return output; +} + +// The following routines generate an XML representation of a UnitTest +// object. +// +// This is how Google Test concepts map to the DTD: +// +// <-- corresponds to a UnitTest object +// <-- corresponds to a TestCase object +// <-- corresponds to a TestInfo object +// ... +// ... +// ... +// <-- individual assertion failures +// +// +// + +// Formats the given time in milliseconds as seconds. +std::string FormatTimeInMillisAsSeconds(TimeInMillis ms) { + ::std::stringstream ss; + ss << ms/1000.0; + return ss.str(); +} + +// Converts the given epoch time in milliseconds to a date string in the ISO +// 8601 format, without the timezone information. +std::string FormatEpochTimeInMillisAsIso8601(TimeInMillis ms) { + // Using non-reentrant version as localtime_r is not portable. + time_t seconds = static_cast(ms / 1000); +#ifdef _MSC_VER +# pragma warning(push) // Saves the current warning state. +# pragma warning(disable:4996) // Temporarily disables warning 4996 + // (function or variable may be unsafe). + const struct tm* const time_struct = localtime(&seconds); // NOLINT +# pragma warning(pop) // Restores the warning state again. +#else + const struct tm* const time_struct = localtime(&seconds); // NOLINT +#endif + if (time_struct == NULL) + return ""; // Invalid ms value + + // YYYY-MM-DDThh:mm:ss + return StreamableToString(time_struct->tm_year + 1900) + "-" + + String::FormatIntWidth2(time_struct->tm_mon + 1) + "-" + + String::FormatIntWidth2(time_struct->tm_mday) + "T" + + String::FormatIntWidth2(time_struct->tm_hour) + ":" + + String::FormatIntWidth2(time_struct->tm_min) + ":" + + String::FormatIntWidth2(time_struct->tm_sec); +} + +// Streams an XML CDATA section, escaping invalid CDATA sequences as needed. +void XmlUnitTestResultPrinter::OutputXmlCDataSection(::std::ostream* stream, + const char* data) { + const char* segment = data; + *stream << ""); + if (next_segment != NULL) { + stream->write( + segment, static_cast(next_segment - segment)); + *stream << "]]>]]>"); + } else { + *stream << segment; + break; + } + } + *stream << "]]>"; +} + +void XmlUnitTestResultPrinter::OutputXmlAttribute( + std::ostream* stream, + const std::string& element_name, + const std::string& name, + const std::string& value) { + const std::vector& allowed_names = + GetReservedAttributesForElement(element_name); + + GTEST_CHECK_(std::find(allowed_names.begin(), allowed_names.end(), name) != + allowed_names.end()) + << "Attribute " << name << " is not allowed for element <" << element_name + << ">."; + + *stream << " " << name << "=\"" << EscapeXmlAttribute(value) << "\""; +} + +// Prints an XML representation of a TestInfo object. +// TODO(wan): There is also value in printing properties with the plain printer. +void XmlUnitTestResultPrinter::OutputXmlTestInfo(::std::ostream* stream, + const char* test_case_name, + const TestInfo& test_info) { + const TestResult& result = *test_info.result(); + const std::string kTestcase = "testcase"; + + *stream << " \n"; + } + const string location = internal::FormatCompilerIndependentFileLocation( + part.file_name(), part.line_number()); + const string summary = location + "\n" + part.summary(); + *stream << " "; + const string detail = location + "\n" + part.message(); + OutputXmlCDataSection(stream, RemoveInvalidXmlCharacters(detail).c_str()); + *stream << "\n"; + } + } + + if (failures == 0) + *stream << " />\n"; + else + *stream << " \n"; +} + +// Prints an XML representation of a TestCase object +void XmlUnitTestResultPrinter::PrintXmlTestCase(std::ostream* stream, + const TestCase& test_case) { + const std::string kTestsuite = "testsuite"; + *stream << " <" << kTestsuite; + OutputXmlAttribute(stream, kTestsuite, "name", test_case.name()); + OutputXmlAttribute(stream, kTestsuite, "tests", + StreamableToString(test_case.reportable_test_count())); + OutputXmlAttribute(stream, kTestsuite, "failures", + StreamableToString(test_case.failed_test_count())); + OutputXmlAttribute( + stream, kTestsuite, "disabled", + StreamableToString(test_case.reportable_disabled_test_count())); + OutputXmlAttribute(stream, kTestsuite, "errors", "0"); + OutputXmlAttribute(stream, kTestsuite, "time", + FormatTimeInMillisAsSeconds(test_case.elapsed_time())); + *stream << TestPropertiesAsXmlAttributes(test_case.ad_hoc_test_result()) + << ">\n"; + + for (int i = 0; i < test_case.total_test_count(); ++i) { + if (test_case.GetTestInfo(i)->is_reportable()) + OutputXmlTestInfo(stream, test_case.name(), *test_case.GetTestInfo(i)); + } + *stream << " \n"; +} + +// Prints an XML summary of unit_test to output stream out. +void XmlUnitTestResultPrinter::PrintXmlUnitTest(std::ostream* stream, + const UnitTest& unit_test) { + const std::string kTestsuites = "testsuites"; + + *stream << "\n"; + *stream << "<" << kTestsuites; + + OutputXmlAttribute(stream, kTestsuites, "tests", + StreamableToString(unit_test.reportable_test_count())); + OutputXmlAttribute(stream, kTestsuites, "failures", + StreamableToString(unit_test.failed_test_count())); + OutputXmlAttribute( + stream, kTestsuites, "disabled", + StreamableToString(unit_test.reportable_disabled_test_count())); + OutputXmlAttribute(stream, kTestsuites, "errors", "0"); + OutputXmlAttribute( + stream, kTestsuites, "timestamp", + FormatEpochTimeInMillisAsIso8601(unit_test.start_timestamp())); + OutputXmlAttribute(stream, kTestsuites, "time", + FormatTimeInMillisAsSeconds(unit_test.elapsed_time())); + + if (GTEST_FLAG(shuffle)) { + OutputXmlAttribute(stream, kTestsuites, "random_seed", + StreamableToString(unit_test.random_seed())); + } + + *stream << TestPropertiesAsXmlAttributes(unit_test.ad_hoc_test_result()); + + OutputXmlAttribute(stream, kTestsuites, "name", "AllTests"); + *stream << ">\n"; + + for (int i = 0; i < unit_test.total_test_case_count(); ++i) { + if (unit_test.GetTestCase(i)->reportable_test_count() > 0) + PrintXmlTestCase(stream, *unit_test.GetTestCase(i)); + } + *stream << "\n"; +} + +// Produces a string representing the test properties in a result as space +// delimited XML attributes based on the property key="value" pairs. +std::string XmlUnitTestResultPrinter::TestPropertiesAsXmlAttributes( + const TestResult& result) { + Message attributes; + for (int i = 0; i < result.test_property_count(); ++i) { + const TestProperty& property = result.GetTestProperty(i); + attributes << " " << property.key() << "=" + << "\"" << EscapeXmlAttribute(property.value()) << "\""; + } + return attributes.GetString(); +} + +// End XmlUnitTestResultPrinter + +#if GTEST_CAN_STREAM_RESULTS_ + +// Checks if str contains '=', '&', '%' or '\n' characters. If yes, +// replaces them by "%xx" where xx is their hexadecimal value. For +// example, replaces "=" with "%3D". This algorithm is O(strlen(str)) +// in both time and space -- important as the input str may contain an +// arbitrarily long test failure message and stack trace. +string StreamingListener::UrlEncode(const char* str) { + string result; + result.reserve(strlen(str) + 1); + for (char ch = *str; ch != '\0'; ch = *++str) { + switch (ch) { + case '%': + case '=': + case '&': + case '\n': + result.append("%" + String::FormatByte(static_cast(ch))); + break; + default: + result.push_back(ch); + break; + } + } + return result; +} + +void StreamingListener::SocketWriter::MakeConnection() { + GTEST_CHECK_(sockfd_ == -1) + << "MakeConnection() can't be called when there is already a connection."; + + addrinfo hints; + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_UNSPEC; // To allow both IPv4 and IPv6 addresses. + hints.ai_socktype = SOCK_STREAM; + addrinfo* servinfo = NULL; + + // Use the getaddrinfo() to get a linked list of IP addresses for + // the given host name. + const int error_num = getaddrinfo( + host_name_.c_str(), port_num_.c_str(), &hints, &servinfo); + if (error_num != 0) { + GTEST_LOG_(WARNING) << "stream_result_to: getaddrinfo() failed: " + << gai_strerror(error_num); + } + + // Loop through all the results and connect to the first we can. + for (addrinfo* cur_addr = servinfo; sockfd_ == -1 && cur_addr != NULL; + cur_addr = cur_addr->ai_next) { + sockfd_ = socket( + cur_addr->ai_family, cur_addr->ai_socktype, cur_addr->ai_protocol); + if (sockfd_ != -1) { + // Connect the client socket to the server socket. + if (connect(sockfd_, cur_addr->ai_addr, cur_addr->ai_addrlen) == -1) { + close(sockfd_); + sockfd_ = -1; + } + } + } + + freeaddrinfo(servinfo); // all done with this structure + + if (sockfd_ == -1) { + GTEST_LOG_(WARNING) << "stream_result_to: failed to connect to " + << host_name_ << ":" << port_num_; + } +} + +// End of class Streaming Listener +#endif // GTEST_CAN_STREAM_RESULTS__ + +// Class ScopedTrace + +// Pushes the given source file location and message onto a per-thread +// trace stack maintained by Google Test. +ScopedTrace::ScopedTrace(const char* file, int line, const Message& message) + GTEST_LOCK_EXCLUDED_(&UnitTest::mutex_) { + TraceInfo trace; + trace.file = file; + trace.line = line; + trace.message = message.GetString(); + + UnitTest::GetInstance()->PushGTestTrace(trace); +} + +// Pops the info pushed by the c'tor. +ScopedTrace::~ScopedTrace() + GTEST_LOCK_EXCLUDED_(&UnitTest::mutex_) { + UnitTest::GetInstance()->PopGTestTrace(); +} + + +// class OsStackTraceGetter + +// Returns the current OS stack trace as an std::string. Parameters: +// +// max_depth - the maximum number of stack frames to be included +// in the trace. +// skip_count - the number of top frames to be skipped; doesn't count +// against max_depth. +// +string OsStackTraceGetter::CurrentStackTrace(int /* max_depth */, + int /* skip_count */) + GTEST_LOCK_EXCLUDED_(mutex_) { + return ""; +} + +void OsStackTraceGetter::UponLeavingGTest() + GTEST_LOCK_EXCLUDED_(mutex_) { +} + +const char* const +OsStackTraceGetter::kElidedFramesMarker = + "... " GTEST_NAME_ " internal frames ..."; + +// A helper class that creates the premature-exit file in its +// constructor and deletes the file in its destructor. +class ScopedPrematureExitFile { + public: + explicit ScopedPrematureExitFile(const char* premature_exit_filepath) + : premature_exit_filepath_(premature_exit_filepath) { + // If a path to the premature-exit file is specified... + if (premature_exit_filepath != NULL && *premature_exit_filepath != '\0') { + // create the file with a single "0" character in it. I/O + // errors are ignored as there's nothing better we can do and we + // don't want to fail the test because of this. + FILE* pfile = posix::FOpen(premature_exit_filepath, "w"); + fwrite("0", 1, 1, pfile); + fclose(pfile); + } + } + + ~ScopedPrematureExitFile() { + if (premature_exit_filepath_ != NULL && *premature_exit_filepath_ != '\0') { + remove(premature_exit_filepath_); + } + } + + private: + const char* const premature_exit_filepath_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedPrematureExitFile); +}; + +} // namespace internal + +// class TestEventListeners + +TestEventListeners::TestEventListeners() + : repeater_(new internal::TestEventRepeater()), + default_result_printer_(NULL), + default_xml_generator_(NULL) { +} + +TestEventListeners::~TestEventListeners() { delete repeater_; } + +// Returns the standard listener responsible for the default console +// output. Can be removed from the listeners list to shut down default +// console output. Note that removing this object from the listener list +// with Release transfers its ownership to the user. +void TestEventListeners::Append(TestEventListener* listener) { + repeater_->Append(listener); +} + +// Removes the given event listener from the list and returns it. It then +// becomes the caller's responsibility to delete the listener. Returns +// NULL if the listener is not found in the list. +TestEventListener* TestEventListeners::Release(TestEventListener* listener) { + if (listener == default_result_printer_) + default_result_printer_ = NULL; + else if (listener == default_xml_generator_) + default_xml_generator_ = NULL; + return repeater_->Release(listener); +} + +// Returns repeater that broadcasts the TestEventListener events to all +// subscribers. +TestEventListener* TestEventListeners::repeater() { return repeater_; } + +// Sets the default_result_printer attribute to the provided listener. +// The listener is also added to the listener list and previous +// default_result_printer is removed from it and deleted. The listener can +// also be NULL in which case it will not be added to the list. Does +// nothing if the previous and the current listener objects are the same. +void TestEventListeners::SetDefaultResultPrinter(TestEventListener* listener) { + if (default_result_printer_ != listener) { + // It is an error to pass this method a listener that is already in the + // list. + delete Release(default_result_printer_); + default_result_printer_ = listener; + if (listener != NULL) + Append(listener); + } +} + +// Sets the default_xml_generator attribute to the provided listener. The +// listener is also added to the listener list and previous +// default_xml_generator is removed from it and deleted. The listener can +// also be NULL in which case it will not be added to the list. Does +// nothing if the previous and the current listener objects are the same. +void TestEventListeners::SetDefaultXmlGenerator(TestEventListener* listener) { + if (default_xml_generator_ != listener) { + // It is an error to pass this method a listener that is already in the + // list. + delete Release(default_xml_generator_); + default_xml_generator_ = listener; + if (listener != NULL) + Append(listener); + } +} + +// Controls whether events will be forwarded by the repeater to the +// listeners in the list. +bool TestEventListeners::EventForwardingEnabled() const { + return repeater_->forwarding_enabled(); +} + +void TestEventListeners::SuppressEventForwarding() { + repeater_->set_forwarding_enabled(false); +} + +// class UnitTest + +// Gets the singleton UnitTest object. The first time this method is +// called, a UnitTest object is constructed and returned. Consecutive +// calls will return the same object. +// +// We don't protect this under mutex_ as a user is not supposed to +// call this before main() starts, from which point on the return +// value will never change. +UnitTest* UnitTest::GetInstance() { + // When compiled with MSVC 7.1 in optimized mode, destroying the + // UnitTest object upon exiting the program messes up the exit code, + // causing successful tests to appear failed. We have to use a + // different implementation in this case to bypass the compiler bug. + // This implementation makes the compiler happy, at the cost of + // leaking the UnitTest object. + + // CodeGear C++Builder insists on a public destructor for the + // default implementation. Use this implementation to keep good OO + // design with private destructor. + +#if (_MSC_VER == 1310 && !defined(_DEBUG)) || defined(__BORLANDC__) + static UnitTest* const instance = new UnitTest; + return instance; +#else + static UnitTest instance; + return &instance; +#endif // (_MSC_VER == 1310 && !defined(_DEBUG)) || defined(__BORLANDC__) +} + +// Gets the number of successful test cases. +int UnitTest::successful_test_case_count() const { + return impl()->successful_test_case_count(); +} + +// Gets the number of failed test cases. +int UnitTest::failed_test_case_count() const { + return impl()->failed_test_case_count(); +} + +// Gets the number of all test cases. +int UnitTest::total_test_case_count() const { + return impl()->total_test_case_count(); +} + +// Gets the number of all test cases that contain at least one test +// that should run. +int UnitTest::test_case_to_run_count() const { + return impl()->test_case_to_run_count(); +} + +// Gets the number of successful tests. +int UnitTest::successful_test_count() const { + return impl()->successful_test_count(); +} + +// Gets the number of failed tests. +int UnitTest::failed_test_count() const { return impl()->failed_test_count(); } + +// Gets the number of disabled tests that will be reported in the XML report. +int UnitTest::reportable_disabled_test_count() const { + return impl()->reportable_disabled_test_count(); +} + +// Gets the number of disabled tests. +int UnitTest::disabled_test_count() const { + return impl()->disabled_test_count(); +} + +// Gets the number of tests to be printed in the XML report. +int UnitTest::reportable_test_count() const { + return impl()->reportable_test_count(); +} + +// Gets the number of all tests. +int UnitTest::total_test_count() const { return impl()->total_test_count(); } + +// Gets the number of tests that should run. +int UnitTest::test_to_run_count() const { return impl()->test_to_run_count(); } + +// Gets the time of the test program start, in ms from the start of the +// UNIX epoch. +internal::TimeInMillis UnitTest::start_timestamp() const { + return impl()->start_timestamp(); +} + +// Gets the elapsed time, in milliseconds. +internal::TimeInMillis UnitTest::elapsed_time() const { + return impl()->elapsed_time(); +} + +// Returns true iff the unit test passed (i.e. all test cases passed). +bool UnitTest::Passed() const { return impl()->Passed(); } + +// Returns true iff the unit test failed (i.e. some test case failed +// or something outside of all tests failed). +bool UnitTest::Failed() const { return impl()->Failed(); } + +// Gets the i-th test case among all the test cases. i can range from 0 to +// total_test_case_count() - 1. If i is not in that range, returns NULL. +const TestCase* UnitTest::GetTestCase(int i) const { + return impl()->GetTestCase(i); +} + +// Returns the TestResult containing information on test failures and +// properties logged outside of individual test cases. +const TestResult& UnitTest::ad_hoc_test_result() const { + return *impl()->ad_hoc_test_result(); +} + +// Gets the i-th test case among all the test cases. i can range from 0 to +// total_test_case_count() - 1. If i is not in that range, returns NULL. +TestCase* UnitTest::GetMutableTestCase(int i) { + return impl()->GetMutableTestCase(i); +} + +// Returns the list of event listeners that can be used to track events +// inside Google Test. +TestEventListeners& UnitTest::listeners() { + return *impl()->listeners(); +} + +// Registers and returns a global test environment. When a test +// program is run, all global test environments will be set-up in the +// order they were registered. After all tests in the program have +// finished, all global test environments will be torn-down in the +// *reverse* order they were registered. +// +// The UnitTest object takes ownership of the given environment. +// +// We don't protect this under mutex_, as we only support calling it +// from the main thread. +Environment* UnitTest::AddEnvironment(Environment* env) { + if (env == NULL) { + return NULL; + } + + impl_->environments().push_back(env); + return env; +} + +// Adds a TestPartResult to the current TestResult object. All Google Test +// assertion macros (e.g. ASSERT_TRUE, EXPECT_EQ, etc) eventually call +// this to report their results. The user code should use the +// assertion macros instead of calling this directly. +void UnitTest::AddTestPartResult( + TestPartResult::Type result_type, + const char* file_name, + int line_number, + const std::string& message, + const std::string& os_stack_trace) GTEST_LOCK_EXCLUDED_(mutex_) { + Message msg; + msg << message; + + internal::MutexLock lock(&mutex_); + if (impl_->gtest_trace_stack().size() > 0) { + msg << "\n" << GTEST_NAME_ << " trace:"; + + for (int i = static_cast(impl_->gtest_trace_stack().size()); + i > 0; --i) { + const internal::TraceInfo& trace = impl_->gtest_trace_stack()[i - 1]; + msg << "\n" << internal::FormatFileLocation(trace.file, trace.line) + << " " << trace.message; + } + } + + if (os_stack_trace.c_str() != NULL && !os_stack_trace.empty()) { + msg << internal::kStackTraceMarker << os_stack_trace; + } + + const TestPartResult result = + TestPartResult(result_type, file_name, line_number, + msg.GetString().c_str()); + impl_->GetTestPartResultReporterForCurrentThread()-> + ReportTestPartResult(result); + + if (result_type != TestPartResult::kSuccess) { + // gtest_break_on_failure takes precedence over + // gtest_throw_on_failure. This allows a user to set the latter + // in the code (perhaps in order to use Google Test assertions + // with another testing framework) and specify the former on the + // command line for debugging. + if (GTEST_FLAG(break_on_failure)) { +#if GTEST_OS_WINDOWS + // Using DebugBreak on Windows allows gtest to still break into a debugger + // when a failure happens and both the --gtest_break_on_failure and + // the --gtest_catch_exceptions flags are specified. + DebugBreak(); +#else + // Dereference NULL through a volatile pointer to prevent the compiler + // from removing. We use this rather than abort() or __builtin_trap() for + // portability: Symbian doesn't implement abort() well, and some debuggers + // don't correctly trap abort(). + *static_cast(NULL) = 1; +#endif // GTEST_OS_WINDOWS + } else if (GTEST_FLAG(throw_on_failure)) { +#if GTEST_HAS_EXCEPTIONS + throw internal::GoogleTestFailureException(result); +#else + // We cannot call abort() as it generates a pop-up in debug mode + // that cannot be suppressed in VC 7.1 or below. + exit(1); +#endif + } + } +} + +// Adds a TestProperty to the current TestResult object when invoked from +// inside a test, to current TestCase's ad_hoc_test_result_ when invoked +// from SetUpTestCase or TearDownTestCase, or to the global property set +// when invoked elsewhere. If the result already contains a property with +// the same key, the value will be updated. +void UnitTest::RecordProperty(const std::string& key, + const std::string& value) { + impl_->RecordProperty(TestProperty(key, value)); +} + +// Runs all tests in this UnitTest object and prints the result. +// Returns 0 if successful, or 1 otherwise. +// +// We don't protect this under mutex_, as we only support calling it +// from the main thread. +int UnitTest::Run() { + const bool in_death_test_child_process = + internal::GTEST_FLAG(internal_run_death_test).length() > 0; + + // Google Test implements this protocol for catching that a test + // program exits before returning control to Google Test: + // + // 1. Upon start, Google Test creates a file whose absolute path + // is specified by the environment variable + // TEST_PREMATURE_EXIT_FILE. + // 2. When Google Test has finished its work, it deletes the file. + // + // This allows a test runner to set TEST_PREMATURE_EXIT_FILE before + // running a Google-Test-based test program and check the existence + // of the file at the end of the test execution to see if it has + // exited prematurely. + + // If we are in the child process of a death test, don't + // create/delete the premature exit file, as doing so is unnecessary + // and will confuse the parent process. Otherwise, create/delete + // the file upon entering/leaving this function. If the program + // somehow exits before this function has a chance to return, the + // premature-exit file will be left undeleted, causing a test runner + // that understands the premature-exit-file protocol to report the + // test as having failed. + const internal::ScopedPrematureExitFile premature_exit_file( + in_death_test_child_process ? + NULL : internal::posix::GetEnv("TEST_PREMATURE_EXIT_FILE")); + + // Captures the value of GTEST_FLAG(catch_exceptions). This value will be + // used for the duration of the program. + impl()->set_catch_exceptions(GTEST_FLAG(catch_exceptions)); + +#if GTEST_HAS_SEH + // Either the user wants Google Test to catch exceptions thrown by the + // tests or this is executing in the context of death test child + // process. In either case the user does not want to see pop-up dialogs + // about crashes - they are expected. + if (impl()->catch_exceptions() || in_death_test_child_process) { +# if !GTEST_OS_WINDOWS_MOBILE + // SetErrorMode doesn't exist on CE. + SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOALIGNMENTFAULTEXCEPT | + SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX); +# endif // !GTEST_OS_WINDOWS_MOBILE + +# if (defined(_MSC_VER) || GTEST_OS_WINDOWS_MINGW) && !GTEST_OS_WINDOWS_MOBILE + // Death test children can be terminated with _abort(). On Windows, + // _abort() can show a dialog with a warning message. This forces the + // abort message to go to stderr instead. + _set_error_mode(_OUT_TO_STDERR); +# endif + +# if _MSC_VER >= 1400 && !GTEST_OS_WINDOWS_MOBILE + // In the debug version, Visual Studio pops up a separate dialog + // offering a choice to debug the aborted program. We need to suppress + // this dialog or it will pop up for every EXPECT/ASSERT_DEATH statement + // executed. Google Test will notify the user of any unexpected + // failure via stderr. + // + // VC++ doesn't define _set_abort_behavior() prior to the version 8.0. + // Users of prior VC versions shall suffer the agony and pain of + // clicking through the countless debug dialogs. + // TODO(vladl@google.com): find a way to suppress the abort dialog() in the + // debug mode when compiled with VC 7.1 or lower. + if (!GTEST_FLAG(break_on_failure)) + _set_abort_behavior( + 0x0, // Clear the following flags: + _WRITE_ABORT_MSG | _CALL_REPORTFAULT); // pop-up window, core dump. +# endif + } +#endif // GTEST_HAS_SEH + + return internal::HandleExceptionsInMethodIfSupported( + impl(), + &internal::UnitTestImpl::RunAllTests, + "auxiliary test code (environments or event listeners)") ? 0 : 1; +} + +// Returns the working directory when the first TEST() or TEST_F() was +// executed. +const char* UnitTest::original_working_dir() const { + return impl_->original_working_dir_.c_str(); +} + +// Returns the TestCase object for the test that's currently running, +// or NULL if no test is running. +const TestCase* UnitTest::current_test_case() const + GTEST_LOCK_EXCLUDED_(mutex_) { + internal::MutexLock lock(&mutex_); + return impl_->current_test_case(); +} + +// Returns the TestInfo object for the test that's currently running, +// or NULL if no test is running. +const TestInfo* UnitTest::current_test_info() const + GTEST_LOCK_EXCLUDED_(mutex_) { + internal::MutexLock lock(&mutex_); + return impl_->current_test_info(); +} + +// Returns the random seed used at the start of the current test run. +int UnitTest::random_seed() const { return impl_->random_seed(); } + +#if GTEST_HAS_PARAM_TEST +// Returns ParameterizedTestCaseRegistry object used to keep track of +// value-parameterized tests and instantiate and register them. +internal::ParameterizedTestCaseRegistry& + UnitTest::parameterized_test_registry() + GTEST_LOCK_EXCLUDED_(mutex_) { + return impl_->parameterized_test_registry(); +} +#endif // GTEST_HAS_PARAM_TEST + +// Creates an empty UnitTest. +UnitTest::UnitTest() { + impl_ = new internal::UnitTestImpl(this); +} + +// Destructor of UnitTest. +UnitTest::~UnitTest() { + delete impl_; +} + +// Pushes a trace defined by SCOPED_TRACE() on to the per-thread +// Google Test trace stack. +void UnitTest::PushGTestTrace(const internal::TraceInfo& trace) + GTEST_LOCK_EXCLUDED_(mutex_) { + internal::MutexLock lock(&mutex_); + impl_->gtest_trace_stack().push_back(trace); +} + +// Pops a trace from the per-thread Google Test trace stack. +void UnitTest::PopGTestTrace() + GTEST_LOCK_EXCLUDED_(mutex_) { + internal::MutexLock lock(&mutex_); + impl_->gtest_trace_stack().pop_back(); +} + +namespace internal { + +UnitTestImpl::UnitTestImpl(UnitTest* parent) + : parent_(parent), +#ifdef _MSC_VER +# pragma warning(push) // Saves the current warning state. +# pragma warning(disable:4355) // Temporarily disables warning 4355 + // (using this in initializer). + default_global_test_part_result_reporter_(this), + default_per_thread_test_part_result_reporter_(this), +# pragma warning(pop) // Restores the warning state again. +#else + default_global_test_part_result_reporter_(this), + default_per_thread_test_part_result_reporter_(this), +#endif // _MSC_VER + global_test_part_result_repoter_( + &default_global_test_part_result_reporter_), + per_thread_test_part_result_reporter_( + &default_per_thread_test_part_result_reporter_), +#if GTEST_HAS_PARAM_TEST + parameterized_test_registry_(), + parameterized_tests_registered_(false), +#endif // GTEST_HAS_PARAM_TEST + last_death_test_case_(-1), + current_test_case_(NULL), + current_test_info_(NULL), + ad_hoc_test_result_(), + os_stack_trace_getter_(NULL), + post_flag_parse_init_performed_(false), + random_seed_(0), // Will be overridden by the flag before first use. + random_(0), // Will be reseeded before first use. + start_timestamp_(0), + elapsed_time_(0), +#if GTEST_HAS_DEATH_TEST + death_test_factory_(new DefaultDeathTestFactory), +#endif + // Will be overridden by the flag before first use. + catch_exceptions_(false) { + listeners()->SetDefaultResultPrinter(new PrettyUnitTestResultPrinter); +} + +UnitTestImpl::~UnitTestImpl() { + // Deletes every TestCase. + ForEach(test_cases_, internal::Delete); + + // Deletes every Environment. + ForEach(environments_, internal::Delete); + + delete os_stack_trace_getter_; +} + +// Adds a TestProperty to the current TestResult object when invoked in a +// context of a test, to current test case's ad_hoc_test_result when invoke +// from SetUpTestCase/TearDownTestCase, or to the global property set +// otherwise. If the result already contains a property with the same key, +// the value will be updated. +void UnitTestImpl::RecordProperty(const TestProperty& test_property) { + std::string xml_element; + TestResult* test_result; // TestResult appropriate for property recording. + + if (current_test_info_ != NULL) { + xml_element = "testcase"; + test_result = &(current_test_info_->result_); + } else if (current_test_case_ != NULL) { + xml_element = "testsuite"; + test_result = &(current_test_case_->ad_hoc_test_result_); + } else { + xml_element = "testsuites"; + test_result = &ad_hoc_test_result_; + } + test_result->RecordProperty(xml_element, test_property); +} + +#if GTEST_HAS_DEATH_TEST +// Disables event forwarding if the control is currently in a death test +// subprocess. Must not be called before InitGoogleTest. +void UnitTestImpl::SuppressTestEventsIfInSubprocess() { + if (internal_run_death_test_flag_.get() != NULL) + listeners()->SuppressEventForwarding(); +} +#endif // GTEST_HAS_DEATH_TEST + +// Initializes event listeners performing XML output as specified by +// UnitTestOptions. Must not be called before InitGoogleTest. +void UnitTestImpl::ConfigureXmlOutput() { + const std::string& output_format = UnitTestOptions::GetOutputFormat(); + if (output_format == "xml") { + listeners()->SetDefaultXmlGenerator(new XmlUnitTestResultPrinter( + UnitTestOptions::GetAbsolutePathToOutputFile().c_str())); + } else if (output_format != "") { + printf("WARNING: unrecognized output format \"%s\" ignored.\n", + output_format.c_str()); + fflush(stdout); + } +} + +#if GTEST_CAN_STREAM_RESULTS_ +// Initializes event listeners for streaming test results in string form. +// Must not be called before InitGoogleTest. +void UnitTestImpl::ConfigureStreamingOutput() { + const std::string& target = GTEST_FLAG(stream_result_to); + if (!target.empty()) { + const size_t pos = target.find(':'); + if (pos != std::string::npos) { + listeners()->Append(new StreamingListener(target.substr(0, pos), + target.substr(pos+1))); + } else { + printf("WARNING: unrecognized streaming target \"%s\" ignored.\n", + target.c_str()); + fflush(stdout); + } + } +} +#endif // GTEST_CAN_STREAM_RESULTS_ + +// Performs initialization dependent upon flag values obtained in +// ParseGoogleTestFlagsOnly. Is called from InitGoogleTest after the call to +// ParseGoogleTestFlagsOnly. In case a user neglects to call InitGoogleTest +// this function is also called from RunAllTests. Since this function can be +// called more than once, it has to be idempotent. +void UnitTestImpl::PostFlagParsingInit() { + // Ensures that this function does not execute more than once. + if (!post_flag_parse_init_performed_) { + post_flag_parse_init_performed_ = true; + +#if GTEST_HAS_DEATH_TEST + InitDeathTestSubprocessControlInfo(); + SuppressTestEventsIfInSubprocess(); +#endif // GTEST_HAS_DEATH_TEST + + // Registers parameterized tests. This makes parameterized tests + // available to the UnitTest reflection API without running + // RUN_ALL_TESTS. + RegisterParameterizedTests(); + + // Configures listeners for XML output. This makes it possible for users + // to shut down the default XML output before invoking RUN_ALL_TESTS. + ConfigureXmlOutput(); + +#if GTEST_CAN_STREAM_RESULTS_ + // Configures listeners for streaming test results to the specified server. + ConfigureStreamingOutput(); +#endif // GTEST_CAN_STREAM_RESULTS_ + } +} + +// A predicate that checks the name of a TestCase against a known +// value. +// +// This is used for implementation of the UnitTest class only. We put +// it in the anonymous namespace to prevent polluting the outer +// namespace. +// +// TestCaseNameIs is copyable. +class TestCaseNameIs { + public: + // Constructor. + explicit TestCaseNameIs(const std::string& name) + : name_(name) {} + + // Returns true iff the name of test_case matches name_. + bool operator()(const TestCase* test_case) const { + return test_case != NULL && strcmp(test_case->name(), name_.c_str()) == 0; + } + + private: + std::string name_; +}; + +// Finds and returns a TestCase with the given name. If one doesn't +// exist, creates one and returns it. It's the CALLER'S +// RESPONSIBILITY to ensure that this function is only called WHEN THE +// TESTS ARE NOT SHUFFLED. +// +// Arguments: +// +// test_case_name: name of the test case +// type_param: the name of the test case's type parameter, or NULL if +// this is not a typed or a type-parameterized test case. +// set_up_tc: pointer to the function that sets up the test case +// tear_down_tc: pointer to the function that tears down the test case +TestCase* UnitTestImpl::GetTestCase(const char* test_case_name, + const char* type_param, + Test::SetUpTestCaseFunc set_up_tc, + Test::TearDownTestCaseFunc tear_down_tc) { + // Can we find a TestCase with the given name? + const std::vector::const_iterator test_case = + std::find_if(test_cases_.begin(), test_cases_.end(), + TestCaseNameIs(test_case_name)); + + if (test_case != test_cases_.end()) + return *test_case; + + // No. Let's create one. + TestCase* const new_test_case = + new TestCase(test_case_name, type_param, set_up_tc, tear_down_tc); + + // Is this a death test case? + if (internal::UnitTestOptions::MatchesFilter(test_case_name, + kDeathTestCaseFilter)) { + // Yes. Inserts the test case after the last death test case + // defined so far. This only works when the test cases haven't + // been shuffled. Otherwise we may end up running a death test + // after a non-death test. + ++last_death_test_case_; + test_cases_.insert(test_cases_.begin() + last_death_test_case_, + new_test_case); + } else { + // No. Appends to the end of the list. + test_cases_.push_back(new_test_case); + } + + test_case_indices_.push_back(static_cast(test_case_indices_.size())); + return new_test_case; +} + +// Helpers for setting up / tearing down the given environment. They +// are for use in the ForEach() function. +static void SetUpEnvironment(Environment* env) { env->SetUp(); } +static void TearDownEnvironment(Environment* env) { env->TearDown(); } + +// Runs all tests in this UnitTest object, prints the result, and +// returns true if all tests are successful. If any exception is +// thrown during a test, the test is considered to be failed, but the +// rest of the tests will still be run. +// +// When parameterized tests are enabled, it expands and registers +// parameterized tests first in RegisterParameterizedTests(). +// All other functions called from RunAllTests() may safely assume that +// parameterized tests are ready to be counted and run. +bool UnitTestImpl::RunAllTests() { + // Makes sure InitGoogleTest() was called. + if (!GTestIsInitialized()) { + printf("%s", + "\nThis test program did NOT call ::testing::InitGoogleTest " + "before calling RUN_ALL_TESTS(). Please fix it.\n"); + return false; + } + + // Do not run any test if the --help flag was specified. + if (g_help_flag) + return true; + + // Repeats the call to the post-flag parsing initialization in case the + // user didn't call InitGoogleTest. + PostFlagParsingInit(); + + // Even if sharding is not on, test runners may want to use the + // GTEST_SHARD_STATUS_FILE to query whether the test supports the sharding + // protocol. + internal::WriteToShardStatusFileIfNeeded(); + + // True iff we are in a subprocess for running a thread-safe-style + // death test. + bool in_subprocess_for_death_test = false; + +#if GTEST_HAS_DEATH_TEST + in_subprocess_for_death_test = (internal_run_death_test_flag_.get() != NULL); +#endif // GTEST_HAS_DEATH_TEST + + const bool should_shard = ShouldShard(kTestTotalShards, kTestShardIndex, + in_subprocess_for_death_test); + + // Compares the full test names with the filter to decide which + // tests to run. + const bool has_tests_to_run = FilterTests(should_shard + ? HONOR_SHARDING_PROTOCOL + : IGNORE_SHARDING_PROTOCOL) > 0; + + // Lists the tests and exits if the --gtest_list_tests flag was specified. + if (GTEST_FLAG(list_tests)) { + // This must be called *after* FilterTests() has been called. + ListTestsMatchingFilter(); + return true; + } + + random_seed_ = GTEST_FLAG(shuffle) ? + GetRandomSeedFromFlag(GTEST_FLAG(random_seed)) : 0; + + // True iff at least one test has failed. + bool failed = false; + + TestEventListener* repeater = listeners()->repeater(); + + start_timestamp_ = GetTimeInMillis(); + repeater->OnTestProgramStart(*parent_); + + // How many times to repeat the tests? We don't want to repeat them + // when we are inside the subprocess of a death test. + const int repeat = in_subprocess_for_death_test ? 1 : GTEST_FLAG(repeat); + // Repeats forever if the repeat count is negative. + const bool forever = repeat < 0; + for (int i = 0; forever || i != repeat; i++) { + // We want to preserve failures generated by ad-hoc test + // assertions executed before RUN_ALL_TESTS(). + ClearNonAdHocTestResult(); + + const TimeInMillis start = GetTimeInMillis(); + + // Shuffles test cases and tests if requested. + if (has_tests_to_run && GTEST_FLAG(shuffle)) { + random()->Reseed(random_seed_); + // This should be done before calling OnTestIterationStart(), + // such that a test event listener can see the actual test order + // in the event. + ShuffleTests(); + } + + // Tells the unit test event listeners that the tests are about to start. + repeater->OnTestIterationStart(*parent_, i); + + // Runs each test case if there is at least one test to run. + if (has_tests_to_run) { + // Sets up all environments beforehand. + repeater->OnEnvironmentsSetUpStart(*parent_); + ForEach(environments_, SetUpEnvironment); + repeater->OnEnvironmentsSetUpEnd(*parent_); + + // Runs the tests only if there was no fatal failure during global + // set-up. + if (!Test::HasFatalFailure()) { + for (int test_index = 0; test_index < total_test_case_count(); + test_index++) { + GetMutableTestCase(test_index)->Run(); + } + } + + // Tears down all environments in reverse order afterwards. + repeater->OnEnvironmentsTearDownStart(*parent_); + std::for_each(environments_.rbegin(), environments_.rend(), + TearDownEnvironment); + repeater->OnEnvironmentsTearDownEnd(*parent_); + } + + elapsed_time_ = GetTimeInMillis() - start; + + // Tells the unit test event listener that the tests have just finished. + repeater->OnTestIterationEnd(*parent_, i); + + // Gets the result and clears it. + if (!Passed()) { + failed = true; + } + + // Restores the original test order after the iteration. This + // allows the user to quickly repro a failure that happens in the + // N-th iteration without repeating the first (N - 1) iterations. + // This is not enclosed in "if (GTEST_FLAG(shuffle)) { ... }", in + // case the user somehow changes the value of the flag somewhere + // (it's always safe to unshuffle the tests). + UnshuffleTests(); + + if (GTEST_FLAG(shuffle)) { + // Picks a new random seed for each iteration. + random_seed_ = GetNextRandomSeed(random_seed_); + } + } + + repeater->OnTestProgramEnd(*parent_); + + return !failed; +} + +// Reads the GTEST_SHARD_STATUS_FILE environment variable, and creates the file +// if the variable is present. If a file already exists at this location, this +// function will write over it. If the variable is present, but the file cannot +// be created, prints an error and exits. +void WriteToShardStatusFileIfNeeded() { + const char* const test_shard_file = posix::GetEnv(kTestShardStatusFile); + if (test_shard_file != NULL) { + FILE* const file = posix::FOpen(test_shard_file, "w"); + if (file == NULL) { + ColoredPrintf(COLOR_RED, + "Could not write to the test shard status file \"%s\" " + "specified by the %s environment variable.\n", + test_shard_file, kTestShardStatusFile); + fflush(stdout); + exit(EXIT_FAILURE); + } + fclose(file); + } +} + +// Checks whether sharding is enabled by examining the relevant +// environment variable values. If the variables are present, +// but inconsistent (i.e., shard_index >= total_shards), prints +// an error and exits. If in_subprocess_for_death_test, sharding is +// disabled because it must only be applied to the original test +// process. Otherwise, we could filter out death tests we intended to execute. +bool ShouldShard(const char* total_shards_env, + const char* shard_index_env, + bool in_subprocess_for_death_test) { + if (in_subprocess_for_death_test) { + return false; + } + + const Int32 total_shards = Int32FromEnvOrDie(total_shards_env, -1); + const Int32 shard_index = Int32FromEnvOrDie(shard_index_env, -1); + + if (total_shards == -1 && shard_index == -1) { + return false; + } else if (total_shards == -1 && shard_index != -1) { + const Message msg = Message() + << "Invalid environment variables: you have " + << kTestShardIndex << " = " << shard_index + << ", but have left " << kTestTotalShards << " unset.\n"; + ColoredPrintf(COLOR_RED, msg.GetString().c_str()); + fflush(stdout); + exit(EXIT_FAILURE); + } else if (total_shards != -1 && shard_index == -1) { + const Message msg = Message() + << "Invalid environment variables: you have " + << kTestTotalShards << " = " << total_shards + << ", but have left " << kTestShardIndex << " unset.\n"; + ColoredPrintf(COLOR_RED, msg.GetString().c_str()); + fflush(stdout); + exit(EXIT_FAILURE); + } else if (shard_index < 0 || shard_index >= total_shards) { + const Message msg = Message() + << "Invalid environment variables: we require 0 <= " + << kTestShardIndex << " < " << kTestTotalShards + << ", but you have " << kTestShardIndex << "=" << shard_index + << ", " << kTestTotalShards << "=" << total_shards << ".\n"; + ColoredPrintf(COLOR_RED, msg.GetString().c_str()); + fflush(stdout); + exit(EXIT_FAILURE); + } + + return total_shards > 1; +} + +// Parses the environment variable var as an Int32. If it is unset, +// returns default_val. If it is not an Int32, prints an error +// and aborts. +Int32 Int32FromEnvOrDie(const char* var, Int32 default_val) { + const char* str_val = posix::GetEnv(var); + if (str_val == NULL) { + return default_val; + } + + Int32 result; + if (!ParseInt32(Message() << "The value of environment variable " << var, + str_val, &result)) { + exit(EXIT_FAILURE); + } + return result; +} + +// Given the total number of shards, the shard index, and the test id, +// returns true iff the test should be run on this shard. The test id is +// some arbitrary but unique non-negative integer assigned to each test +// method. Assumes that 0 <= shard_index < total_shards. +bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_id) { + return (test_id % total_shards) == shard_index; +} + +// Compares the name of each test with the user-specified filter to +// decide whether the test should be run, then records the result in +// each TestCase and TestInfo object. +// If shard_tests == true, further filters tests based on sharding +// variables in the environment - see +// http://code.google.com/p/googletest/wiki/GoogleTestAdvancedGuide. +// Returns the number of tests that should run. +int UnitTestImpl::FilterTests(ReactionToSharding shard_tests) { + const Int32 total_shards = shard_tests == HONOR_SHARDING_PROTOCOL ? + Int32FromEnvOrDie(kTestTotalShards, -1) : -1; + const Int32 shard_index = shard_tests == HONOR_SHARDING_PROTOCOL ? + Int32FromEnvOrDie(kTestShardIndex, -1) : -1; + + // num_runnable_tests are the number of tests that will + // run across all shards (i.e., match filter and are not disabled). + // num_selected_tests are the number of tests to be run on + // this shard. + int num_runnable_tests = 0; + int num_selected_tests = 0; + for (size_t i = 0; i < test_cases_.size(); i++) { + TestCase* const test_case = test_cases_[i]; + const std::string &test_case_name = test_case->name(); + test_case->set_should_run(false); + + for (size_t j = 0; j < test_case->test_info_list().size(); j++) { + TestInfo* const test_info = test_case->test_info_list()[j]; + const std::string test_name(test_info->name()); + // A test is disabled if test case name or test name matches + // kDisableTestFilter. + const bool is_disabled = + internal::UnitTestOptions::MatchesFilter(test_case_name, + kDisableTestFilter) || + internal::UnitTestOptions::MatchesFilter(test_name, + kDisableTestFilter); + test_info->is_disabled_ = is_disabled; + + const bool matches_filter = + internal::UnitTestOptions::FilterMatchesTest(test_case_name, + test_name); + test_info->matches_filter_ = matches_filter; + + const bool is_runnable = + (GTEST_FLAG(also_run_disabled_tests) || !is_disabled) && + matches_filter; + + const bool is_selected = is_runnable && + (shard_tests == IGNORE_SHARDING_PROTOCOL || + ShouldRunTestOnShard(total_shards, shard_index, + num_runnable_tests)); + + num_runnable_tests += is_runnable; + num_selected_tests += is_selected; + + test_info->should_run_ = is_selected; + test_case->set_should_run(test_case->should_run() || is_selected); + } + } + return num_selected_tests; +} + +// Prints the given C-string on a single line by replacing all '\n' +// characters with string "\\n". If the output takes more than +// max_length characters, only prints the first max_length characters +// and "...". +static void PrintOnOneLine(const char* str, int max_length) { + if (str != NULL) { + for (int i = 0; *str != '\0'; ++str) { + if (i >= max_length) { + printf("..."); + break; + } + if (*str == '\n') { + printf("\\n"); + i += 2; + } else { + printf("%c", *str); + ++i; + } + } + } +} + +// Prints the names of the tests matching the user-specified filter flag. +void UnitTestImpl::ListTestsMatchingFilter() { + // Print at most this many characters for each type/value parameter. + const int kMaxParamLength = 250; + + for (size_t i = 0; i < test_cases_.size(); i++) { + const TestCase* const test_case = test_cases_[i]; + bool printed_test_case_name = false; + + for (size_t j = 0; j < test_case->test_info_list().size(); j++) { + const TestInfo* const test_info = + test_case->test_info_list()[j]; + if (test_info->matches_filter_) { + if (!printed_test_case_name) { + printed_test_case_name = true; + printf("%s.", test_case->name()); + if (test_case->type_param() != NULL) { + printf(" # %s = ", kTypeParamLabel); + // We print the type parameter on a single line to make + // the output easy to parse by a program. + PrintOnOneLine(test_case->type_param(), kMaxParamLength); + } + printf("\n"); + } + printf(" %s", test_info->name()); + if (test_info->value_param() != NULL) { + printf(" # %s = ", kValueParamLabel); + // We print the value parameter on a single line to make the + // output easy to parse by a program. + PrintOnOneLine(test_info->value_param(), kMaxParamLength); + } + printf("\n"); + } + } + } + fflush(stdout); +} + +// Sets the OS stack trace getter. +// +// Does nothing if the input and the current OS stack trace getter are +// the same; otherwise, deletes the old getter and makes the input the +// current getter. +void UnitTestImpl::set_os_stack_trace_getter( + OsStackTraceGetterInterface* getter) { + if (os_stack_trace_getter_ != getter) { + delete os_stack_trace_getter_; + os_stack_trace_getter_ = getter; + } +} + +// Returns the current OS stack trace getter if it is not NULL; +// otherwise, creates an OsStackTraceGetter, makes it the current +// getter, and returns it. +OsStackTraceGetterInterface* UnitTestImpl::os_stack_trace_getter() { + if (os_stack_trace_getter_ == NULL) { + os_stack_trace_getter_ = new OsStackTraceGetter; + } + + return os_stack_trace_getter_; +} + +// Returns the TestResult for the test that's currently running, or +// the TestResult for the ad hoc test if no test is running. +TestResult* UnitTestImpl::current_test_result() { + return current_test_info_ ? + &(current_test_info_->result_) : &ad_hoc_test_result_; +} + +// Shuffles all test cases, and the tests within each test case, +// making sure that death tests are still run first. +void UnitTestImpl::ShuffleTests() { + // Shuffles the death test cases. + ShuffleRange(random(), 0, last_death_test_case_ + 1, &test_case_indices_); + + // Shuffles the non-death test cases. + ShuffleRange(random(), last_death_test_case_ + 1, + static_cast(test_cases_.size()), &test_case_indices_); + + // Shuffles the tests inside each test case. + for (size_t i = 0; i < test_cases_.size(); i++) { + test_cases_[i]->ShuffleTests(random()); + } +} + +// Restores the test cases and tests to their order before the first shuffle. +void UnitTestImpl::UnshuffleTests() { + for (size_t i = 0; i < test_cases_.size(); i++) { + // Unshuffles the tests in each test case. + test_cases_[i]->UnshuffleTests(); + // Resets the index of each test case. + test_case_indices_[i] = static_cast(i); + } +} + +// Returns the current OS stack trace as an std::string. +// +// The maximum number of stack frames to be included is specified by +// the gtest_stack_trace_depth flag. The skip_count parameter +// specifies the number of top frames to be skipped, which doesn't +// count against the number of frames to be included. +// +// For example, if Foo() calls Bar(), which in turn calls +// GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in +// the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't. +std::string GetCurrentOsStackTraceExceptTop(UnitTest* /*unit_test*/, + int skip_count) { + // We pass skip_count + 1 to skip this wrapper function in addition + // to what the user really wants to skip. + return GetUnitTestImpl()->CurrentOsStackTraceExceptTop(skip_count + 1); +} + +// Used by the GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_ macro to +// suppress unreachable code warnings. +namespace { +class ClassUniqueToAlwaysTrue {}; +} + +bool IsTrue(bool condition) { return condition; } + +bool AlwaysTrue() { +#if GTEST_HAS_EXCEPTIONS + // This condition is always false so AlwaysTrue() never actually throws, + // but it makes the compiler think that it may throw. + if (IsTrue(false)) + throw ClassUniqueToAlwaysTrue(); +#endif // GTEST_HAS_EXCEPTIONS + return true; +} + +// If *pstr starts with the given prefix, modifies *pstr to be right +// past the prefix and returns true; otherwise leaves *pstr unchanged +// and returns false. None of pstr, *pstr, and prefix can be NULL. +bool SkipPrefix(const char* prefix, const char** pstr) { + const size_t prefix_len = strlen(prefix); + if (strncmp(*pstr, prefix, prefix_len) == 0) { + *pstr += prefix_len; + return true; + } + return false; +} + +// Parses a string as a command line flag. The string should have +// the format "--flag=value". When def_optional is true, the "=value" +// part can be omitted. +// +// Returns the value of the flag, or NULL if the parsing failed. +const char* ParseFlagValue(const char* str, + const char* flag, + bool def_optional) { + // str and flag must not be NULL. + if (str == NULL || flag == NULL) return NULL; + + // The flag must start with "--" followed by GTEST_FLAG_PREFIX_. + const std::string flag_str = std::string("--") + GTEST_FLAG_PREFIX_ + flag; + const size_t flag_len = flag_str.length(); + if (strncmp(str, flag_str.c_str(), flag_len) != 0) return NULL; + + // Skips the flag name. + const char* flag_end = str + flag_len; + + // When def_optional is true, it's OK to not have a "=value" part. + if (def_optional && (flag_end[0] == '\0')) { + return flag_end; + } + + // If def_optional is true and there are more characters after the + // flag name, or if def_optional is false, there must be a '=' after + // the flag name. + if (flag_end[0] != '=') return NULL; + + // Returns the string after "=". + return flag_end + 1; +} + +// Parses a string for a bool flag, in the form of either +// "--flag=value" or "--flag". +// +// In the former case, the value is taken as true as long as it does +// not start with '0', 'f', or 'F'. +// +// In the latter case, the value is taken as true. +// +// On success, stores the value of the flag in *value, and returns +// true. On failure, returns false without changing *value. +bool ParseBoolFlag(const char* str, const char* flag, bool* value) { + // Gets the value of the flag as a string. + const char* const value_str = ParseFlagValue(str, flag, true); + + // Aborts if the parsing failed. + if (value_str == NULL) return false; + + // Converts the string value to a bool. + *value = !(*value_str == '0' || *value_str == 'f' || *value_str == 'F'); + return true; +} + +// Parses a string for an Int32 flag, in the form of +// "--flag=value". +// +// On success, stores the value of the flag in *value, and returns +// true. On failure, returns false without changing *value. +bool ParseInt32Flag(const char* str, const char* flag, Int32* value) { + // Gets the value of the flag as a string. + const char* const value_str = ParseFlagValue(str, flag, false); + + // Aborts if the parsing failed. + if (value_str == NULL) return false; + + // Sets *value to the value of the flag. + return ParseInt32(Message() << "The value of flag --" << flag, + value_str, value); +} + +// Parses a string for a string flag, in the form of +// "--flag=value". +// +// On success, stores the value of the flag in *value, and returns +// true. On failure, returns false without changing *value. +bool ParseStringFlag(const char* str, const char* flag, std::string* value) { + // Gets the value of the flag as a string. + const char* const value_str = ParseFlagValue(str, flag, false); + + // Aborts if the parsing failed. + if (value_str == NULL) return false; + + // Sets *value to the value of the flag. + *value = value_str; + return true; +} + +// Determines whether a string has a prefix that Google Test uses for its +// flags, i.e., starts with GTEST_FLAG_PREFIX_ or GTEST_FLAG_PREFIX_DASH_. +// If Google Test detects that a command line flag has its prefix but is not +// recognized, it will print its help message. Flags starting with +// GTEST_INTERNAL_PREFIX_ followed by "internal_" are considered Google Test +// internal flags and do not trigger the help message. +static bool HasGoogleTestFlagPrefix(const char* str) { + return (SkipPrefix("--", &str) || + SkipPrefix("-", &str) || + SkipPrefix("/", &str)) && + !SkipPrefix(GTEST_FLAG_PREFIX_ "internal_", &str) && + (SkipPrefix(GTEST_FLAG_PREFIX_, &str) || + SkipPrefix(GTEST_FLAG_PREFIX_DASH_, &str)); +} + +// Prints a string containing code-encoded text. The following escape +// sequences can be used in the string to control the text color: +// +// @@ prints a single '@' character. +// @R changes the color to red. +// @G changes the color to green. +// @Y changes the color to yellow. +// @D changes to the default terminal text color. +// +// TODO(wan@google.com): Write tests for this once we add stdout +// capturing to Google Test. +static void PrintColorEncoded(const char* str) { + GTestColor color = COLOR_DEFAULT; // The current color. + + // Conceptually, we split the string into segments divided by escape + // sequences. Then we print one segment at a time. At the end of + // each iteration, the str pointer advances to the beginning of the + // next segment. + for (;;) { + const char* p = strchr(str, '@'); + if (p == NULL) { + ColoredPrintf(color, "%s", str); + return; + } + + ColoredPrintf(color, "%s", std::string(str, p).c_str()); + + const char ch = p[1]; + str = p + 2; + if (ch == '@') { + ColoredPrintf(color, "@"); + } else if (ch == 'D') { + color = COLOR_DEFAULT; + } else if (ch == 'R') { + color = COLOR_RED; + } else if (ch == 'G') { + color = COLOR_GREEN; + } else if (ch == 'Y') { + color = COLOR_YELLOW; + } else { + --str; + } + } +} + +static const char kColorEncodedHelpMessage[] = +"This program contains tests written using " GTEST_NAME_ ". You can use the\n" +"following command line flags to control its behavior:\n" +"\n" +"Test Selection:\n" +" @G--" GTEST_FLAG_PREFIX_ "list_tests@D\n" +" List the names of all tests instead of running them. The name of\n" +" TEST(Foo, Bar) is \"Foo.Bar\".\n" +" @G--" GTEST_FLAG_PREFIX_ "filter=@YPOSTIVE_PATTERNS" + "[@G-@YNEGATIVE_PATTERNS]@D\n" +" Run only the tests whose name matches one of the positive patterns but\n" +" none of the negative patterns. '?' matches any single character; '*'\n" +" matches any substring; ':' separates two patterns.\n" +" @G--" GTEST_FLAG_PREFIX_ "also_run_disabled_tests@D\n" +" Run all disabled tests too.\n" +"\n" +"Test Execution:\n" +" @G--" GTEST_FLAG_PREFIX_ "repeat=@Y[COUNT]@D\n" +" Run the tests repeatedly; use a negative count to repeat forever.\n" +" @G--" GTEST_FLAG_PREFIX_ "shuffle@D\n" +" Randomize tests' orders on every iteration.\n" +" @G--" GTEST_FLAG_PREFIX_ "random_seed=@Y[NUMBER]@D\n" +" Random number seed to use for shuffling test orders (between 1 and\n" +" 99999, or 0 to use a seed based on the current time).\n" +"\n" +"Test Output:\n" +" @G--" GTEST_FLAG_PREFIX_ "color=@Y(@Gyes@Y|@Gno@Y|@Gauto@Y)@D\n" +" Enable/disable colored output. The default is @Gauto@D.\n" +" -@G-" GTEST_FLAG_PREFIX_ "print_time=0@D\n" +" Don't print the elapsed time of each test.\n" +" @G--" GTEST_FLAG_PREFIX_ "output=xml@Y[@G:@YDIRECTORY_PATH@G" + GTEST_PATH_SEP_ "@Y|@G:@YFILE_PATH]@D\n" +" Generate an XML report in the given directory or with the given file\n" +" name. @YFILE_PATH@D defaults to @Gtest_details.xml@D.\n" +#if GTEST_CAN_STREAM_RESULTS_ +" @G--" GTEST_FLAG_PREFIX_ "stream_result_to=@YHOST@G:@YPORT@D\n" +" Stream test results to the given server.\n" +#endif // GTEST_CAN_STREAM_RESULTS_ +"\n" +"Assertion Behavior:\n" +#if GTEST_HAS_DEATH_TEST && !GTEST_OS_WINDOWS +" @G--" GTEST_FLAG_PREFIX_ "death_test_style=@Y(@Gfast@Y|@Gthreadsafe@Y)@D\n" +" Set the default death test style.\n" +#endif // GTEST_HAS_DEATH_TEST && !GTEST_OS_WINDOWS +" @G--" GTEST_FLAG_PREFIX_ "break_on_failure@D\n" +" Turn assertion failures into debugger break-points.\n" +" @G--" GTEST_FLAG_PREFIX_ "throw_on_failure@D\n" +" Turn assertion failures into C++ exceptions.\n" +" @G--" GTEST_FLAG_PREFIX_ "catch_exceptions=0@D\n" +" Do not report exceptions as test failures. Instead, allow them\n" +" to crash the program or throw a pop-up (on Windows).\n" +"\n" +"Except for @G--" GTEST_FLAG_PREFIX_ "list_tests@D, you can alternatively set " + "the corresponding\n" +"environment variable of a flag (all letters in upper-case). For example, to\n" +"disable colored text output, you can either specify @G--" GTEST_FLAG_PREFIX_ + "color=no@D or set\n" +"the @G" GTEST_FLAG_PREFIX_UPPER_ "COLOR@D environment variable to @Gno@D.\n" +"\n" +"For more information, please read the " GTEST_NAME_ " documentation at\n" +"@G" GTEST_PROJECT_URL_ "@D. If you find a bug in " GTEST_NAME_ "\n" +"(not one in your own code or tests), please report it to\n" +"@G<" GTEST_DEV_EMAIL_ ">@D.\n"; + +// Parses the command line for Google Test flags, without initializing +// other parts of Google Test. The type parameter CharType can be +// instantiated to either char or wchar_t. +template +void ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) { + for (int i = 1; i < *argc; i++) { + const std::string arg_string = StreamableToString(argv[i]); + const char* const arg = arg_string.c_str(); + + using internal::ParseBoolFlag; + using internal::ParseInt32Flag; + using internal::ParseStringFlag; + + // Do we see a Google Test flag? + if (ParseBoolFlag(arg, kAlsoRunDisabledTestsFlag, + >EST_FLAG(also_run_disabled_tests)) || + ParseBoolFlag(arg, kBreakOnFailureFlag, + >EST_FLAG(break_on_failure)) || + ParseBoolFlag(arg, kCatchExceptionsFlag, + >EST_FLAG(catch_exceptions)) || + ParseStringFlag(arg, kColorFlag, >EST_FLAG(color)) || + ParseStringFlag(arg, kDeathTestStyleFlag, + >EST_FLAG(death_test_style)) || + ParseBoolFlag(arg, kDeathTestUseFork, + >EST_FLAG(death_test_use_fork)) || + ParseStringFlag(arg, kFilterFlag, >EST_FLAG(filter)) || + ParseStringFlag(arg, kInternalRunDeathTestFlag, + >EST_FLAG(internal_run_death_test)) || + ParseBoolFlag(arg, kListTestsFlag, >EST_FLAG(list_tests)) || + ParseStringFlag(arg, kOutputFlag, >EST_FLAG(output)) || + ParseBoolFlag(arg, kPrintTimeFlag, >EST_FLAG(print_time)) || + ParseInt32Flag(arg, kRandomSeedFlag, >EST_FLAG(random_seed)) || + ParseInt32Flag(arg, kRepeatFlag, >EST_FLAG(repeat)) || + ParseBoolFlag(arg, kShuffleFlag, >EST_FLAG(shuffle)) || + ParseInt32Flag(arg, kStackTraceDepthFlag, + >EST_FLAG(stack_trace_depth)) || + ParseStringFlag(arg, kStreamResultToFlag, + >EST_FLAG(stream_result_to)) || + ParseBoolFlag(arg, kThrowOnFailureFlag, + >EST_FLAG(throw_on_failure)) + ) { + // Yes. Shift the remainder of the argv list left by one. Note + // that argv has (*argc + 1) elements, the last one always being + // NULL. The following loop moves the trailing NULL element as + // well. + for (int j = i; j != *argc; j++) { + argv[j] = argv[j + 1]; + } + + // Decrements the argument count. + (*argc)--; + + // We also need to decrement the iterator as we just removed + // an element. + i--; + } else if (arg_string == "--help" || arg_string == "-h" || + arg_string == "-?" || arg_string == "/?" || + HasGoogleTestFlagPrefix(arg)) { + // Both help flag and unrecognized Google Test flags (excluding + // internal ones) trigger help display. + g_help_flag = true; + } + } + + if (g_help_flag) { + // We print the help here instead of in RUN_ALL_TESTS(), as the + // latter may not be called at all if the user is using Google + // Test with another testing framework. + PrintColorEncoded(kColorEncodedHelpMessage); + } +} + +// Parses the command line for Google Test flags, without initializing +// other parts of Google Test. +void ParseGoogleTestFlagsOnly(int* argc, char** argv) { + ParseGoogleTestFlagsOnlyImpl(argc, argv); +} +void ParseGoogleTestFlagsOnly(int* argc, wchar_t** argv) { + ParseGoogleTestFlagsOnlyImpl(argc, argv); +} + +// The internal implementation of InitGoogleTest(). +// +// The type parameter CharType can be instantiated to either char or +// wchar_t. +template +void InitGoogleTestImpl(int* argc, CharType** argv) { + g_init_gtest_count++; + + // We don't want to run the initialization code twice. + if (g_init_gtest_count != 1) return; + + if (*argc <= 0) return; + + internal::g_executable_path = internal::StreamableToString(argv[0]); + +#if GTEST_HAS_DEATH_TEST + + g_argvs.clear(); + for (int i = 0; i != *argc; i++) { + g_argvs.push_back(StreamableToString(argv[i])); + } + +#endif // GTEST_HAS_DEATH_TEST + + ParseGoogleTestFlagsOnly(argc, argv); + GetUnitTestImpl()->PostFlagParsingInit(); +} + +} // namespace internal + +// Initializes Google Test. This must be called before calling +// RUN_ALL_TESTS(). In particular, it parses a command line for the +// flags that Google Test recognizes. Whenever a Google Test flag is +// seen, it is removed from argv, and *argc is decremented. +// +// No value is returned. Instead, the Google Test flag variables are +// updated. +// +// Calling the function for the second time has no user-visible effect. +void InitGoogleTest(int* argc, char** argv) { + internal::InitGoogleTestImpl(argc, argv); +} + +// This overloaded version can be used in Windows programs compiled in +// UNICODE mode. +void InitGoogleTest(int* argc, wchar_t** argv) { + internal::InitGoogleTestImpl(argc, argv); +} + +} // namespace testing +// Copyright 2005, 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. +// +// Author: wan@google.com (Zhanyong Wan), vladl@google.com (Vlad Losev) +// +// This file implements death tests. + + +#if GTEST_HAS_DEATH_TEST + +# if GTEST_OS_MAC +# include +# endif // GTEST_OS_MAC + +# include +# include +# include + +# if GTEST_OS_LINUX +# include +# endif // GTEST_OS_LINUX + +# include + +# if GTEST_OS_WINDOWS +# include +# else +# include +# include +# endif // GTEST_OS_WINDOWS + +# if GTEST_OS_QNX +# include +# endif // GTEST_OS_QNX + +#endif // GTEST_HAS_DEATH_TEST + + +// Indicates that this translation unit is part of Google Test's +// implementation. It must come before gtest-internal-inl.h is +// included, or there will be a compiler error. This trick is to +// prevent a user from accidentally including gtest-internal-inl.h in +// his code. +#define GTEST_IMPLEMENTATION_ 1 +#undef GTEST_IMPLEMENTATION_ + +namespace testing { + +// Constants. + +// The default death test style. +static const char kDefaultDeathTestStyle[] = "fast"; + +GTEST_DEFINE_string_( + death_test_style, + internal::StringFromGTestEnv("death_test_style", kDefaultDeathTestStyle), + "Indicates how to run a death test in a forked child process: " + "\"threadsafe\" (child process re-executes the test binary " + "from the beginning, running only the specific death test) or " + "\"fast\" (child process runs the death test immediately " + "after forking)."); + +GTEST_DEFINE_bool_( + death_test_use_fork, + internal::BoolFromGTestEnv("death_test_use_fork", false), + "Instructs to use fork()/_exit() instead of clone() in death tests. " + "Ignored and always uses fork() on POSIX systems where clone() is not " + "implemented. Useful when running under valgrind or similar tools if " + "those do not support clone(). Valgrind 3.3.1 will just fail if " + "it sees an unsupported combination of clone() flags. " + "It is not recommended to use this flag w/o valgrind though it will " + "work in 99% of the cases. Once valgrind is fixed, this flag will " + "most likely be removed."); + +namespace internal { +GTEST_DEFINE_string_( + internal_run_death_test, "", + "Indicates the file, line number, temporal index of " + "the single death test to run, and a file descriptor to " + "which a success code may be sent, all separated by " + "the '|' characters. This flag is specified if and only if the current " + "process is a sub-process launched for running a thread-safe " + "death test. FOR INTERNAL USE ONLY."); +} // namespace internal + +#if GTEST_HAS_DEATH_TEST + +namespace internal { + +// Valid only for fast death tests. Indicates the code is running in the +// child process of a fast style death test. +static bool g_in_fast_death_test_child = false; + +// Returns a Boolean value indicating whether the caller is currently +// executing in the context of the death test child process. Tools such as +// Valgrind heap checkers may need this to modify their behavior in death +// tests. IMPORTANT: This is an internal utility. Using it may break the +// implementation of death tests. User code MUST NOT use it. +bool InDeathTestChild() { +# if GTEST_OS_WINDOWS + + // On Windows, death tests are thread-safe regardless of the value of the + // death_test_style flag. + return !GTEST_FLAG(internal_run_death_test).empty(); + +# else + + if (GTEST_FLAG(death_test_style) == "threadsafe") + return !GTEST_FLAG(internal_run_death_test).empty(); + else + return g_in_fast_death_test_child; +#endif +} + +} // namespace internal + +// ExitedWithCode constructor. +ExitedWithCode::ExitedWithCode(int exit_code) : exit_code_(exit_code) { +} + +// ExitedWithCode function-call operator. +bool ExitedWithCode::operator()(int exit_status) const { +# if GTEST_OS_WINDOWS + + return exit_status == exit_code_; + +# else + + return WIFEXITED(exit_status) && WEXITSTATUS(exit_status) == exit_code_; + +# endif // GTEST_OS_WINDOWS +} + +# if !GTEST_OS_WINDOWS +// KilledBySignal constructor. +KilledBySignal::KilledBySignal(int signum) : signum_(signum) { +} + +// KilledBySignal function-call operator. +bool KilledBySignal::operator()(int exit_status) const { + return WIFSIGNALED(exit_status) && WTERMSIG(exit_status) == signum_; +} +# endif // !GTEST_OS_WINDOWS + +namespace internal { + +// Utilities needed for death tests. + +// Generates a textual description of a given exit code, in the format +// specified by wait(2). +static std::string ExitSummary(int exit_code) { + Message m; + +# if GTEST_OS_WINDOWS + + m << "Exited with exit status " << exit_code; + +# else + + if (WIFEXITED(exit_code)) { + m << "Exited with exit status " << WEXITSTATUS(exit_code); + } else if (WIFSIGNALED(exit_code)) { + m << "Terminated by signal " << WTERMSIG(exit_code); + } +# ifdef WCOREDUMP + if (WCOREDUMP(exit_code)) { + m << " (core dumped)"; + } +# endif +# endif // GTEST_OS_WINDOWS + + return m.GetString(); +} + +// Returns true if exit_status describes a process that was terminated +// by a signal, or exited normally with a nonzero exit code. +bool ExitedUnsuccessfully(int exit_status) { + return !ExitedWithCode(0)(exit_status); +} + +# if !GTEST_OS_WINDOWS +// Generates a textual failure message when a death test finds more than +// one thread running, or cannot determine the number of threads, prior +// to executing the given statement. It is the responsibility of the +// caller not to pass a thread_count of 1. +static std::string DeathTestThreadWarning(size_t thread_count) { + Message msg; + msg << "Death tests use fork(), which is unsafe particularly" + << " in a threaded context. For this test, " << GTEST_NAME_ << " "; + if (thread_count == 0) + msg << "couldn't detect the number of threads."; + else + msg << "detected " << thread_count << " threads."; + return msg.GetString(); +} +# endif // !GTEST_OS_WINDOWS + +// Flag characters for reporting a death test that did not die. +static const char kDeathTestLived = 'L'; +static const char kDeathTestReturned = 'R'; +static const char kDeathTestThrew = 'T'; +static const char kDeathTestInternalError = 'I'; + +// An enumeration describing all of the possible ways that a death test can +// conclude. DIED means that the process died while executing the test +// code; LIVED means that process lived beyond the end of the test code; +// RETURNED means that the test statement attempted to execute a return +// statement, which is not allowed; THREW means that the test statement +// returned control by throwing an exception. IN_PROGRESS means the test +// has not yet concluded. +// TODO(vladl@google.com): Unify names and possibly values for +// AbortReason, DeathTestOutcome, and flag characters above. +enum DeathTestOutcome { IN_PROGRESS, DIED, LIVED, RETURNED, THREW }; + +// Routine for aborting the program which is safe to call from an +// exec-style death test child process, in which case the error +// message is propagated back to the parent process. Otherwise, the +// message is simply printed to stderr. In either case, the program +// then exits with status 1. +void DeathTestAbort(const std::string& message) { + // On a POSIX system, this function may be called from a threadsafe-style + // death test child process, which operates on a very small stack. Use + // the heap for any additional non-minuscule memory requirements. + const InternalRunDeathTestFlag* const flag = + GetUnitTestImpl()->internal_run_death_test_flag(); + if (flag != NULL) { + FILE* parent = posix::FDOpen(flag->write_fd(), "w"); + fputc(kDeathTestInternalError, parent); + fprintf(parent, "%s", message.c_str()); + fflush(parent); + _exit(1); + } else { + fprintf(stderr, "%s", message.c_str()); + fflush(stderr); + posix::Abort(); + } +} + +// A replacement for CHECK that calls DeathTestAbort if the assertion +// fails. +# define GTEST_DEATH_TEST_CHECK_(expression) \ + do { \ + if (!::testing::internal::IsTrue(expression)) { \ + DeathTestAbort( \ + ::std::string("CHECK failed: File ") + __FILE__ + ", line " \ + + ::testing::internal::StreamableToString(__LINE__) + ": " \ + + #expression); \ + } \ + } while (::testing::internal::AlwaysFalse()) + +// This macro is similar to GTEST_DEATH_TEST_CHECK_, but it is meant for +// evaluating any system call that fulfills two conditions: it must return +// -1 on failure, and set errno to EINTR when it is interrupted and +// should be tried again. The macro expands to a loop that repeatedly +// evaluates the expression as long as it evaluates to -1 and sets +// errno to EINTR. If the expression evaluates to -1 but errno is +// something other than EINTR, DeathTestAbort is called. +# define GTEST_DEATH_TEST_CHECK_SYSCALL_(expression) \ + do { \ + int gtest_retval; \ + do { \ + gtest_retval = (expression); \ + } while (gtest_retval == -1 && errno == EINTR); \ + if (gtest_retval == -1) { \ + DeathTestAbort( \ + ::std::string("CHECK failed: File ") + __FILE__ + ", line " \ + + ::testing::internal::StreamableToString(__LINE__) + ": " \ + + #expression + " != -1"); \ + } \ + } while (::testing::internal::AlwaysFalse()) + +// Returns the message describing the last system error in errno. +std::string GetLastErrnoDescription() { + return errno == 0 ? "" : posix::StrError(errno); +} + +// This is called from a death test parent process to read a failure +// message from the death test child process and log it with the FATAL +// severity. On Windows, the message is read from a pipe handle. On other +// platforms, it is read from a file descriptor. +static void FailFromInternalError(int fd) { + Message error; + char buffer[256]; + int num_read; + + do { + while ((num_read = posix::Read(fd, buffer, 255)) > 0) { + buffer[num_read] = '\0'; + error << buffer; + } + } while (num_read == -1 && errno == EINTR); + + if (num_read == 0) { + GTEST_LOG_(FATAL) << error.GetString(); + } else { + const int last_error = errno; + GTEST_LOG_(FATAL) << "Error while reading death test internal: " + << GetLastErrnoDescription() << " [" << last_error << "]"; + } +} + +// Death test constructor. Increments the running death test count +// for the current test. +DeathTest::DeathTest() { + TestInfo* const info = GetUnitTestImpl()->current_test_info(); + if (info == NULL) { + DeathTestAbort("Cannot run a death test outside of a TEST or " + "TEST_F construct"); + } +} + +// Creates and returns a death test by dispatching to the current +// death test factory. +bool DeathTest::Create(const char* statement, const RE* regex, + const char* file, int line, DeathTest** test) { + return GetUnitTestImpl()->death_test_factory()->Create( + statement, regex, file, line, test); +} + +const char* DeathTest::LastMessage() { + return last_death_test_message_.c_str(); +} + +void DeathTest::set_last_death_test_message(const std::string& message) { + last_death_test_message_ = message; +} + +std::string DeathTest::last_death_test_message_; + +// Provides cross platform implementation for some death functionality. +class DeathTestImpl : public DeathTest { + protected: + DeathTestImpl(const char* a_statement, const RE* a_regex) + : statement_(a_statement), + regex_(a_regex), + spawned_(false), + status_(-1), + outcome_(IN_PROGRESS), + read_fd_(-1), + write_fd_(-1) {} + + // read_fd_ is expected to be closed and cleared by a derived class. + ~DeathTestImpl() { GTEST_DEATH_TEST_CHECK_(read_fd_ == -1); } + + void Abort(AbortReason reason); + virtual bool Passed(bool status_ok); + + const char* statement() const { return statement_; } + const RE* regex() const { return regex_; } + bool spawned() const { return spawned_; } + void set_spawned(bool is_spawned) { spawned_ = is_spawned; } + int status() const { return status_; } + void set_status(int a_status) { status_ = a_status; } + DeathTestOutcome outcome() const { return outcome_; } + void set_outcome(DeathTestOutcome an_outcome) { outcome_ = an_outcome; } + int read_fd() const { return read_fd_; } + void set_read_fd(int fd) { read_fd_ = fd; } + int write_fd() const { return write_fd_; } + void set_write_fd(int fd) { write_fd_ = fd; } + + // Called in the parent process only. Reads the result code of the death + // test child process via a pipe, interprets it to set the outcome_ + // member, and closes read_fd_. Outputs diagnostics and terminates in + // case of unexpected codes. + void ReadAndInterpretStatusByte(); + + private: + // The textual content of the code this object is testing. This class + // doesn't own this string and should not attempt to delete it. + const char* const statement_; + // The regular expression which test output must match. DeathTestImpl + // doesn't own this object and should not attempt to delete it. + const RE* const regex_; + // True if the death test child process has been successfully spawned. + bool spawned_; + // The exit status of the child process. + int status_; + // How the death test concluded. + DeathTestOutcome outcome_; + // Descriptor to the read end of the pipe to the child process. It is + // always -1 in the child process. The child keeps its write end of the + // pipe in write_fd_. + int read_fd_; + // Descriptor to the child's write end of the pipe to the parent process. + // It is always -1 in the parent process. The parent keeps its end of the + // pipe in read_fd_. + int write_fd_; +}; + +// Called in the parent process only. Reads the result code of the death +// test child process via a pipe, interprets it to set the outcome_ +// member, and closes read_fd_. Outputs diagnostics and terminates in +// case of unexpected codes. +void DeathTestImpl::ReadAndInterpretStatusByte() { + char flag; + int bytes_read; + + // The read() here blocks until data is available (signifying the + // failure of the death test) or until the pipe is closed (signifying + // its success), so it's okay to call this in the parent before + // the child process has exited. + do { + bytes_read = posix::Read(read_fd(), &flag, 1); + } while (bytes_read == -1 && errno == EINTR); + + if (bytes_read == 0) { + set_outcome(DIED); + } else if (bytes_read == 1) { + switch (flag) { + case kDeathTestReturned: + set_outcome(RETURNED); + break; + case kDeathTestThrew: + set_outcome(THREW); + break; + case kDeathTestLived: + set_outcome(LIVED); + break; + case kDeathTestInternalError: + FailFromInternalError(read_fd()); // Does not return. + break; + default: + GTEST_LOG_(FATAL) << "Death test child process reported " + << "unexpected status byte (" + << static_cast(flag) << ")"; + } + } else { + GTEST_LOG_(FATAL) << "Read from death test child process failed: " + << GetLastErrnoDescription(); + } + GTEST_DEATH_TEST_CHECK_SYSCALL_(posix::Close(read_fd())); + set_read_fd(-1); +} + +// Signals that the death test code which should have exited, didn't. +// Should be called only in a death test child process. +// Writes a status byte to the child's status file descriptor, then +// calls _exit(1). +void DeathTestImpl::Abort(AbortReason reason) { + // The parent process considers the death test to be a failure if + // it finds any data in our pipe. So, here we write a single flag byte + // to the pipe, then exit. + const char status_ch = + reason == TEST_DID_NOT_DIE ? kDeathTestLived : + reason == TEST_THREW_EXCEPTION ? kDeathTestThrew : kDeathTestReturned; + + GTEST_DEATH_TEST_CHECK_SYSCALL_(posix::Write(write_fd(), &status_ch, 1)); + // We are leaking the descriptor here because on some platforms (i.e., + // when built as Windows DLL), destructors of global objects will still + // run after calling _exit(). On such systems, write_fd_ will be + // indirectly closed from the destructor of UnitTestImpl, causing double + // close if it is also closed here. On debug configurations, double close + // may assert. As there are no in-process buffers to flush here, we are + // relying on the OS to close the descriptor after the process terminates + // when the destructors are not run. + _exit(1); // Exits w/o any normal exit hooks (we were supposed to crash) +} + +// Returns an indented copy of stderr output for a death test. +// This makes distinguishing death test output lines from regular log lines +// much easier. +static ::std::string FormatDeathTestOutput(const ::std::string& output) { + ::std::string ret; + for (size_t at = 0; ; ) { + const size_t line_end = output.find('\n', at); + ret += "[ DEATH ] "; + if (line_end == ::std::string::npos) { + ret += output.substr(at); + break; + } + ret += output.substr(at, line_end + 1 - at); + at = line_end + 1; + } + return ret; +} + +// Assesses the success or failure of a death test, using both private +// members which have previously been set, and one argument: +// +// Private data members: +// outcome: An enumeration describing how the death test +// concluded: DIED, LIVED, THREW, or RETURNED. The death test +// fails in the latter three cases. +// status: The exit status of the child process. On *nix, it is in the +// in the format specified by wait(2). On Windows, this is the +// value supplied to the ExitProcess() API or a numeric code +// of the exception that terminated the program. +// regex: A regular expression object to be applied to +// the test's captured standard error output; the death test +// fails if it does not match. +// +// Argument: +// status_ok: true if exit_status is acceptable in the context of +// this particular death test, which fails if it is false +// +// Returns true iff all of the above conditions are met. Otherwise, the +// first failing condition, in the order given above, is the one that is +// reported. Also sets the last death test message string. +bool DeathTestImpl::Passed(bool status_ok) { + if (!spawned()) + return false; + + const std::string error_message = GetCapturedStderr(); + + bool success = false; + Message buffer; + + buffer << "Death test: " << statement() << "\n"; + switch (outcome()) { + case LIVED: + buffer << " Result: failed to die.\n" + << " Error msg:\n" << FormatDeathTestOutput(error_message); + break; + case THREW: + buffer << " Result: threw an exception.\n" + << " Error msg:\n" << FormatDeathTestOutput(error_message); + break; + case RETURNED: + buffer << " Result: illegal return in test statement.\n" + << " Error msg:\n" << FormatDeathTestOutput(error_message); + break; + case DIED: + if (status_ok) { + const bool matched = RE::PartialMatch(error_message.c_str(), *regex()); + if (matched) { + success = true; + } else { + buffer << " Result: died but not with expected error.\n" + << " Expected: " << regex()->pattern() << "\n" + << "Actual msg:\n" << FormatDeathTestOutput(error_message); + } + } else { + buffer << " Result: died but not with expected exit code:\n" + << " " << ExitSummary(status()) << "\n" + << "Actual msg:\n" << FormatDeathTestOutput(error_message); + } + break; + case IN_PROGRESS: + default: + GTEST_LOG_(FATAL) + << "DeathTest::Passed somehow called before conclusion of test"; + } + + DeathTest::set_last_death_test_message(buffer.GetString()); + return success; +} + +# if GTEST_OS_WINDOWS +// WindowsDeathTest implements death tests on Windows. Due to the +// specifics of starting new processes on Windows, death tests there are +// always threadsafe, and Google Test considers the +// --gtest_death_test_style=fast setting to be equivalent to +// --gtest_death_test_style=threadsafe there. +// +// A few implementation notes: Like the Linux version, the Windows +// implementation uses pipes for child-to-parent communication. But due to +// the specifics of pipes on Windows, some extra steps are required: +// +// 1. The parent creates a communication pipe and stores handles to both +// ends of it. +// 2. The parent starts the child and provides it with the information +// necessary to acquire the handle to the write end of the pipe. +// 3. The child acquires the write end of the pipe and signals the parent +// using a Windows event. +// 4. Now the parent can release the write end of the pipe on its side. If +// this is done before step 3, the object's reference count goes down to +// 0 and it is destroyed, preventing the child from acquiring it. The +// parent now has to release it, or read operations on the read end of +// the pipe will not return when the child terminates. +// 5. The parent reads child's output through the pipe (outcome code and +// any possible error messages) from the pipe, and its stderr and then +// determines whether to fail the test. +// +// Note: to distinguish Win32 API calls from the local method and function +// calls, the former are explicitly resolved in the global namespace. +// +class WindowsDeathTest : public DeathTestImpl { + public: + WindowsDeathTest(const char* a_statement, + const RE* a_regex, + const char* file, + int line) + : DeathTestImpl(a_statement, a_regex), file_(file), line_(line) {} + + // All of these virtual functions are inherited from DeathTest. + virtual int Wait(); + virtual TestRole AssumeRole(); + + private: + // The name of the file in which the death test is located. + const char* const file_; + // The line number on which the death test is located. + const int line_; + // Handle to the write end of the pipe to the child process. + AutoHandle write_handle_; + // Child process handle. + AutoHandle child_handle_; + // Event the child process uses to signal the parent that it has + // acquired the handle to the write end of the pipe. After seeing this + // event the parent can release its own handles to make sure its + // ReadFile() calls return when the child terminates. + AutoHandle event_handle_; +}; + +// Waits for the child in a death test to exit, returning its exit +// status, or 0 if no child process exists. As a side effect, sets the +// outcome data member. +int WindowsDeathTest::Wait() { + if (!spawned()) + return 0; + + // Wait until the child either signals that it has acquired the write end + // of the pipe or it dies. + const HANDLE wait_handles[2] = { child_handle_.Get(), event_handle_.Get() }; + switch (::WaitForMultipleObjects(2, + wait_handles, + FALSE, // Waits for any of the handles. + INFINITE)) { + case WAIT_OBJECT_0: + case WAIT_OBJECT_0 + 1: + break; + default: + GTEST_DEATH_TEST_CHECK_(false); // Should not get here. + } + + // The child has acquired the write end of the pipe or exited. + // We release the handle on our side and continue. + write_handle_.Reset(); + event_handle_.Reset(); + + ReadAndInterpretStatusByte(); + + // Waits for the child process to exit if it haven't already. This + // returns immediately if the child has already exited, regardless of + // whether previous calls to WaitForMultipleObjects synchronized on this + // handle or not. + GTEST_DEATH_TEST_CHECK_( + WAIT_OBJECT_0 == ::WaitForSingleObject(child_handle_.Get(), + INFINITE)); + DWORD status_code; + GTEST_DEATH_TEST_CHECK_( + ::GetExitCodeProcess(child_handle_.Get(), &status_code) != FALSE); + child_handle_.Reset(); + set_status(static_cast(status_code)); + return status(); +} + +// The AssumeRole process for a Windows death test. It creates a child +// process with the same executable as the current process to run the +// death test. The child process is given the --gtest_filter and +// --gtest_internal_run_death_test flags such that it knows to run the +// current death test only. +DeathTest::TestRole WindowsDeathTest::AssumeRole() { + const UnitTestImpl* const impl = GetUnitTestImpl(); + const InternalRunDeathTestFlag* const flag = + impl->internal_run_death_test_flag(); + const TestInfo* const info = impl->current_test_info(); + const int death_test_index = info->result()->death_test_count(); + + if (flag != NULL) { + // ParseInternalRunDeathTestFlag() has performed all the necessary + // processing. + set_write_fd(flag->write_fd()); + return EXECUTE_TEST; + } + + // WindowsDeathTest uses an anonymous pipe to communicate results of + // a death test. + SECURITY_ATTRIBUTES handles_are_inheritable = { + sizeof(SECURITY_ATTRIBUTES), NULL, TRUE }; + HANDLE read_handle, write_handle; + GTEST_DEATH_TEST_CHECK_( + ::CreatePipe(&read_handle, &write_handle, &handles_are_inheritable, + 0) // Default buffer size. + != FALSE); + set_read_fd(::_open_osfhandle(reinterpret_cast(read_handle), + O_RDONLY)); + write_handle_.Reset(write_handle); + event_handle_.Reset(::CreateEvent( + &handles_are_inheritable, + TRUE, // The event will automatically reset to non-signaled state. + FALSE, // The initial state is non-signalled. + NULL)); // The even is unnamed. + GTEST_DEATH_TEST_CHECK_(event_handle_.Get() != NULL); + const std::string filter_flag = + std::string("--") + GTEST_FLAG_PREFIX_ + kFilterFlag + "=" + + info->test_case_name() + "." + info->name(); + const std::string internal_flag = + std::string("--") + GTEST_FLAG_PREFIX_ + kInternalRunDeathTestFlag + + "=" + file_ + "|" + StreamableToString(line_) + "|" + + StreamableToString(death_test_index) + "|" + + StreamableToString(static_cast(::GetCurrentProcessId())) + + // size_t has the same width as pointers on both 32-bit and 64-bit + // Windows platforms. + // See http://msdn.microsoft.com/en-us/library/tcxf1dw6.aspx. + "|" + StreamableToString(reinterpret_cast(write_handle)) + + "|" + StreamableToString(reinterpret_cast(event_handle_.Get())); + + char executable_path[_MAX_PATH + 1]; // NOLINT + GTEST_DEATH_TEST_CHECK_( + _MAX_PATH + 1 != ::GetModuleFileNameA(NULL, + executable_path, + _MAX_PATH)); + + std::string command_line = + std::string(::GetCommandLineA()) + " " + filter_flag + " \"" + + internal_flag + "\""; + + DeathTest::set_last_death_test_message(""); + + CaptureStderr(); + // Flush the log buffers since the log streams are shared with the child. + FlushInfoLog(); + + // The child process will share the standard handles with the parent. + STARTUPINFOA startup_info; + memset(&startup_info, 0, sizeof(STARTUPINFO)); + startup_info.dwFlags = STARTF_USESTDHANDLES; + startup_info.hStdInput = ::GetStdHandle(STD_INPUT_HANDLE); + startup_info.hStdOutput = ::GetStdHandle(STD_OUTPUT_HANDLE); + startup_info.hStdError = ::GetStdHandle(STD_ERROR_HANDLE); + + PROCESS_INFORMATION process_info; + GTEST_DEATH_TEST_CHECK_(::CreateProcessA( + executable_path, + const_cast(command_line.c_str()), + NULL, // Retuned process handle is not inheritable. + NULL, // Retuned thread handle is not inheritable. + TRUE, // Child inherits all inheritable handles (for write_handle_). + 0x0, // Default creation flags. + NULL, // Inherit the parent's environment. + UnitTest::GetInstance()->original_working_dir(), + &startup_info, + &process_info) != FALSE); + child_handle_.Reset(process_info.hProcess); + ::CloseHandle(process_info.hThread); + set_spawned(true); + return OVERSEE_TEST; +} +# else // We are not on Windows. + +// ForkingDeathTest provides implementations for most of the abstract +// methods of the DeathTest interface. Only the AssumeRole method is +// left undefined. +class ForkingDeathTest : public DeathTestImpl { + public: + ForkingDeathTest(const char* statement, const RE* regex); + + // All of these virtual functions are inherited from DeathTest. + virtual int Wait(); + + protected: + void set_child_pid(pid_t child_pid) { child_pid_ = child_pid; } + + private: + // PID of child process during death test; 0 in the child process itself. + pid_t child_pid_; +}; + +// Constructs a ForkingDeathTest. +ForkingDeathTest::ForkingDeathTest(const char* a_statement, const RE* a_regex) + : DeathTestImpl(a_statement, a_regex), + child_pid_(-1) {} + +// Waits for the child in a death test to exit, returning its exit +// status, or 0 if no child process exists. As a side effect, sets the +// outcome data member. +int ForkingDeathTest::Wait() { + if (!spawned()) + return 0; + + ReadAndInterpretStatusByte(); + + int status_value; + GTEST_DEATH_TEST_CHECK_SYSCALL_(waitpid(child_pid_, &status_value, 0)); + set_status(status_value); + return status_value; +} + +// A concrete death test class that forks, then immediately runs the test +// in the child process. +class NoExecDeathTest : public ForkingDeathTest { + public: + NoExecDeathTest(const char* a_statement, const RE* a_regex) : + ForkingDeathTest(a_statement, a_regex) { } + virtual TestRole AssumeRole(); +}; + +// The AssumeRole process for a fork-and-run death test. It implements a +// straightforward fork, with a simple pipe to transmit the status byte. +DeathTest::TestRole NoExecDeathTest::AssumeRole() { + const size_t thread_count = GetThreadCount(); + if (thread_count != 1) { + GTEST_LOG_(WARNING) << DeathTestThreadWarning(thread_count); + } + + int pipe_fd[2]; + GTEST_DEATH_TEST_CHECK_(pipe(pipe_fd) != -1); + + DeathTest::set_last_death_test_message(""); + CaptureStderr(); + // When we fork the process below, the log file buffers are copied, but the + // file descriptors are shared. We flush all log files here so that closing + // the file descriptors in the child process doesn't throw off the + // synchronization between descriptors and buffers in the parent process. + // This is as close to the fork as possible to avoid a race condition in case + // there are multiple threads running before the death test, and another + // thread writes to the log file. + FlushInfoLog(); + + const pid_t child_pid = fork(); + GTEST_DEATH_TEST_CHECK_(child_pid != -1); + set_child_pid(child_pid); + if (child_pid == 0) { + GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[0])); + set_write_fd(pipe_fd[1]); + // Redirects all logging to stderr in the child process to prevent + // concurrent writes to the log files. We capture stderr in the parent + // process and append the child process' output to a log. + LogToStderr(); + // Event forwarding to the listeners of event listener API mush be shut + // down in death test subprocesses. + GetUnitTestImpl()->listeners()->SuppressEventForwarding(); + g_in_fast_death_test_child = true; + return EXECUTE_TEST; + } else { + GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[1])); + set_read_fd(pipe_fd[0]); + set_spawned(true); + return OVERSEE_TEST; + } +} + +// A concrete death test class that forks and re-executes the main +// program from the beginning, with command-line flags set that cause +// only this specific death test to be run. +class ExecDeathTest : public ForkingDeathTest { + public: + ExecDeathTest(const char* a_statement, const RE* a_regex, + const char* file, int line) : + ForkingDeathTest(a_statement, a_regex), file_(file), line_(line) { } + virtual TestRole AssumeRole(); + private: + static ::std::vector + GetArgvsForDeathTestChildProcess() { + ::std::vector args = GetInjectableArgvs(); + return args; + } + // The name of the file in which the death test is located. + const char* const file_; + // The line number on which the death test is located. + const int line_; +}; + +// Utility class for accumulating command-line arguments. +class Arguments { + public: + Arguments() { + args_.push_back(NULL); + } + + ~Arguments() { + for (std::vector::iterator i = args_.begin(); i != args_.end(); + ++i) { + free(*i); + } + } + void AddArgument(const char* argument) { + args_.insert(args_.end() - 1, posix::StrDup(argument)); + } + + template + void AddArguments(const ::std::vector& arguments) { + for (typename ::std::vector::const_iterator i = arguments.begin(); + i != arguments.end(); + ++i) { + args_.insert(args_.end() - 1, posix::StrDup(i->c_str())); + } + } + char* const* Argv() { + return &args_[0]; + } + + private: + std::vector args_; +}; + +// A struct that encompasses the arguments to the child process of a +// threadsafe-style death test process. +struct ExecDeathTestArgs { + char* const* argv; // Command-line arguments for the child's call to exec + int close_fd; // File descriptor to close; the read end of a pipe +}; + +# if GTEST_OS_MAC +inline char** GetEnviron() { + // When Google Test is built as a framework on MacOS X, the environ variable + // is unavailable. Apple's documentation (man environ) recommends using + // _NSGetEnviron() instead. + return *_NSGetEnviron(); +} +# else +// Some POSIX platforms expect you to declare environ. extern "C" makes +// it reside in the global namespace. +extern "C" char** environ; +inline char** GetEnviron() { return environ; } +# endif // GTEST_OS_MAC + +# if !GTEST_OS_QNX +// The main function for a threadsafe-style death test child process. +// This function is called in a clone()-ed process and thus must avoid +// any potentially unsafe operations like malloc or libc functions. +static int ExecDeathTestChildMain(void* child_arg) { + ExecDeathTestArgs* const args = static_cast(child_arg); + GTEST_DEATH_TEST_CHECK_SYSCALL_(close(args->close_fd)); + + // We need to execute the test program in the same environment where + // it was originally invoked. Therefore we change to the original + // working directory first. + const char* const original_dir = + UnitTest::GetInstance()->original_working_dir(); + // We can safely call chdir() as it's a direct system call. + if (chdir(original_dir) != 0) { + DeathTestAbort(std::string("chdir(\"") + original_dir + "\") failed: " + + GetLastErrnoDescription()); + return EXIT_FAILURE; + } + + // We can safely call execve() as it's a direct system call. We + // cannot use execvp() as it's a libc function and thus potentially + // unsafe. Since execve() doesn't search the PATH, the user must + // invoke the test program via a valid path that contains at least + // one path separator. + execve(args->argv[0], args->argv, GetEnviron()); + DeathTestAbort(std::string("execve(") + args->argv[0] + ", ...) in " + + original_dir + " failed: " + + GetLastErrnoDescription()); + return EXIT_FAILURE; +} +# endif // !GTEST_OS_QNX + +// Two utility routines that together determine the direction the stack +// grows. +// This could be accomplished more elegantly by a single recursive +// function, but we want to guard against the unlikely possibility of +// a smart compiler optimizing the recursion away. +// +// GTEST_NO_INLINE_ is required to prevent GCC 4.6 from inlining +// StackLowerThanAddress into StackGrowsDown, which then doesn't give +// correct answer. +void StackLowerThanAddress(const void* ptr, bool* result) GTEST_NO_INLINE_; +void StackLowerThanAddress(const void* ptr, bool* result) { + int dummy; + *result = (&dummy < ptr); +} + +bool StackGrowsDown() { + int dummy; + bool result; + StackLowerThanAddress(&dummy, &result); + return result; +} + +// Spawns a child process with the same executable as the current process in +// a thread-safe manner and instructs it to run the death test. The +// implementation uses fork(2) + exec. On systems where clone(2) is +// available, it is used instead, being slightly more thread-safe. On QNX, +// fork supports only single-threaded environments, so this function uses +// spawn(2) there instead. The function dies with an error message if +// anything goes wrong. +static pid_t ExecDeathTestSpawnChild(char* const* argv, int close_fd) { + ExecDeathTestArgs args = { argv, close_fd }; + pid_t child_pid = -1; + +# if GTEST_OS_QNX + // Obtains the current directory and sets it to be closed in the child + // process. + const int cwd_fd = open(".", O_RDONLY); + GTEST_DEATH_TEST_CHECK_(cwd_fd != -1); + GTEST_DEATH_TEST_CHECK_SYSCALL_(fcntl(cwd_fd, F_SETFD, FD_CLOEXEC)); + // We need to execute the test program in the same environment where + // it was originally invoked. Therefore we change to the original + // working directory first. + const char* const original_dir = + UnitTest::GetInstance()->original_working_dir(); + // We can safely call chdir() as it's a direct system call. + if (chdir(original_dir) != 0) { + DeathTestAbort(std::string("chdir(\"") + original_dir + "\") failed: " + + GetLastErrnoDescription()); + return EXIT_FAILURE; + } + + int fd_flags; + // Set close_fd to be closed after spawn. + GTEST_DEATH_TEST_CHECK_SYSCALL_(fd_flags = fcntl(close_fd, F_GETFD)); + GTEST_DEATH_TEST_CHECK_SYSCALL_(fcntl(close_fd, F_SETFD, + fd_flags | FD_CLOEXEC)); + struct inheritance inherit = {0}; + // spawn is a system call. + child_pid = spawn(args.argv[0], 0, NULL, &inherit, args.argv, GetEnviron()); + // Restores the current working directory. + GTEST_DEATH_TEST_CHECK_(fchdir(cwd_fd) != -1); + GTEST_DEATH_TEST_CHECK_SYSCALL_(close(cwd_fd)); + +# else // GTEST_OS_QNX +# if GTEST_OS_LINUX + // When a SIGPROF signal is received while fork() or clone() are executing, + // the process may hang. To avoid this, we ignore SIGPROF here and re-enable + // it after the call to fork()/clone() is complete. + struct sigaction saved_sigprof_action; + struct sigaction ignore_sigprof_action; + memset(&ignore_sigprof_action, 0, sizeof(ignore_sigprof_action)); + sigemptyset(&ignore_sigprof_action.sa_mask); + ignore_sigprof_action.sa_handler = SIG_IGN; + GTEST_DEATH_TEST_CHECK_SYSCALL_(sigaction( + SIGPROF, &ignore_sigprof_action, &saved_sigprof_action)); +# endif // GTEST_OS_LINUX + +# if GTEST_HAS_CLONE + const bool use_fork = GTEST_FLAG(death_test_use_fork); + + if (!use_fork) { + static const bool stack_grows_down = StackGrowsDown(); + const size_t stack_size = getpagesize(); + // MMAP_ANONYMOUS is not defined on Mac, so we use MAP_ANON instead. + void* const stack = mmap(NULL, stack_size, PROT_READ | PROT_WRITE, + MAP_ANON | MAP_PRIVATE, -1, 0); + GTEST_DEATH_TEST_CHECK_(stack != MAP_FAILED); + + // Maximum stack alignment in bytes: For a downward-growing stack, this + // amount is subtracted from size of the stack space to get an address + // that is within the stack space and is aligned on all systems we care + // about. As far as I know there is no ABI with stack alignment greater + // than 64. We assume stack and stack_size already have alignment of + // kMaxStackAlignment. + const size_t kMaxStackAlignment = 64; + void* const stack_top = + static_cast(stack) + + (stack_grows_down ? stack_size - kMaxStackAlignment : 0); + GTEST_DEATH_TEST_CHECK_(stack_size > kMaxStackAlignment && + reinterpret_cast(stack_top) % kMaxStackAlignment == 0); + + child_pid = clone(&ExecDeathTestChildMain, stack_top, SIGCHLD, &args); + + GTEST_DEATH_TEST_CHECK_(munmap(stack, stack_size) != -1); + } +# else + const bool use_fork = true; +# endif // GTEST_HAS_CLONE + + if (use_fork && (child_pid = fork()) == 0) { + ExecDeathTestChildMain(&args); + _exit(0); + } +# endif // GTEST_OS_QNX +# if GTEST_OS_LINUX + GTEST_DEATH_TEST_CHECK_SYSCALL_( + sigaction(SIGPROF, &saved_sigprof_action, NULL)); +# endif // GTEST_OS_LINUX + + GTEST_DEATH_TEST_CHECK_(child_pid != -1); + return child_pid; +} + +// The AssumeRole process for a fork-and-exec death test. It re-executes the +// main program from the beginning, setting the --gtest_filter +// and --gtest_internal_run_death_test flags to cause only the current +// death test to be re-run. +DeathTest::TestRole ExecDeathTest::AssumeRole() { + const UnitTestImpl* const impl = GetUnitTestImpl(); + const InternalRunDeathTestFlag* const flag = + impl->internal_run_death_test_flag(); + const TestInfo* const info = impl->current_test_info(); + const int death_test_index = info->result()->death_test_count(); + + if (flag != NULL) { + set_write_fd(flag->write_fd()); + return EXECUTE_TEST; + } + + int pipe_fd[2]; + GTEST_DEATH_TEST_CHECK_(pipe(pipe_fd) != -1); + // Clear the close-on-exec flag on the write end of the pipe, lest + // it be closed when the child process does an exec: + GTEST_DEATH_TEST_CHECK_(fcntl(pipe_fd[1], F_SETFD, 0) != -1); + + const std::string filter_flag = + std::string("--") + GTEST_FLAG_PREFIX_ + kFilterFlag + "=" + + info->test_case_name() + "." + info->name(); + const std::string internal_flag = + std::string("--") + GTEST_FLAG_PREFIX_ + kInternalRunDeathTestFlag + "=" + + file_ + "|" + StreamableToString(line_) + "|" + + StreamableToString(death_test_index) + "|" + + StreamableToString(pipe_fd[1]); + Arguments args; + args.AddArguments(GetArgvsForDeathTestChildProcess()); + args.AddArgument(filter_flag.c_str()); + args.AddArgument(internal_flag.c_str()); + + DeathTest::set_last_death_test_message(""); + + CaptureStderr(); + // See the comment in NoExecDeathTest::AssumeRole for why the next line + // is necessary. + FlushInfoLog(); + + const pid_t child_pid = ExecDeathTestSpawnChild(args.Argv(), pipe_fd[0]); + GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[1])); + set_child_pid(child_pid); + set_read_fd(pipe_fd[0]); + set_spawned(true); + return OVERSEE_TEST; +} + +# endif // !GTEST_OS_WINDOWS + +// Creates a concrete DeathTest-derived class that depends on the +// --gtest_death_test_style flag, and sets the pointer pointed to +// by the "test" argument to its address. If the test should be +// skipped, sets that pointer to NULL. Returns true, unless the +// flag is set to an invalid value. +bool DefaultDeathTestFactory::Create(const char* statement, const RE* regex, + const char* file, int line, + DeathTest** test) { + UnitTestImpl* const impl = GetUnitTestImpl(); + const InternalRunDeathTestFlag* const flag = + impl->internal_run_death_test_flag(); + const int death_test_index = impl->current_test_info() + ->increment_death_test_count(); + + if (flag != NULL) { + if (death_test_index > flag->index()) { + DeathTest::set_last_death_test_message( + "Death test count (" + StreamableToString(death_test_index) + + ") somehow exceeded expected maximum (" + + StreamableToString(flag->index()) + ")"); + return false; + } + + if (!(flag->file() == file && flag->line() == line && + flag->index() == death_test_index)) { + *test = NULL; + return true; + } + } + +# if GTEST_OS_WINDOWS + + if (GTEST_FLAG(death_test_style) == "threadsafe" || + GTEST_FLAG(death_test_style) == "fast") { + *test = new WindowsDeathTest(statement, regex, file, line); + } + +# else + + if (GTEST_FLAG(death_test_style) == "threadsafe") { + *test = new ExecDeathTest(statement, regex, file, line); + } else if (GTEST_FLAG(death_test_style) == "fast") { + *test = new NoExecDeathTest(statement, regex); + } + +# endif // GTEST_OS_WINDOWS + + else { // NOLINT - this is more readable than unbalanced brackets inside #if. + DeathTest::set_last_death_test_message( + "Unknown death test style \"" + GTEST_FLAG(death_test_style) + + "\" encountered"); + return false; + } + + return true; +} + +// Splits a given string on a given delimiter, populating a given +// vector with the fields. GTEST_HAS_DEATH_TEST implies that we have +// ::std::string, so we can use it here. +static void SplitString(const ::std::string& str, char delimiter, + ::std::vector< ::std::string>* dest) { + ::std::vector< ::std::string> parsed; + ::std::string::size_type pos = 0; + while (::testing::internal::AlwaysTrue()) { + const ::std::string::size_type colon = str.find(delimiter, pos); + if (colon == ::std::string::npos) { + parsed.push_back(str.substr(pos)); + break; + } else { + parsed.push_back(str.substr(pos, colon - pos)); + pos = colon + 1; + } + } + dest->swap(parsed); +} + +# if GTEST_OS_WINDOWS +// Recreates the pipe and event handles from the provided parameters, +// signals the event, and returns a file descriptor wrapped around the pipe +// handle. This function is called in the child process only. +int GetStatusFileDescriptor(unsigned int parent_process_id, + size_t write_handle_as_size_t, + size_t event_handle_as_size_t) { + AutoHandle parent_process_handle(::OpenProcess(PROCESS_DUP_HANDLE, + FALSE, // Non-inheritable. + parent_process_id)); + if (parent_process_handle.Get() == INVALID_HANDLE_VALUE) { + DeathTestAbort("Unable to open parent process " + + StreamableToString(parent_process_id)); + } + + // TODO(vladl@google.com): Replace the following check with a + // compile-time assertion when available. + GTEST_CHECK_(sizeof(HANDLE) <= sizeof(size_t)); + + const HANDLE write_handle = + reinterpret_cast(write_handle_as_size_t); + HANDLE dup_write_handle; + + // The newly initialized handle is accessible only in in the parent + // process. To obtain one accessible within the child, we need to use + // DuplicateHandle. + if (!::DuplicateHandle(parent_process_handle.Get(), write_handle, + ::GetCurrentProcess(), &dup_write_handle, + 0x0, // Requested privileges ignored since + // DUPLICATE_SAME_ACCESS is used. + FALSE, // Request non-inheritable handler. + DUPLICATE_SAME_ACCESS)) { + DeathTestAbort("Unable to duplicate the pipe handle " + + StreamableToString(write_handle_as_size_t) + + " from the parent process " + + StreamableToString(parent_process_id)); + } + + const HANDLE event_handle = reinterpret_cast(event_handle_as_size_t); + HANDLE dup_event_handle; + + if (!::DuplicateHandle(parent_process_handle.Get(), event_handle, + ::GetCurrentProcess(), &dup_event_handle, + 0x0, + FALSE, + DUPLICATE_SAME_ACCESS)) { + DeathTestAbort("Unable to duplicate the event handle " + + StreamableToString(event_handle_as_size_t) + + " from the parent process " + + StreamableToString(parent_process_id)); + } + + const int write_fd = + ::_open_osfhandle(reinterpret_cast(dup_write_handle), O_APPEND); + if (write_fd == -1) { + DeathTestAbort("Unable to convert pipe handle " + + StreamableToString(write_handle_as_size_t) + + " to a file descriptor"); + } + + // Signals the parent that the write end of the pipe has been acquired + // so the parent can release its own write end. + ::SetEvent(dup_event_handle); + + return write_fd; +} +# endif // GTEST_OS_WINDOWS + +// Returns a newly created InternalRunDeathTestFlag object with fields +// initialized from the GTEST_FLAG(internal_run_death_test) flag if +// the flag is specified; otherwise returns NULL. +InternalRunDeathTestFlag* ParseInternalRunDeathTestFlag() { + if (GTEST_FLAG(internal_run_death_test) == "") return NULL; + + // GTEST_HAS_DEATH_TEST implies that we have ::std::string, so we + // can use it here. + int line = -1; + int index = -1; + ::std::vector< ::std::string> fields; + SplitString(GTEST_FLAG(internal_run_death_test).c_str(), '|', &fields); + int write_fd = -1; + +# if GTEST_OS_WINDOWS + + unsigned int parent_process_id = 0; + size_t write_handle_as_size_t = 0; + size_t event_handle_as_size_t = 0; + + if (fields.size() != 6 + || !ParseNaturalNumber(fields[1], &line) + || !ParseNaturalNumber(fields[2], &index) + || !ParseNaturalNumber(fields[3], &parent_process_id) + || !ParseNaturalNumber(fields[4], &write_handle_as_size_t) + || !ParseNaturalNumber(fields[5], &event_handle_as_size_t)) { + DeathTestAbort("Bad --gtest_internal_run_death_test flag: " + + GTEST_FLAG(internal_run_death_test)); + } + write_fd = GetStatusFileDescriptor(parent_process_id, + write_handle_as_size_t, + event_handle_as_size_t); +# else + + if (fields.size() != 4 + || !ParseNaturalNumber(fields[1], &line) + || !ParseNaturalNumber(fields[2], &index) + || !ParseNaturalNumber(fields[3], &write_fd)) { + DeathTestAbort("Bad --gtest_internal_run_death_test flag: " + + GTEST_FLAG(internal_run_death_test)); + } + +# endif // GTEST_OS_WINDOWS + + return new InternalRunDeathTestFlag(fields[0], line, index, write_fd); +} + +} // namespace internal + +#endif // GTEST_HAS_DEATH_TEST + +} // namespace testing +// Copyright 2008, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Authors: keith.ray@gmail.com (Keith Ray) + + +#include + +#if GTEST_OS_WINDOWS_MOBILE +# include +#elif GTEST_OS_WINDOWS +# include +# include +#elif GTEST_OS_SYMBIAN +// Symbian OpenC has PATH_MAX in sys/syslimits.h +# include +#else +# include +# include // Some Linux distributions define PATH_MAX here. +#endif // GTEST_OS_WINDOWS_MOBILE + +#if GTEST_OS_WINDOWS +# define GTEST_PATH_MAX_ _MAX_PATH +#elif defined(PATH_MAX) +# define GTEST_PATH_MAX_ PATH_MAX +#elif defined(_XOPEN_PATH_MAX) +# define GTEST_PATH_MAX_ _XOPEN_PATH_MAX +#else +# define GTEST_PATH_MAX_ _POSIX_PATH_MAX +#endif // GTEST_OS_WINDOWS + + +namespace testing { +namespace internal { + +#if GTEST_OS_WINDOWS +// On Windows, '\\' is the standard path separator, but many tools and the +// Windows API also accept '/' as an alternate path separator. Unless otherwise +// noted, a file path can contain either kind of path separators, or a mixture +// of them. +const char kPathSeparator = '\\'; +const char kAlternatePathSeparator = '/'; +const char kPathSeparatorString[] = "\\"; +const char kAlternatePathSeparatorString[] = "/"; +# if GTEST_OS_WINDOWS_MOBILE +// Windows CE doesn't have a current directory. You should not use +// the current directory in tests on Windows CE, but this at least +// provides a reasonable fallback. +const char kCurrentDirectoryString[] = "\\"; +// Windows CE doesn't define INVALID_FILE_ATTRIBUTES +const DWORD kInvalidFileAttributes = 0xffffffff; +# else +const char kCurrentDirectoryString[] = ".\\"; +# endif // GTEST_OS_WINDOWS_MOBILE +#else +const char kPathSeparator = '/'; +const char kPathSeparatorString[] = "/"; +const char kCurrentDirectoryString[] = "./"; +#endif // GTEST_OS_WINDOWS + +// Returns whether the given character is a valid path separator. +static bool IsPathSeparator(char c) { +#if GTEST_HAS_ALT_PATH_SEP_ + return (c == kPathSeparator) || (c == kAlternatePathSeparator); +#else + return c == kPathSeparator; +#endif +} + +// Returns the current working directory, or "" if unsuccessful. +FilePath FilePath::GetCurrentDir() { +#if GTEST_OS_WINDOWS_MOBILE + // Windows CE doesn't have a current directory, so we just return + // something reasonable. + return FilePath(kCurrentDirectoryString); +#elif GTEST_OS_WINDOWS + char cwd[GTEST_PATH_MAX_ + 1] = { '\0' }; + return FilePath(_getcwd(cwd, sizeof(cwd)) == NULL ? "" : cwd); +#else + char cwd[GTEST_PATH_MAX_ + 1] = { '\0' }; + return FilePath(getcwd(cwd, sizeof(cwd)) == NULL ? "" : cwd); +#endif // GTEST_OS_WINDOWS_MOBILE +} + +// Returns a copy of the FilePath with the case-insensitive extension removed. +// Example: FilePath("dir/file.exe").RemoveExtension("EXE") returns +// FilePath("dir/file"). If a case-insensitive extension is not +// found, returns a copy of the original FilePath. +FilePath FilePath::RemoveExtension(const char* extension) const { + const std::string dot_extension = std::string(".") + extension; + if (String::EndsWithCaseInsensitive(pathname_, dot_extension)) { + return FilePath(pathname_.substr( + 0, pathname_.length() - dot_extension.length())); + } + return *this; +} + +// Returns a pointer to the last occurence of a valid path separator in +// the FilePath. On Windows, for example, both '/' and '\' are valid path +// separators. Returns NULL if no path separator was found. +const char* FilePath::FindLastPathSeparator() const { + const char* const last_sep = strrchr(c_str(), kPathSeparator); +#if GTEST_HAS_ALT_PATH_SEP_ + const char* const last_alt_sep = strrchr(c_str(), kAlternatePathSeparator); + // Comparing two pointers of which only one is NULL is undefined. + if (last_alt_sep != NULL && + (last_sep == NULL || last_alt_sep > last_sep)) { + return last_alt_sep; + } +#endif + return last_sep; +} + +// Returns a copy of the FilePath with the directory part removed. +// Example: FilePath("path/to/file").RemoveDirectoryName() returns +// FilePath("file"). If there is no directory part ("just_a_file"), it returns +// the FilePath unmodified. If there is no file part ("just_a_dir/") it +// returns an empty FilePath (""). +// On Windows platform, '\' is the path separator, otherwise it is '/'. +FilePath FilePath::RemoveDirectoryName() const { + const char* const last_sep = FindLastPathSeparator(); + return last_sep ? FilePath(last_sep + 1) : *this; +} + +// RemoveFileName returns the directory path with the filename removed. +// Example: FilePath("path/to/file").RemoveFileName() returns "path/to/". +// If the FilePath is "a_file" or "/a_file", RemoveFileName returns +// FilePath("./") or, on Windows, FilePath(".\\"). If the filepath does +// not have a file, like "just/a/dir/", it returns the FilePath unmodified. +// On Windows platform, '\' is the path separator, otherwise it is '/'. +FilePath FilePath::RemoveFileName() const { + const char* const last_sep = FindLastPathSeparator(); + std::string dir; + if (last_sep) { + dir = std::string(c_str(), last_sep + 1 - c_str()); + } else { + dir = kCurrentDirectoryString; + } + return FilePath(dir); +} + +// Helper functions for naming files in a directory for xml output. + +// Given directory = "dir", base_name = "test", number = 0, +// extension = "xml", returns "dir/test.xml". If number is greater +// than zero (e.g., 12), returns "dir/test_12.xml". +// On Windows platform, uses \ as the separator rather than /. +FilePath FilePath::MakeFileName(const FilePath& directory, + const FilePath& base_name, + int number, + const char* extension) { + std::string file; + if (number == 0) { + file = base_name.string() + "." + extension; + } else { + file = base_name.string() + "_" + StreamableToString(number) + + "." + extension; + } + return ConcatPaths(directory, FilePath(file)); +} + +// Given directory = "dir", relative_path = "test.xml", returns "dir/test.xml". +// On Windows, uses \ as the separator rather than /. +FilePath FilePath::ConcatPaths(const FilePath& directory, + const FilePath& relative_path) { + if (directory.IsEmpty()) + return relative_path; + const FilePath dir(directory.RemoveTrailingPathSeparator()); + return FilePath(dir.string() + kPathSeparator + relative_path.string()); +} + +// Returns true if pathname describes something findable in the file-system, +// either a file, directory, or whatever. +bool FilePath::FileOrDirectoryExists() const { +#if GTEST_OS_WINDOWS_MOBILE + LPCWSTR unicode = String::AnsiToUtf16(pathname_.c_str()); + const DWORD attributes = GetFileAttributes(unicode); + delete [] unicode; + return attributes != kInvalidFileAttributes; +#else + posix::StatStruct file_stat; + return posix::Stat(pathname_.c_str(), &file_stat) == 0; +#endif // GTEST_OS_WINDOWS_MOBILE +} + +// Returns true if pathname describes a directory in the file-system +// that exists. +bool FilePath::DirectoryExists() const { + bool result = false; +#if GTEST_OS_WINDOWS + // Don't strip off trailing separator if path is a root directory on + // Windows (like "C:\\"). + const FilePath& path(IsRootDirectory() ? *this : + RemoveTrailingPathSeparator()); +#else + const FilePath& path(*this); +#endif + +#if GTEST_OS_WINDOWS_MOBILE + LPCWSTR unicode = String::AnsiToUtf16(path.c_str()); + const DWORD attributes = GetFileAttributes(unicode); + delete [] unicode; + if ((attributes != kInvalidFileAttributes) && + (attributes & FILE_ATTRIBUTE_DIRECTORY)) { + result = true; + } +#else + posix::StatStruct file_stat; + result = posix::Stat(path.c_str(), &file_stat) == 0 && + posix::IsDir(file_stat); +#endif // GTEST_OS_WINDOWS_MOBILE + + return result; +} + +// Returns true if pathname describes a root directory. (Windows has one +// root directory per disk drive.) +bool FilePath::IsRootDirectory() const { +#if GTEST_OS_WINDOWS + // TODO(wan@google.com): on Windows a network share like + // \\server\share can be a root directory, although it cannot be the + // current directory. Handle this properly. + return pathname_.length() == 3 && IsAbsolutePath(); +#else + return pathname_.length() == 1 && IsPathSeparator(pathname_.c_str()[0]); +#endif +} + +// Returns true if pathname describes an absolute path. +bool FilePath::IsAbsolutePath() const { + const char* const name = pathname_.c_str(); +#if GTEST_OS_WINDOWS + return pathname_.length() >= 3 && + ((name[0] >= 'a' && name[0] <= 'z') || + (name[0] >= 'A' && name[0] <= 'Z')) && + name[1] == ':' && + IsPathSeparator(name[2]); +#else + return IsPathSeparator(name[0]); +#endif +} + +// Returns a pathname for a file that does not currently exist. The pathname +// will be directory/base_name.extension or +// directory/base_name_.extension if directory/base_name.extension +// already exists. The number will be incremented until a pathname is found +// that does not already exist. +// Examples: 'dir/foo_test.xml' or 'dir/foo_test_1.xml'. +// There could be a race condition if two or more processes are calling this +// function at the same time -- they could both pick the same filename. +FilePath FilePath::GenerateUniqueFileName(const FilePath& directory, + const FilePath& base_name, + const char* extension) { + FilePath full_pathname; + int number = 0; + do { + full_pathname.Set(MakeFileName(directory, base_name, number++, extension)); + } while (full_pathname.FileOrDirectoryExists()); + return full_pathname; +} + +// Returns true if FilePath ends with a path separator, which indicates that +// it is intended to represent a directory. Returns false otherwise. +// This does NOT check that a directory (or file) actually exists. +bool FilePath::IsDirectory() const { + return !pathname_.empty() && + IsPathSeparator(pathname_.c_str()[pathname_.length() - 1]); +} + +// Create directories so that path exists. Returns true if successful or if +// the directories already exist; returns false if unable to create directories +// for any reason. +bool FilePath::CreateDirectoriesRecursively() const { + if (!this->IsDirectory()) { + return false; + } + + if (pathname_.length() == 0 || this->DirectoryExists()) { + return true; + } + + const FilePath parent(this->RemoveTrailingPathSeparator().RemoveFileName()); + return parent.CreateDirectoriesRecursively() && this->CreateFolder(); +} + +// Create the directory so that path exists. Returns true if successful or +// if the directory already exists; returns false if unable to create the +// directory for any reason, including if the parent directory does not +// exist. Not named "CreateDirectory" because that's a macro on Windows. +bool FilePath::CreateFolder() const { +#if GTEST_OS_WINDOWS_MOBILE + FilePath removed_sep(this->RemoveTrailingPathSeparator()); + LPCWSTR unicode = String::AnsiToUtf16(removed_sep.c_str()); + int result = CreateDirectory(unicode, NULL) ? 0 : -1; + delete [] unicode; +#elif GTEST_OS_WINDOWS + int result = _mkdir(pathname_.c_str()); +#else + int result = mkdir(pathname_.c_str(), 0777); +#endif // GTEST_OS_WINDOWS_MOBILE + + if (result == -1) { + return this->DirectoryExists(); // An error is OK if the directory exists. + } + return true; // No error. +} + +// If input name has a trailing separator character, remove it and return the +// name, otherwise return the name string unmodified. +// On Windows platform, uses \ as the separator, other platforms use /. +FilePath FilePath::RemoveTrailingPathSeparator() const { + return IsDirectory() + ? FilePath(pathname_.substr(0, pathname_.length() - 1)) + : *this; +} + +// Removes any redundant separators that might be in the pathname. +// For example, "bar///foo" becomes "bar/foo". Does not eliminate other +// redundancies that might be in a pathname involving "." or "..". +// TODO(wan@google.com): handle Windows network shares (e.g. \\server\share). +void FilePath::Normalize() { + if (pathname_.c_str() == NULL) { + pathname_ = ""; + return; + } + const char* src = pathname_.c_str(); + char* const dest = new char[pathname_.length() + 1]; + char* dest_ptr = dest; + memset(dest_ptr, 0, pathname_.length() + 1); + + while (*src != '\0') { + *dest_ptr = *src; + if (!IsPathSeparator(*src)) { + src++; + } else { +#if GTEST_HAS_ALT_PATH_SEP_ + if (*dest_ptr == kAlternatePathSeparator) { + *dest_ptr = kPathSeparator; + } +#endif + while (IsPathSeparator(*src)) + src++; + } + dest_ptr++; + } + *dest_ptr = '\0'; + pathname_ = dest; + delete[] dest; +} + +} // namespace internal +} // namespace testing +// Copyright 2008, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Author: wan@google.com (Zhanyong Wan) + + +#include +#include +#include +#include + +#if GTEST_OS_WINDOWS_MOBILE +# include // For TerminateProcess() +#elif GTEST_OS_WINDOWS +# include +# include +#else +# include +#endif // GTEST_OS_WINDOWS_MOBILE + +#if GTEST_OS_MAC +# include +# include +# include +#endif // GTEST_OS_MAC + +#if GTEST_OS_QNX +# include +# include +#endif // GTEST_OS_QNX + + +// Indicates that this translation unit is part of Google Test's +// implementation. It must come before gtest-internal-inl.h is +// included, or there will be a compiler error. This trick is to +// prevent a user from accidentally including gtest-internal-inl.h in +// his code. +#define GTEST_IMPLEMENTATION_ 1 +#undef GTEST_IMPLEMENTATION_ + +namespace testing { +namespace internal { + +#if defined(_MSC_VER) || defined(__BORLANDC__) +// MSVC and C++Builder do not provide a definition of STDERR_FILENO. +const int kStdOutFileno = 1; +const int kStdErrFileno = 2; +#else +const int kStdOutFileno = STDOUT_FILENO; +const int kStdErrFileno = STDERR_FILENO; +#endif // _MSC_VER + +#if GTEST_OS_MAC + +// Returns the number of threads running in the process, or 0 to indicate that +// we cannot detect it. +size_t GetThreadCount() { + const task_t task = mach_task_self(); + mach_msg_type_number_t thread_count; + thread_act_array_t thread_list; + const kern_return_t status = task_threads(task, &thread_list, &thread_count); + if (status == KERN_SUCCESS) { + // task_threads allocates resources in thread_list and we need to free them + // to avoid leaks. + vm_deallocate(task, + reinterpret_cast(thread_list), + sizeof(thread_t) * thread_count); + return static_cast(thread_count); + } else { + return 0; + } +} + +#elif GTEST_OS_QNX + +// Returns the number of threads running in the process, or 0 to indicate that +// we cannot detect it. +size_t GetThreadCount() { + const int fd = open("/proc/self/as", O_RDONLY); + if (fd < 0) { + return 0; + } + procfs_info process_info; + const int status = + devctl(fd, DCMD_PROC_INFO, &process_info, sizeof(process_info), NULL); + close(fd); + if (status == EOK) { + return static_cast(process_info.num_threads); + } else { + return 0; + } +} + +#else + +size_t GetThreadCount() { + // There's no portable way to detect the number of threads, so we just + // return 0 to indicate that we cannot detect it. + return 0; +} + +#endif // GTEST_OS_MAC + +#if GTEST_USES_POSIX_RE + +// Implements RE. Currently only needed for death tests. + +RE::~RE() { + if (is_valid_) { + // regfree'ing an invalid regex might crash because the content + // of the regex is undefined. Since the regex's are essentially + // the same, one cannot be valid (or invalid) without the other + // being so too. + regfree(&partial_regex_); + regfree(&full_regex_); + } + free(const_cast(pattern_)); +} + +// Returns true iff regular expression re matches the entire str. +bool RE::FullMatch(const char* str, const RE& re) { + if (!re.is_valid_) return false; + + regmatch_t match; + return regexec(&re.full_regex_, str, 1, &match, 0) == 0; +} + +// Returns true iff regular expression re matches a substring of str +// (including str itself). +bool RE::PartialMatch(const char* str, const RE& re) { + if (!re.is_valid_) return false; + + regmatch_t match; + return regexec(&re.partial_regex_, str, 1, &match, 0) == 0; +} + +// Initializes an RE from its string representation. +void RE::Init(const char* regex) { + pattern_ = posix::StrDup(regex); + + // Reserves enough bytes to hold the regular expression used for a + // full match. + const size_t full_regex_len = strlen(regex) + 10; + char* const full_pattern = new char[full_regex_len]; + + snprintf(full_pattern, full_regex_len, "^(%s)$", regex); + is_valid_ = regcomp(&full_regex_, full_pattern, REG_EXTENDED) == 0; + // We want to call regcomp(&partial_regex_, ...) even if the + // previous expression returns false. Otherwise partial_regex_ may + // not be properly initialized can may cause trouble when it's + // freed. + // + // Some implementation of POSIX regex (e.g. on at least some + // versions of Cygwin) doesn't accept the empty string as a valid + // regex. We change it to an equivalent form "()" to be safe. + if (is_valid_) { + const char* const partial_regex = (*regex == '\0') ? "()" : regex; + is_valid_ = regcomp(&partial_regex_, partial_regex, REG_EXTENDED) == 0; + } + EXPECT_TRUE(is_valid_) + << "Regular expression \"" << regex + << "\" is not a valid POSIX Extended regular expression."; + + delete[] full_pattern; +} + +#elif GTEST_USES_SIMPLE_RE + +// Returns true iff ch appears anywhere in str (excluding the +// terminating '\0' character). +bool IsInSet(char ch, const char* str) { + return ch != '\0' && strchr(str, ch) != NULL; +} + +// Returns true iff ch belongs to the given classification. Unlike +// similar functions in , these aren't affected by the +// current locale. +bool IsAsciiDigit(char ch) { return '0' <= ch && ch <= '9'; } +bool IsAsciiPunct(char ch) { + return IsInSet(ch, "^-!\"#$%&'()*+,./:;<=>?@[\\]_`{|}~"); +} +bool IsRepeat(char ch) { return IsInSet(ch, "?*+"); } +bool IsAsciiWhiteSpace(char ch) { return IsInSet(ch, " \f\n\r\t\v"); } +bool IsAsciiWordChar(char ch) { + return ('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z') || + ('0' <= ch && ch <= '9') || ch == '_'; +} + +// Returns true iff "\\c" is a supported escape sequence. +bool IsValidEscape(char c) { + return (IsAsciiPunct(c) || IsInSet(c, "dDfnrsStvwW")); +} + +// Returns true iff the given atom (specified by escaped and pattern) +// matches ch. The result is undefined if the atom is invalid. +bool AtomMatchesChar(bool escaped, char pattern_char, char ch) { + if (escaped) { // "\\p" where p is pattern_char. + switch (pattern_char) { + case 'd': return IsAsciiDigit(ch); + case 'D': return !IsAsciiDigit(ch); + case 'f': return ch == '\f'; + case 'n': return ch == '\n'; + case 'r': return ch == '\r'; + case 's': return IsAsciiWhiteSpace(ch); + case 'S': return !IsAsciiWhiteSpace(ch); + case 't': return ch == '\t'; + case 'v': return ch == '\v'; + case 'w': return IsAsciiWordChar(ch); + case 'W': return !IsAsciiWordChar(ch); + } + return IsAsciiPunct(pattern_char) && pattern_char == ch; + } + + return (pattern_char == '.' && ch != '\n') || pattern_char == ch; +} + +// Helper function used by ValidateRegex() to format error messages. +std::string FormatRegexSyntaxError(const char* regex, int index) { + return (Message() << "Syntax error at index " << index + << " in simple regular expression \"" << regex << "\": ").GetString(); +} + +// Generates non-fatal failures and returns false if regex is invalid; +// otherwise returns true. +bool ValidateRegex(const char* regex) { + if (regex == NULL) { + // TODO(wan@google.com): fix the source file location in the + // assertion failures to match where the regex is used in user + // code. + ADD_FAILURE() << "NULL is not a valid simple regular expression."; + return false; + } + + bool is_valid = true; + + // True iff ?, *, or + can follow the previous atom. + bool prev_repeatable = false; + for (int i = 0; regex[i]; i++) { + if (regex[i] == '\\') { // An escape sequence + i++; + if (regex[i] == '\0') { + ADD_FAILURE() << FormatRegexSyntaxError(regex, i - 1) + << "'\\' cannot appear at the end."; + return false; + } + + if (!IsValidEscape(regex[i])) { + ADD_FAILURE() << FormatRegexSyntaxError(regex, i - 1) + << "invalid escape sequence \"\\" << regex[i] << "\"."; + is_valid = false; + } + prev_repeatable = true; + } else { // Not an escape sequence. + const char ch = regex[i]; + + if (ch == '^' && i > 0) { + ADD_FAILURE() << FormatRegexSyntaxError(regex, i) + << "'^' can only appear at the beginning."; + is_valid = false; + } else if (ch == '$' && regex[i + 1] != '\0') { + ADD_FAILURE() << FormatRegexSyntaxError(regex, i) + << "'$' can only appear at the end."; + is_valid = false; + } else if (IsInSet(ch, "()[]{}|")) { + ADD_FAILURE() << FormatRegexSyntaxError(regex, i) + << "'" << ch << "' is unsupported."; + is_valid = false; + } else if (IsRepeat(ch) && !prev_repeatable) { + ADD_FAILURE() << FormatRegexSyntaxError(regex, i) + << "'" << ch << "' can only follow a repeatable token."; + is_valid = false; + } + + prev_repeatable = !IsInSet(ch, "^$?*+"); + } + } + + return is_valid; +} + +// Matches a repeated regex atom followed by a valid simple regular +// expression. The regex atom is defined as c if escaped is false, +// or \c otherwise. repeat is the repetition meta character (?, *, +// or +). The behavior is undefined if str contains too many +// characters to be indexable by size_t, in which case the test will +// probably time out anyway. We are fine with this limitation as +// std::string has it too. +bool MatchRepetitionAndRegexAtHead( + bool escaped, char c, char repeat, const char* regex, + const char* str) { + const size_t min_count = (repeat == '+') ? 1 : 0; + const size_t max_count = (repeat == '?') ? 1 : + static_cast(-1) - 1; + // We cannot call numeric_limits::max() as it conflicts with the + // max() macro on Windows. + + for (size_t i = 0; i <= max_count; ++i) { + // We know that the atom matches each of the first i characters in str. + if (i >= min_count && MatchRegexAtHead(regex, str + i)) { + // We have enough matches at the head, and the tail matches too. + // Since we only care about *whether* the pattern matches str + // (as opposed to *how* it matches), there is no need to find a + // greedy match. + return true; + } + if (str[i] == '\0' || !AtomMatchesChar(escaped, c, str[i])) + return false; + } + return false; +} + +// Returns true iff regex matches a prefix of str. regex must be a +// valid simple regular expression and not start with "^", or the +// result is undefined. +bool MatchRegexAtHead(const char* regex, const char* str) { + if (*regex == '\0') // An empty regex matches a prefix of anything. + return true; + + // "$" only matches the end of a string. Note that regex being + // valid guarantees that there's nothing after "$" in it. + if (*regex == '$') + return *str == '\0'; + + // Is the first thing in regex an escape sequence? + const bool escaped = *regex == '\\'; + if (escaped) + ++regex; + if (IsRepeat(regex[1])) { + // MatchRepetitionAndRegexAtHead() calls MatchRegexAtHead(), so + // here's an indirect recursion. It terminates as the regex gets + // shorter in each recursion. + return MatchRepetitionAndRegexAtHead( + escaped, regex[0], regex[1], regex + 2, str); + } else { + // regex isn't empty, isn't "$", and doesn't start with a + // repetition. We match the first atom of regex with the first + // character of str and recurse. + return (*str != '\0') && AtomMatchesChar(escaped, *regex, *str) && + MatchRegexAtHead(regex + 1, str + 1); + } +} + +// Returns true iff regex matches any substring of str. regex must be +// a valid simple regular expression, or the result is undefined. +// +// The algorithm is recursive, but the recursion depth doesn't exceed +// the regex length, so we won't need to worry about running out of +// stack space normally. In rare cases the time complexity can be +// exponential with respect to the regex length + the string length, +// but usually it's must faster (often close to linear). +bool MatchRegexAnywhere(const char* regex, const char* str) { + if (regex == NULL || str == NULL) + return false; + + if (*regex == '^') + return MatchRegexAtHead(regex + 1, str); + + // A successful match can be anywhere in str. + do { + if (MatchRegexAtHead(regex, str)) + return true; + } while (*str++ != '\0'); + return false; +} + +// Implements the RE class. + +RE::~RE() { + free(const_cast(pattern_)); + free(const_cast(full_pattern_)); +} + +// Returns true iff regular expression re matches the entire str. +bool RE::FullMatch(const char* str, const RE& re) { + return re.is_valid_ && MatchRegexAnywhere(re.full_pattern_, str); +} + +// Returns true iff regular expression re matches a substring of str +// (including str itself). +bool RE::PartialMatch(const char* str, const RE& re) { + return re.is_valid_ && MatchRegexAnywhere(re.pattern_, str); +} + +// Initializes an RE from its string representation. +void RE::Init(const char* regex) { + pattern_ = full_pattern_ = NULL; + if (regex != NULL) { + pattern_ = posix::StrDup(regex); + } + + is_valid_ = ValidateRegex(regex); + if (!is_valid_) { + // No need to calculate the full pattern when the regex is invalid. + return; + } + + const size_t len = strlen(regex); + // Reserves enough bytes to hold the regular expression used for a + // full match: we need space to prepend a '^', append a '$', and + // terminate the string with '\0'. + char* buffer = static_cast(malloc(len + 3)); + full_pattern_ = buffer; + + if (*regex != '^') + *buffer++ = '^'; // Makes sure full_pattern_ starts with '^'. + + // We don't use snprintf or strncpy, as they trigger a warning when + // compiled with VC++ 8.0. + memcpy(buffer, regex, len); + buffer += len; + + if (len == 0 || regex[len - 1] != '$') + *buffer++ = '$'; // Makes sure full_pattern_ ends with '$'. + + *buffer = '\0'; +} + +#endif // GTEST_USES_POSIX_RE + +const char kUnknownFile[] = "unknown file"; + +// Formats a source file path and a line number as they would appear +// in an error message from the compiler used to compile this code. +GTEST_API_ ::std::string FormatFileLocation(const char* file, int line) { + const std::string file_name(file == NULL ? kUnknownFile : file); + + if (line < 0) { + return file_name + ":"; + } +#ifdef _MSC_VER + return file_name + "(" + StreamableToString(line) + "):"; +#else + return file_name + ":" + StreamableToString(line) + ":"; +#endif // _MSC_VER +} + +// Formats a file location for compiler-independent XML output. +// Although this function is not platform dependent, we put it next to +// FormatFileLocation in order to contrast the two functions. +// Note that FormatCompilerIndependentFileLocation() does NOT append colon +// to the file location it produces, unlike FormatFileLocation(). +GTEST_API_ ::std::string FormatCompilerIndependentFileLocation( + const char* file, int line) { + const std::string file_name(file == NULL ? kUnknownFile : file); + + if (line < 0) + return file_name; + else + return file_name + ":" + StreamableToString(line); +} + + +GTestLog::GTestLog(GTestLogSeverity severity, const char* file, int line) + : severity_(severity) { + const char* const marker = + severity == GTEST_INFO ? "[ INFO ]" : + severity == GTEST_WARNING ? "[WARNING]" : + severity == GTEST_ERROR ? "[ ERROR ]" : "[ FATAL ]"; + GetStream() << ::std::endl << marker << " " + << FormatFileLocation(file, line).c_str() << ": "; +} + +// Flushes the buffers and, if severity is GTEST_FATAL, aborts the program. +GTestLog::~GTestLog() { + GetStream() << ::std::endl; + if (severity_ == GTEST_FATAL) { + fflush(stderr); + posix::Abort(); + } +} +// Disable Microsoft deprecation warnings for POSIX functions called from +// this class (creat, dup, dup2, and close) +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4996) +#endif // _MSC_VER + +#if GTEST_HAS_STREAM_REDIRECTION + +// Object that captures an output stream (stdout/stderr). +class CapturedStream { + public: + // The ctor redirects the stream to a temporary file. + explicit CapturedStream(int fd) : fd_(fd), uncaptured_fd_(dup(fd)) { +# if GTEST_OS_WINDOWS + char temp_dir_path[MAX_PATH + 1] = { '\0' }; // NOLINT + char temp_file_path[MAX_PATH + 1] = { '\0' }; // NOLINT + + ::GetTempPathA(sizeof(temp_dir_path), temp_dir_path); + const UINT success = ::GetTempFileNameA(temp_dir_path, + "gtest_redir", + 0, // Generate unique file name. + temp_file_path); + GTEST_CHECK_(success != 0) + << "Unable to create a temporary file in " << temp_dir_path; + const int captured_fd = creat(temp_file_path, _S_IREAD | _S_IWRITE); + GTEST_CHECK_(captured_fd != -1) << "Unable to open temporary file " + << temp_file_path; + filename_ = temp_file_path; +# else + // There's no guarantee that a test has write access to the current + // directory, so we create the temporary file in the /tmp directory + // instead. We use /tmp on most systems, and /sdcard on Android. + // That's because Android doesn't have /tmp. +# if GTEST_OS_LINUX_ANDROID + // Note: Android applications are expected to call the framework's + // Context.getExternalStorageDirectory() method through JNI to get + // the location of the world-writable SD Card directory. However, + // this requires a Context handle, which cannot be retrieved + // globally from native code. Doing so also precludes running the + // code as part of a regular standalone executable, which doesn't + // run in a Dalvik process (e.g. when running it through 'adb shell'). + // + // The location /sdcard is directly accessible from native code + // and is the only location (unofficially) supported by the Android + // team. It's generally a symlink to the real SD Card mount point + // which can be /mnt/sdcard, /mnt/sdcard0, /system/media/sdcard, or + // other OEM-customized locations. Never rely on these, and always + // use /sdcard. + char name_template[] = "/sdcard/gtest_captured_stream.XXXXXX"; +# else + char name_template[] = "/tmp/captured_stream.XXXXXX"; +# endif // GTEST_OS_LINUX_ANDROID + const int captured_fd = mkstemp(name_template); + filename_ = name_template; +# endif // GTEST_OS_WINDOWS + fflush(NULL); + dup2(captured_fd, fd_); + close(captured_fd); + } + + ~CapturedStream() { + remove(filename_.c_str()); + } + + std::string GetCapturedString() { + if (uncaptured_fd_ != -1) { + // Restores the original stream. + fflush(NULL); + dup2(uncaptured_fd_, fd_); + close(uncaptured_fd_); + uncaptured_fd_ = -1; + } + + FILE* const file = posix::FOpen(filename_.c_str(), "r"); + const std::string content = ReadEntireFile(file); + posix::FClose(file); + return content; + } + + private: + // Reads the entire content of a file as an std::string. + static std::string ReadEntireFile(FILE* file); + + // Returns the size (in bytes) of a file. + static size_t GetFileSize(FILE* file); + + const int fd_; // A stream to capture. + int uncaptured_fd_; + // Name of the temporary file holding the stderr output. + ::std::string filename_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(CapturedStream); +}; + +// Returns the size (in bytes) of a file. +size_t CapturedStream::GetFileSize(FILE* file) { + fseek(file, 0, SEEK_END); + return static_cast(ftell(file)); +} + +// Reads the entire content of a file as a string. +std::string CapturedStream::ReadEntireFile(FILE* file) { + const size_t file_size = GetFileSize(file); + char* const buffer = new char[file_size]; + + size_t bytes_last_read = 0; // # of bytes read in the last fread() + size_t bytes_read = 0; // # of bytes read so far + + fseek(file, 0, SEEK_SET); + + // Keeps reading the file until we cannot read further or the + // pre-determined file size is reached. + do { + bytes_last_read = fread(buffer+bytes_read, 1, file_size-bytes_read, file); + bytes_read += bytes_last_read; + } while (bytes_last_read > 0 && bytes_read < file_size); + + const std::string content(buffer, bytes_read); + delete[] buffer; + + return content; +} + +# ifdef _MSC_VER +# pragma warning(pop) +# endif // _MSC_VER + +static CapturedStream* g_captured_stderr = NULL; +static CapturedStream* g_captured_stdout = NULL; + +// Starts capturing an output stream (stdout/stderr). +void CaptureStream(int fd, const char* stream_name, CapturedStream** stream) { + if (*stream != NULL) { + GTEST_LOG_(FATAL) << "Only one " << stream_name + << " capturer can exist at a time."; + } + *stream = new CapturedStream(fd); +} + +// Stops capturing the output stream and returns the captured string. +std::string GetCapturedStream(CapturedStream** captured_stream) { + const std::string content = (*captured_stream)->GetCapturedString(); + + delete *captured_stream; + *captured_stream = NULL; + + return content; +} + +// Starts capturing stdout. +void CaptureStdout() { + CaptureStream(kStdOutFileno, "stdout", &g_captured_stdout); +} + +// Starts capturing stderr. +void CaptureStderr() { + CaptureStream(kStdErrFileno, "stderr", &g_captured_stderr); +} + +// Stops capturing stdout and returns the captured string. +std::string GetCapturedStdout() { + return GetCapturedStream(&g_captured_stdout); +} + +// Stops capturing stderr and returns the captured string. +std::string GetCapturedStderr() { + return GetCapturedStream(&g_captured_stderr); +} + +#endif // GTEST_HAS_STREAM_REDIRECTION + +#if GTEST_HAS_DEATH_TEST + +// A copy of all command line arguments. Set by InitGoogleTest(). +::std::vector g_argvs; + +static const ::std::vector* g_injected_test_argvs = + NULL; // Owned. + +void SetInjectableArgvs(const ::std::vector* argvs) { + if (g_injected_test_argvs != argvs) + delete g_injected_test_argvs; + g_injected_test_argvs = argvs; +} + +const ::std::vector& GetInjectableArgvs() { + if (g_injected_test_argvs != NULL) { + return *g_injected_test_argvs; + } + return g_argvs; +} +#endif // GTEST_HAS_DEATH_TEST + +#if GTEST_OS_WINDOWS_MOBILE +namespace posix { +void Abort() { + DebugBreak(); + TerminateProcess(GetCurrentProcess(), 1); +} +} // namespace posix +#endif // GTEST_OS_WINDOWS_MOBILE + +// Returns the name of the environment variable corresponding to the +// given flag. For example, FlagToEnvVar("foo") will return +// "GTEST_FOO" in the open-source version. +static std::string FlagToEnvVar(const char* flag) { + const std::string full_flag = + (Message() << GTEST_FLAG_PREFIX_ << flag).GetString(); + + Message env_var; + for (size_t i = 0; i != full_flag.length(); i++) { + env_var << ToUpper(full_flag.c_str()[i]); + } + + return env_var.GetString(); +} + +// Parses 'str' for a 32-bit signed integer. If successful, writes +// the result to *value and returns true; otherwise leaves *value +// unchanged and returns false. +bool ParseInt32(const Message& src_text, const char* str, Int32* value) { + // Parses the environment variable as a decimal integer. + char* end = NULL; + const long long_value = strtol(str, &end, 10); // NOLINT + + // Has strtol() consumed all characters in the string? + if (*end != '\0') { + // No - an invalid character was encountered. + Message msg; + msg << "WARNING: " << src_text + << " is expected to be a 32-bit integer, but actually" + << " has value \"" << str << "\".\n"; + printf("%s", msg.GetString().c_str()); + fflush(stdout); + return false; + } + + // Is the parsed value in the range of an Int32? + const Int32 result = static_cast(long_value); + if (long_value == LONG_MAX || long_value == LONG_MIN || + // The parsed value overflows as a long. (strtol() returns + // LONG_MAX or LONG_MIN when the input overflows.) + result != long_value + // The parsed value overflows as an Int32. + ) { + Message msg; + msg << "WARNING: " << src_text + << " is expected to be a 32-bit integer, but actually" + << " has value " << str << ", which overflows.\n"; + printf("%s", msg.GetString().c_str()); + fflush(stdout); + return false; + } + + *value = result; + return true; +} + +// Reads and returns the Boolean environment variable corresponding to +// the given flag; if it's not set, returns default_value. +// +// The value is considered true iff it's not "0". +bool BoolFromGTestEnv(const char* flag, bool default_value) { + const std::string env_var = FlagToEnvVar(flag); + const char* const string_value = posix::GetEnv(env_var.c_str()); + return string_value == NULL ? + default_value : strcmp(string_value, "0") != 0; +} + +// Reads and returns a 32-bit integer stored in the environment +// variable corresponding to the given flag; if it isn't set or +// doesn't represent a valid 32-bit integer, returns default_value. +Int32 Int32FromGTestEnv(const char* flag, Int32 default_value) { + const std::string env_var = FlagToEnvVar(flag); + const char* const string_value = posix::GetEnv(env_var.c_str()); + if (string_value == NULL) { + // The environment variable is not set. + return default_value; + } + + Int32 result = default_value; + if (!ParseInt32(Message() << "Environment variable " << env_var, + string_value, &result)) { + printf("The default value %s is used.\n", + (Message() << default_value).GetString().c_str()); + fflush(stdout); + return default_value; + } + + return result; +} + +// Reads and returns the string environment variable corresponding to +// the given flag; if it's not set, returns default_value. +const char* StringFromGTestEnv(const char* flag, const char* default_value) { + const std::string env_var = FlagToEnvVar(flag); + const char* const value = posix::GetEnv(env_var.c_str()); + return value == NULL ? default_value : value; +} + +} // namespace internal +} // namespace testing +// Copyright 2007, 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. +// +// Author: wan@google.com (Zhanyong Wan) + +// Google Test - The Google C++ Testing Framework +// +// This file implements a universal value printer that can print a +// value of any type T: +// +// void ::testing::internal::UniversalPrinter::Print(value, ostream_ptr); +// +// It uses the << operator when possible, and prints the bytes in the +// object otherwise. A user can override its behavior for a class +// type Foo by defining either operator<<(::std::ostream&, const Foo&) +// or void PrintTo(const Foo&, ::std::ostream*) in the namespace that +// defines Foo. + +#include +#include +#include // NOLINT +#include + +namespace testing { + +namespace { + +using ::std::ostream; + +// Prints a segment of bytes in the given object. +void PrintByteSegmentInObjectTo(const unsigned char* obj_bytes, size_t start, + size_t count, ostream* os) { + char text[5] = ""; + for (size_t i = 0; i != count; i++) { + const size_t j = start + i; + if (i != 0) { + // Organizes the bytes into groups of 2 for easy parsing by + // human. + if ((j % 2) == 0) + *os << ' '; + else + *os << '-'; + } + GTEST_SNPRINTF_(text, sizeof(text), "%02X", obj_bytes[j]); + *os << text; + } +} + +// Prints the bytes in the given value to the given ostream. +void PrintBytesInObjectToImpl(const unsigned char* obj_bytes, size_t count, + ostream* os) { + // Tells the user how big the object is. + *os << count << "-byte object <"; + + const size_t kThreshold = 132; + const size_t kChunkSize = 64; + // If the object size is bigger than kThreshold, we'll have to omit + // some details by printing only the first and the last kChunkSize + // bytes. + // TODO(wan): let the user control the threshold using a flag. + if (count < kThreshold) { + PrintByteSegmentInObjectTo(obj_bytes, 0, count, os); + } else { + PrintByteSegmentInObjectTo(obj_bytes, 0, kChunkSize, os); + *os << " ... "; + // Rounds up to 2-byte boundary. + const size_t resume_pos = (count - kChunkSize + 1)/2*2; + PrintByteSegmentInObjectTo(obj_bytes, resume_pos, count - resume_pos, os); + } + *os << ">"; +} + +} // namespace + +namespace internal2 { + +// Delegates to PrintBytesInObjectToImpl() to print the bytes in the +// given object. The delegation simplifies the implementation, which +// uses the << operator and thus is easier done outside of the +// ::testing::internal namespace, which contains a << operator that +// sometimes conflicts with the one in STL. +void PrintBytesInObjectTo(const unsigned char* obj_bytes, size_t count, + ostream* os) { + PrintBytesInObjectToImpl(obj_bytes, count, os); +} + +} // namespace internal2 + +namespace internal { + +// Depending on the value of a char (or wchar_t), we print it in one +// of three formats: +// - as is if it's a printable ASCII (e.g. 'a', '2', ' '), +// - as a hexidecimal escape sequence (e.g. '\x7F'), or +// - as a special escape sequence (e.g. '\r', '\n'). +enum CharFormat { + kAsIs, + kHexEscape, + kSpecialEscape +}; + +// Returns true if c is a printable ASCII character. We test the +// value of c directly instead of calling isprint(), which is buggy on +// Windows Mobile. +inline bool IsPrintableAscii(wchar_t c) { + return 0x20 <= c && c <= 0x7E; +} + +// Prints a wide or narrow char c as a character literal without the +// quotes, escaping it when necessary; returns how c was formatted. +// The template argument UnsignedChar is the unsigned version of Char, +// which is the type of c. +template +static CharFormat PrintAsCharLiteralTo(Char c, ostream* os) { + switch (static_cast(c)) { + case L'\0': + *os << "\\0"; + break; + case L'\'': + *os << "\\'"; + break; + case L'\\': + *os << "\\\\"; + break; + case L'\a': + *os << "\\a"; + break; + case L'\b': + *os << "\\b"; + break; + case L'\f': + *os << "\\f"; + break; + case L'\n': + *os << "\\n"; + break; + case L'\r': + *os << "\\r"; + break; + case L'\t': + *os << "\\t"; + break; + case L'\v': + *os << "\\v"; + break; + default: + if (IsPrintableAscii(c)) { + *os << static_cast(c); + return kAsIs; + } else { + *os << "\\x" + String::FormatHexInt(static_cast(c)); + return kHexEscape; + } + } + return kSpecialEscape; +} + +// Prints a wchar_t c as if it's part of a string literal, escaping it when +// necessary; returns how c was formatted. +static CharFormat PrintAsStringLiteralTo(wchar_t c, ostream* os) { + switch (c) { + case L'\'': + *os << "'"; + return kAsIs; + case L'"': + *os << "\\\""; + return kSpecialEscape; + default: + return PrintAsCharLiteralTo(c, os); + } +} + +// Prints a char c as if it's part of a string literal, escaping it when +// necessary; returns how c was formatted. +static CharFormat PrintAsStringLiteralTo(char c, ostream* os) { + return PrintAsStringLiteralTo( + static_cast(static_cast(c)), os); +} + +// Prints a wide or narrow character c and its code. '\0' is printed +// as "'\\0'", other unprintable characters are also properly escaped +// using the standard C++ escape sequence. The template argument +// UnsignedChar is the unsigned version of Char, which is the type of c. +template +void PrintCharAndCodeTo(Char c, ostream* os) { + // First, print c as a literal in the most readable form we can find. + *os << ((sizeof(c) > 1) ? "L'" : "'"); + const CharFormat format = PrintAsCharLiteralTo(c, os); + *os << "'"; + + // To aid user debugging, we also print c's code in decimal, unless + // it's 0 (in which case c was printed as '\\0', making the code + // obvious). + if (c == 0) + return; + *os << " (" << static_cast(c); + + // For more convenience, we print c's code again in hexidecimal, + // unless c was already printed in the form '\x##' or the code is in + // [1, 9]. + if (format == kHexEscape || (1 <= c && c <= 9)) { + // Do nothing. + } else { + *os << ", 0x" << String::FormatHexInt(static_cast(c)); + } + *os << ")"; +} + +void PrintTo(unsigned char c, ::std::ostream* os) { + PrintCharAndCodeTo(c, os); +} +void PrintTo(signed char c, ::std::ostream* os) { + PrintCharAndCodeTo(c, os); +} + +// Prints a wchar_t as a symbol if it is printable or as its internal +// code otherwise and also as its code. L'\0' is printed as "L'\\0'". +void PrintTo(wchar_t wc, ostream* os) { + PrintCharAndCodeTo(wc, os); +} + +// Prints the given array of characters to the ostream. CharType must be either +// char or wchar_t. +// The array starts at begin, the length is len, it may include '\0' characters +// and may not be NUL-terminated. +template +static void PrintCharsAsStringTo( + const CharType* begin, size_t len, ostream* os) { + const char* const kQuoteBegin = sizeof(CharType) == 1 ? "\"" : "L\""; + *os << kQuoteBegin; + bool is_previous_hex = false; + for (size_t index = 0; index < len; ++index) { + const CharType cur = begin[index]; + if (is_previous_hex && IsXDigit(cur)) { + // Previous character is of '\x..' form and this character can be + // interpreted as another hexadecimal digit in its number. Break string to + // disambiguate. + *os << "\" " << kQuoteBegin; + } + is_previous_hex = PrintAsStringLiteralTo(cur, os) == kHexEscape; + } + *os << "\""; +} + +// Prints a (const) char/wchar_t array of 'len' elements, starting at address +// 'begin'. CharType must be either char or wchar_t. +template +static void UniversalPrintCharArray( + const CharType* begin, size_t len, ostream* os) { + // The code + // const char kFoo[] = "foo"; + // generates an array of 4, not 3, elements, with the last one being '\0'. + // + // Therefore when printing a char array, we don't print the last element if + // it's '\0', such that the output matches the string literal as it's + // written in the source code. + if (len > 0 && begin[len - 1] == '\0') { + PrintCharsAsStringTo(begin, len - 1, os); + return; + } + + // If, however, the last element in the array is not '\0', e.g. + // const char kFoo[] = { 'f', 'o', 'o' }; + // we must print the entire array. We also print a message to indicate + // that the array is not NUL-terminated. + PrintCharsAsStringTo(begin, len, os); + *os << " (no terminating NUL)"; +} + +// Prints a (const) char array of 'len' elements, starting at address 'begin'. +void UniversalPrintArray(const char* begin, size_t len, ostream* os) { + UniversalPrintCharArray(begin, len, os); +} + +// Prints a (const) wchar_t array of 'len' elements, starting at address +// 'begin'. +void UniversalPrintArray(const wchar_t* begin, size_t len, ostream* os) { + UniversalPrintCharArray(begin, len, os); +} + +// Prints the given C string to the ostream. +void PrintTo(const char* s, ostream* os) { + if (s == NULL) { + *os << "NULL"; + } else { + *os << ImplicitCast_(s) << " pointing to "; + PrintCharsAsStringTo(s, strlen(s), os); + } +} + +// MSVC compiler can be configured to define whar_t as a typedef +// of unsigned short. Defining an overload for const wchar_t* in that case +// would cause pointers to unsigned shorts be printed as wide strings, +// possibly accessing more memory than intended and causing invalid +// memory accesses. MSVC defines _NATIVE_WCHAR_T_DEFINED symbol when +// wchar_t is implemented as a native type. +#if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED) +// Prints the given wide C string to the ostream. +void PrintTo(const wchar_t* s, ostream* os) { + if (s == NULL) { + *os << "NULL"; + } else { + *os << ImplicitCast_(s) << " pointing to "; + PrintCharsAsStringTo(s, wcslen(s), os); + } +} +#endif // wchar_t is native + +// Prints a ::string object. +#if GTEST_HAS_GLOBAL_STRING +void PrintStringTo(const ::string& s, ostream* os) { + PrintCharsAsStringTo(s.data(), s.size(), os); +} +#endif // GTEST_HAS_GLOBAL_STRING + +void PrintStringTo(const ::std::string& s, ostream* os) { + PrintCharsAsStringTo(s.data(), s.size(), os); +} + +// Prints a ::wstring object. +#if GTEST_HAS_GLOBAL_WSTRING +void PrintWideStringTo(const ::wstring& s, ostream* os) { + PrintCharsAsStringTo(s.data(), s.size(), os); +} +#endif // GTEST_HAS_GLOBAL_WSTRING + +#if GTEST_HAS_STD_WSTRING +void PrintWideStringTo(const ::std::wstring& s, ostream* os) { + PrintCharsAsStringTo(s.data(), s.size(), os); +} +#endif // GTEST_HAS_STD_WSTRING + +} // namespace internal + +} // namespace testing +// Copyright 2008, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Author: mheule@google.com (Markus Heule) +// +// The Google C++ Testing Framework (Google Test) + + +// Indicates that this translation unit is part of Google Test's +// implementation. It must come before gtest-internal-inl.h is +// included, or there will be a compiler error. This trick is to +// prevent a user from accidentally including gtest-internal-inl.h in +// his code. +#define GTEST_IMPLEMENTATION_ 1 +#undef GTEST_IMPLEMENTATION_ + +namespace testing { + +using internal::GetUnitTestImpl; + +// Gets the summary of the failure message by omitting the stack trace +// in it. +std::string TestPartResult::ExtractSummary(const char* message) { + const char* const stack_trace = strstr(message, internal::kStackTraceMarker); + return stack_trace == NULL ? message : + std::string(message, stack_trace); +} + +// Prints a TestPartResult object. +std::ostream& operator<<(std::ostream& os, const TestPartResult& result) { + return os + << result.file_name() << ":" << result.line_number() << ": " + << (result.type() == TestPartResult::kSuccess ? "Success" : + result.type() == TestPartResult::kFatalFailure ? "Fatal failure" : + "Non-fatal failure") << ":\n" + << result.message() << std::endl; +} + +// Appends a TestPartResult to the array. +void TestPartResultArray::Append(const TestPartResult& result) { + array_.push_back(result); +} + +// Returns the TestPartResult at the given index (0-based). +const TestPartResult& TestPartResultArray::GetTestPartResult(int index) const { + if (index < 0 || index >= size()) { + printf("\nInvalid index (%d) into TestPartResultArray.\n", index); + internal::posix::Abort(); + } + + return array_[index]; +} + +// Returns the number of TestPartResult objects in the array. +int TestPartResultArray::size() const { + return static_cast(array_.size()); +} + +namespace internal { + +HasNewFatalFailureHelper::HasNewFatalFailureHelper() + : has_new_fatal_failure_(false), + original_reporter_(GetUnitTestImpl()-> + GetTestPartResultReporterForCurrentThread()) { + GetUnitTestImpl()->SetTestPartResultReporterForCurrentThread(this); +} + +HasNewFatalFailureHelper::~HasNewFatalFailureHelper() { + GetUnitTestImpl()->SetTestPartResultReporterForCurrentThread( + original_reporter_); +} + +void HasNewFatalFailureHelper::ReportTestPartResult( + const TestPartResult& result) { + if (result.fatally_failed()) + has_new_fatal_failure_ = true; + original_reporter_->ReportTestPartResult(result); +} + +} // namespace internal + +} // namespace testing +// Copyright 2008 Google Inc. +// All Rights Reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Author: wan@google.com (Zhanyong Wan) + + +namespace testing { +namespace internal { + +#if GTEST_HAS_TYPED_TEST_P + +// Skips to the first non-space char in str. Returns an empty string if str +// contains only whitespace characters. +static const char* SkipSpaces(const char* str) { + while (IsSpace(*str)) + str++; + return str; +} + +// Verifies that registered_tests match the test names in +// defined_test_names_; returns registered_tests if successful, or +// aborts the program otherwise. +const char* TypedTestCasePState::VerifyRegisteredTestNames( + const char* file, int line, const char* registered_tests) { + typedef ::std::set::const_iterator DefinedTestIter; + registered_ = true; + + // Skip initial whitespace in registered_tests since some + // preprocessors prefix stringizied literals with whitespace. + registered_tests = SkipSpaces(registered_tests); + + Message errors; + ::std::set tests; + for (const char* names = registered_tests; names != NULL; + names = SkipComma(names)) { + const std::string name = GetPrefixUntilComma(names); + if (tests.count(name) != 0) { + errors << "Test " << name << " is listed more than once.\n"; + continue; + } + + bool found = false; + for (DefinedTestIter it = defined_test_names_.begin(); + it != defined_test_names_.end(); + ++it) { + if (name == *it) { + found = true; + break; + } + } + + if (found) { + tests.insert(name); + } else { + errors << "No test named " << name + << " can be found in this test case.\n"; + } + } + + for (DefinedTestIter it = defined_test_names_.begin(); + it != defined_test_names_.end(); + ++it) { + if (tests.count(*it) == 0) { + errors << "You forgot to list test " << *it << ".\n"; + } + } + + const std::string& errors_str = errors.GetString(); + if (errors_str != "") { + fprintf(stderr, "%s %s", FormatFileLocation(file, line).c_str(), + errors_str.c_str()); + fflush(stderr); + posix::Abort(); + } + + return registered_tests; +} + +#endif // GTEST_HAS_TYPED_TEST_P + +} // namespace internal +} // namespace testing +// Copyright 2008, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Author: wan@google.com (Zhanyong Wan) +// +// Google C++ Mocking Framework (Google Mock) +// +// This file #includes all Google Mock implementation .cc files. The +// purpose is to allow a user to build Google Mock by compiling this +// file alone. + +// This line ensures that gmock.h can be compiled on its own, even +// when it's fused. +#include "gmock/gmock.h" + +// The following lines pull in the real gmock *.cc files. +// Copyright 2007, 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. +// +// Author: wan@google.com (Zhanyong Wan) + +// Google Mock - a framework for writing C++ mock classes. +// +// This file implements cardinalities. + + +#include +#include // NOLINT +#include +#include + +namespace testing { + +namespace { + +// Implements the Between(m, n) cardinality. +class BetweenCardinalityImpl : public CardinalityInterface { + public: + BetweenCardinalityImpl(int min, int max) + : min_(min >= 0 ? min : 0), + max_(max >= min_ ? max : min_) { + std::stringstream ss; + if (min < 0) { + ss << "The invocation lower bound must be >= 0, " + << "but is actually " << min << "."; + internal::Expect(false, __FILE__, __LINE__, ss.str()); + } else if (max < 0) { + ss << "The invocation upper bound must be >= 0, " + << "but is actually " << max << "."; + internal::Expect(false, __FILE__, __LINE__, ss.str()); + } else if (min > max) { + ss << "The invocation upper bound (" << max + << ") must be >= the invocation lower bound (" << min + << ")."; + internal::Expect(false, __FILE__, __LINE__, ss.str()); + } + } + + // Conservative estimate on the lower/upper bound of the number of + // calls allowed. + virtual int ConservativeLowerBound() const { return min_; } + virtual int ConservativeUpperBound() const { return max_; } + + virtual bool IsSatisfiedByCallCount(int call_count) const { + return min_ <= call_count && call_count <= max_; + } + + virtual bool IsSaturatedByCallCount(int call_count) const { + return call_count >= max_; + } + + virtual void DescribeTo(::std::ostream* os) const; + + private: + const int min_; + const int max_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(BetweenCardinalityImpl); +}; + +// Formats "n times" in a human-friendly way. +inline internal::string FormatTimes(int n) { + if (n == 1) { + return "once"; + } else if (n == 2) { + return "twice"; + } else { + std::stringstream ss; + ss << n << " times"; + return ss.str(); + } +} + +// Describes the Between(m, n) cardinality in human-friendly text. +void BetweenCardinalityImpl::DescribeTo(::std::ostream* os) const { + if (min_ == 0) { + if (max_ == 0) { + *os << "never called"; + } else if (max_ == INT_MAX) { + *os << "called any number of times"; + } else { + *os << "called at most " << FormatTimes(max_); + } + } else if (min_ == max_) { + *os << "called " << FormatTimes(min_); + } else if (max_ == INT_MAX) { + *os << "called at least " << FormatTimes(min_); + } else { + // 0 < min_ < max_ < INT_MAX + *os << "called between " << min_ << " and " << max_ << " times"; + } +} + +} // Unnamed namespace + +// Describes the given call count to an ostream. +void Cardinality::DescribeActualCallCountTo(int actual_call_count, + ::std::ostream* os) { + if (actual_call_count > 0) { + *os << "called " << FormatTimes(actual_call_count); + } else { + *os << "never called"; + } +} + +// Creates a cardinality that allows at least n calls. +GTEST_API_ Cardinality AtLeast(int n) { return Between(n, INT_MAX); } + +// Creates a cardinality that allows at most n calls. +GTEST_API_ Cardinality AtMost(int n) { return Between(0, n); } + +// Creates a cardinality that allows any number of calls. +GTEST_API_ Cardinality AnyNumber() { return AtLeast(0); } + +// Creates a cardinality that allows between min and max calls. +GTEST_API_ Cardinality Between(int min, int max) { + return Cardinality(new BetweenCardinalityImpl(min, max)); +} + +// Creates a cardinality that allows exactly n calls. +GTEST_API_ Cardinality Exactly(int n) { return Between(n, n); } + +} // namespace testing +// Copyright 2007, 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. +// +// Author: wan@google.com (Zhanyong Wan) + +// Google Mock - a framework for writing C++ mock classes. +// +// This file defines some utilities useful for implementing Google +// Mock. They are subject to change without notice, so please DO NOT +// USE THEM IN USER CODE. + + +#include +#include // NOLINT +#include + +namespace testing { +namespace internal { + +// Converts an identifier name to a space-separated list of lower-case +// words. Each maximum substring of the form [A-Za-z][a-z]*|\d+ is +// treated as one word. For example, both "FooBar123" and +// "foo_bar_123" are converted to "foo bar 123". +GTEST_API_ string ConvertIdentifierNameToWords(const char* id_name) { + string result; + char prev_char = '\0'; + for (const char* p = id_name; *p != '\0'; prev_char = *(p++)) { + // We don't care about the current locale as the input is + // guaranteed to be a valid C++ identifier name. + const bool starts_new_word = IsUpper(*p) || + (!IsAlpha(prev_char) && IsLower(*p)) || + (!IsDigit(prev_char) && IsDigit(*p)); + + if (IsAlNum(*p)) { + if (starts_new_word && result != "") + result += ' '; + result += ToLower(*p); + } + } + return result; +} + +// This class reports Google Mock failures as Google Test failures. A +// user can define another class in a similar fashion if he intends to +// use Google Mock with a testing framework other than Google Test. +class GoogleTestFailureReporter : public FailureReporterInterface { + public: + virtual void ReportFailure(FailureType type, const char* file, int line, + const string& message) { + AssertHelper(type == kFatal ? + TestPartResult::kFatalFailure : + TestPartResult::kNonFatalFailure, + file, + line, + message.c_str()) = Message(); + if (type == kFatal) { + posix::Abort(); + } + } +}; + +// Returns the global failure reporter. Will create a +// GoogleTestFailureReporter and return it the first time called. +GTEST_API_ FailureReporterInterface* GetFailureReporter() { + // Points to the global failure reporter used by Google Mock. gcc + // guarantees that the following use of failure_reporter is + // thread-safe. We may need to add additional synchronization to + // protect failure_reporter if we port Google Mock to other + // compilers. + static FailureReporterInterface* const failure_reporter = + new GoogleTestFailureReporter(); + return failure_reporter; +} + +// Protects global resources (stdout in particular) used by Log(). +static GTEST_DEFINE_STATIC_MUTEX_(g_log_mutex); + +// Returns true iff a log with the given severity is visible according +// to the --gmock_verbose flag. +GTEST_API_ bool LogIsVisible(LogSeverity severity) { + if (GMOCK_FLAG(verbose) == kInfoVerbosity) { + // Always show the log if --gmock_verbose=info. + return true; + } else if (GMOCK_FLAG(verbose) == kErrorVerbosity) { + // Always hide it if --gmock_verbose=error. + return false; + } else { + // If --gmock_verbose is neither "info" nor "error", we treat it + // as "warning" (its default value). + return severity == kWarning; + } +} + +// Prints the given message to stdout iff 'severity' >= the level +// specified by the --gmock_verbose flag. If stack_frames_to_skip >= +// 0, also prints the stack trace excluding the top +// stack_frames_to_skip frames. In opt mode, any positive +// stack_frames_to_skip is treated as 0, since we don't know which +// function calls will be inlined by the compiler and need to be +// conservative. +GTEST_API_ void Log(LogSeverity severity, + const string& message, + int stack_frames_to_skip) { + if (!LogIsVisible(severity)) + return; + + // Ensures that logs from different threads don't interleave. + MutexLock l(&g_log_mutex); + + // "using ::std::cout;" doesn't work with Symbian's STLport, where cout is a + // macro. + + if (severity == kWarning) { + // Prints a GMOCK WARNING marker to make the warnings easily searchable. + std::cout << "\nGMOCK WARNING:"; + } + // Pre-pends a new-line to message if it doesn't start with one. + if (message.empty() || message[0] != '\n') { + std::cout << "\n"; + } + std::cout << message; + if (stack_frames_to_skip >= 0) { +#ifdef NDEBUG + // In opt mode, we have to be conservative and skip no stack frame. + const int actual_to_skip = 0; +#else + // In dbg mode, we can do what the caller tell us to do (plus one + // for skipping this function's stack frame). + const int actual_to_skip = stack_frames_to_skip + 1; +#endif // NDEBUG + + // Appends a new-line to message if it doesn't end with one. + if (!message.empty() && *message.rbegin() != '\n') { + std::cout << "\n"; + } + std::cout << "Stack trace:\n" + << ::testing::internal::GetCurrentOsStackTraceExceptTop( + ::testing::UnitTest::GetInstance(), actual_to_skip); + } + std::cout << ::std::flush; +} + +} // namespace internal +} // namespace testing +// Copyright 2007, 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. +// +// Author: wan@google.com (Zhanyong Wan) + +// Google Mock - a framework for writing C++ mock classes. +// +// This file implements Matcher, Matcher, and +// utilities for defining matchers. + + +#include +#include +#include + +namespace testing { + +// Constructs a matcher that matches a const string& whose value is +// equal to s. +Matcher::Matcher(const internal::string& s) { + *this = Eq(s); +} + +// Constructs a matcher that matches a const string& whose value is +// equal to s. +Matcher::Matcher(const char* s) { + *this = Eq(internal::string(s)); +} + +// Constructs a matcher that matches a string whose value is equal to s. +Matcher::Matcher(const internal::string& s) { *this = Eq(s); } + +// Constructs a matcher that matches a string whose value is equal to s. +Matcher::Matcher(const char* s) { + *this = Eq(internal::string(s)); +} + +#if GTEST_HAS_STRING_PIECE_ +// Constructs a matcher that matches a const StringPiece& whose value is +// equal to s. +Matcher::Matcher(const internal::string& s) { + *this = Eq(s); +} + +// Constructs a matcher that matches a const StringPiece& whose value is +// equal to s. +Matcher::Matcher(const char* s) { + *this = Eq(internal::string(s)); +} + +// Constructs a matcher that matches a const StringPiece& whose value is +// equal to s. +Matcher::Matcher(StringPiece s) { + *this = Eq(s.ToString()); +} + +// Constructs a matcher that matches a StringPiece whose value is equal to s. +Matcher::Matcher(const internal::string& s) { + *this = Eq(s); +} + +// Constructs a matcher that matches a StringPiece whose value is equal to s. +Matcher::Matcher(const char* s) { + *this = Eq(internal::string(s)); +} + +// Constructs a matcher that matches a StringPiece whose value is equal to s. +Matcher::Matcher(StringPiece s) { + *this = Eq(s.ToString()); +} +#endif // GTEST_HAS_STRING_PIECE_ + +namespace internal { + +// Joins a vector of strings as if they are fields of a tuple; returns +// the joined string. +GTEST_API_ string JoinAsTuple(const Strings& fields) { + switch (fields.size()) { + case 0: + return ""; + case 1: + return fields[0]; + default: + string result = "(" + fields[0]; + for (size_t i = 1; i < fields.size(); i++) { + result += ", "; + result += fields[i]; + } + result += ")"; + return result; + } +} + +// Returns the description for a matcher defined using the MATCHER*() +// macro where the user-supplied description string is "", if +// 'negation' is false; otherwise returns the description of the +// negation of the matcher. 'param_values' contains a list of strings +// that are the print-out of the matcher's parameters. +GTEST_API_ string FormatMatcherDescription(bool negation, + const char* matcher_name, + const Strings& param_values) { + string result = ConvertIdentifierNameToWords(matcher_name); + if (param_values.size() >= 1) + result += " " + JoinAsTuple(param_values); + return negation ? "not (" + result + ")" : result; +} + +// FindMaxBipartiteMatching and its helper class. +// +// Uses the well-known Ford-Fulkerson max flow method to find a maximum +// bipartite matching. Flow is considered to be from left to right. +// There is an implicit source node that is connected to all of the left +// nodes, and an implicit sink node that is connected to all of the +// right nodes. All edges have unit capacity. +// +// Neither the flow graph nor the residual flow graph are represented +// explicitly. Instead, they are implied by the information in 'graph' and +// a vector called 'left_' whose elements are initialized to the +// value kUnused. This represents the initial state of the algorithm, +// where the flow graph is empty, and the residual flow graph has the +// following edges: +// - An edge from source to each left_ node +// - An edge from each right_ node to sink +// - An edge from each left_ node to each right_ node, if the +// corresponding edge exists in 'graph'. +// +// When the TryAugment() method adds a flow, it sets left_[l] = r for some +// nodes l and r. This induces the following changes: +// - The edges (source, l), (l, r), and (r, sink) are added to the +// flow graph. +// - The same three edges are removed from the residual flow graph. +// - The reverse edges (l, source), (r, l), and (sink, r) are added +// to the residual flow graph, which is a directional graph +// representing unused flow capacity. +// +// When the method augments a flow (moving left_[l] from some r1 to some +// other r2), this can be thought of as "undoing" the above steps with +// respect to r1 and "redoing" them with respect to r2. +// +// It bears repeating that the flow graph and residual flow graph are +// never represented explicitly, but can be derived by looking at the +// information in 'graph' and in left_. +// +// As an optimization, there is a second vector called right_ which +// does not provide any new information. Instead, it enables more +// efficient queries about edges entering or leaving the right-side nodes +// of the flow or residual flow graphs. The following invariants are +// maintained: +// +// left[l] == kUnused or right[left[l]] == l +// right[r] == kUnused or left[right[r]] == r +// +// . [ source ] . +// . ||| . +// . ||| . +// . ||\--> left[0]=1 ---\ right[0]=-1 ----\ . +// . || | | . +// . |\---> left[1]=-1 \--> right[1]=0 ---\| . +// . | || . +// . \----> left[2]=2 ------> right[2]=2 --\|| . +// . ||| . +// . elements matchers vvv . +// . [ sink ] . +// +// See Also: +// [1] Cormen, et al (2001). "Section 26.2: The Ford–Fulkerson method". +// "Introduction to Algorithms (Second ed.)", pp. 651–664. +// [2] "Ford–Fulkerson algorithm", Wikipedia, +// 'http://en.wikipedia.org/wiki/Ford%E2%80%93Fulkerson_algorithm' +class MaxBipartiteMatchState { + public: + explicit MaxBipartiteMatchState(const MatchMatrix& graph) + : graph_(&graph), + left_(graph_->LhsSize(), kUnused), + right_(graph_->RhsSize(), kUnused) { + } + + // Returns the edges of a maximal match, each in the form {left, right}. + ElementMatcherPairs Compute() { + // 'seen' is used for path finding { 0: unseen, 1: seen }. + ::std::vector seen; + // Searches the residual flow graph for a path from each left node to + // the sink in the residual flow graph, and if one is found, add flow + // to the graph. It's okay to search through the left nodes once. The + // edge from the implicit source node to each previously-visited left + // node will have flow if that left node has any path to the sink + // whatsoever. Subsequent augmentations can only add flow to the + // network, and cannot take away that previous flow unit from the source. + // Since the source-to-left edge can only carry one flow unit (or, + // each element can be matched to only one matcher), there is no need + // to visit the left nodes more than once looking for augmented paths. + // The flow is known to be possible or impossible by looking at the + // node once. + for (size_t ilhs = 0; ilhs < graph_->LhsSize(); ++ilhs) { + // Reset the path-marking vector and try to find a path from + // source to sink starting at the left_[ilhs] node. + GTEST_CHECK_(left_[ilhs] == kUnused) + << "ilhs: " << ilhs << ", left_[ilhs]: " << left_[ilhs]; + // 'seen' initialized to 'graph_->RhsSize()' copies of 0. + seen.assign(graph_->RhsSize(), 0); + TryAugment(ilhs, &seen); + } + ElementMatcherPairs result; + for (size_t ilhs = 0; ilhs < left_.size(); ++ilhs) { + size_t irhs = left_[ilhs]; + if (irhs == kUnused) continue; + result.push_back(ElementMatcherPair(ilhs, irhs)); + } + return result; + } + + private: + static const size_t kUnused = static_cast(-1); + + // Perform a depth-first search from left node ilhs to the sink. If a + // path is found, flow is added to the network by linking the left and + // right vector elements corresponding each segment of the path. + // Returns true if a path to sink was found, which means that a unit of + // flow was added to the network. The 'seen' vector elements correspond + // to right nodes and are marked to eliminate cycles from the search. + // + // Left nodes will only be explored at most once because they + // are accessible from at most one right node in the residual flow + // graph. + // + // Note that left_[ilhs] is the only element of left_ that TryAugment will + // potentially transition from kUnused to another value. Any other + // left_ element holding kUnused before TryAugment will be holding it + // when TryAugment returns. + // + bool TryAugment(size_t ilhs, ::std::vector* seen) { + for (size_t irhs = 0; irhs < graph_->RhsSize(); ++irhs) { + if ((*seen)[irhs]) + continue; + if (!graph_->HasEdge(ilhs, irhs)) + continue; + // There's an available edge from ilhs to irhs. + (*seen)[irhs] = 1; + // Next a search is performed to determine whether + // this edge is a dead end or leads to the sink. + // + // right_[irhs] == kUnused means that there is residual flow from + // right node irhs to the sink, so we can use that to finish this + // flow path and return success. + // + // Otherwise there is residual flow to some ilhs. We push flow + // along that path and call ourselves recursively to see if this + // ultimately leads to sink. + if (right_[irhs] == kUnused || TryAugment(right_[irhs], seen)) { + // Add flow from left_[ilhs] to right_[irhs]. + left_[ilhs] = irhs; + right_[irhs] = ilhs; + return true; + } + } + return false; + } + + const MatchMatrix* graph_; // not owned + // Each element of the left_ vector represents a left hand side node + // (i.e. an element) and each element of right_ is a right hand side + // node (i.e. a matcher). The values in the left_ vector indicate + // outflow from that node to a node on the the right_ side. The values + // in the right_ indicate inflow, and specify which left_ node is + // feeding that right_ node, if any. For example, left_[3] == 1 means + // there's a flow from element #3 to matcher #1. Such a flow would also + // be redundantly represented in the right_ vector as right_[1] == 3. + // Elements of left_ and right_ are either kUnused or mutually + // referent. Mutually referent means that left_[right_[i]] = i and + // right_[left_[i]] = i. + ::std::vector left_; + ::std::vector right_; + + GTEST_DISALLOW_ASSIGN_(MaxBipartiteMatchState); +}; + +const size_t MaxBipartiteMatchState::kUnused; + +GTEST_API_ ElementMatcherPairs +FindMaxBipartiteMatching(const MatchMatrix& g) { + return MaxBipartiteMatchState(g).Compute(); +} + +static void LogElementMatcherPairVec(const ElementMatcherPairs& pairs, + ::std::ostream* stream) { + typedef ElementMatcherPairs::const_iterator Iter; + ::std::ostream& os = *stream; + os << "{"; + const char *sep = ""; + for (Iter it = pairs.begin(); it != pairs.end(); ++it) { + os << sep << "\n (" + << "element #" << it->first << ", " + << "matcher #" << it->second << ")"; + sep = ","; + } + os << "\n}"; +} + +// Tries to find a pairing, and explains the result. +GTEST_API_ bool FindPairing(const MatchMatrix& matrix, + MatchResultListener* listener) { + ElementMatcherPairs matches = FindMaxBipartiteMatching(matrix); + + size_t max_flow = matches.size(); + bool result = (max_flow == matrix.RhsSize()); + + if (!result) { + if (listener->IsInterested()) { + *listener << "where no permutation of the elements can " + "satisfy all matchers, and the closest match is " + << max_flow << " of " << matrix.RhsSize() + << " matchers with the pairings:\n"; + LogElementMatcherPairVec(matches, listener->stream()); + } + return false; + } + + if (matches.size() > 1) { + if (listener->IsInterested()) { + const char *sep = "where:\n"; + for (size_t mi = 0; mi < matches.size(); ++mi) { + *listener << sep << " - element #" << matches[mi].first + << " is matched by matcher #" << matches[mi].second; + sep = ",\n"; + } + } + } + return true; +} + +bool MatchMatrix::NextGraph() { + for (size_t ilhs = 0; ilhs < LhsSize(); ++ilhs) { + for (size_t irhs = 0; irhs < RhsSize(); ++irhs) { + char& b = matched_[SpaceIndex(ilhs, irhs)]; + if (!b) { + b = 1; + return true; + } + b = 0; + } + } + return false; +} + +void MatchMatrix::Randomize() { + for (size_t ilhs = 0; ilhs < LhsSize(); ++ilhs) { + for (size_t irhs = 0; irhs < RhsSize(); ++irhs) { + char& b = matched_[SpaceIndex(ilhs, irhs)]; + b = static_cast(rand() & 1); // NOLINT + } + } +} + +string MatchMatrix::DebugString() const { + ::std::stringstream ss; + const char *sep = ""; + for (size_t i = 0; i < LhsSize(); ++i) { + ss << sep; + for (size_t j = 0; j < RhsSize(); ++j) { + ss << HasEdge(i, j); + } + sep = ";"; + } + return ss.str(); +} + +void UnorderedElementsAreMatcherImplBase::DescribeToImpl( + ::std::ostream* os) const { + if (matcher_describers_.empty()) { + *os << "is empty"; + return; + } + if (matcher_describers_.size() == 1) { + *os << "has " << Elements(1) << " and that element "; + matcher_describers_[0]->DescribeTo(os); + return; + } + *os << "has " << Elements(matcher_describers_.size()) + << " and there exists some permutation of elements such that:\n"; + const char* sep = ""; + for (size_t i = 0; i != matcher_describers_.size(); ++i) { + *os << sep << " - element #" << i << " "; + matcher_describers_[i]->DescribeTo(os); + sep = ", and\n"; + } +} + +void UnorderedElementsAreMatcherImplBase::DescribeNegationToImpl( + ::std::ostream* os) const { + if (matcher_describers_.empty()) { + *os << "isn't empty"; + return; + } + if (matcher_describers_.size() == 1) { + *os << "doesn't have " << Elements(1) + << ", or has " << Elements(1) << " that "; + matcher_describers_[0]->DescribeNegationTo(os); + return; + } + *os << "doesn't have " << Elements(matcher_describers_.size()) + << ", or there exists no permutation of elements such that:\n"; + const char* sep = ""; + for (size_t i = 0; i != matcher_describers_.size(); ++i) { + *os << sep << " - element #" << i << " "; + matcher_describers_[i]->DescribeTo(os); + sep = ", and\n"; + } +} + +// Checks that all matchers match at least one element, and that all +// elements match at least one matcher. This enables faster matching +// and better error reporting. +// Returns false, writing an explanation to 'listener', if and only +// if the success criteria are not met. +bool UnorderedElementsAreMatcherImplBase:: +VerifyAllElementsAndMatchersAreMatched( + const ::std::vector& element_printouts, + const MatchMatrix& matrix, + MatchResultListener* listener) const { + bool result = true; + ::std::vector element_matched(matrix.LhsSize(), 0); + ::std::vector matcher_matched(matrix.RhsSize(), 0); + + for (size_t ilhs = 0; ilhs < matrix.LhsSize(); ilhs++) { + for (size_t irhs = 0; irhs < matrix.RhsSize(); irhs++) { + char matched = matrix.HasEdge(ilhs, irhs); + element_matched[ilhs] |= matched; + matcher_matched[irhs] |= matched; + } + } + + { + const char* sep = + "where the following matchers don't match any elements:\n"; + for (size_t mi = 0; mi < matcher_matched.size(); ++mi) { + if (matcher_matched[mi]) + continue; + result = false; + if (listener->IsInterested()) { + *listener << sep << "matcher #" << mi << ": "; + matcher_describers_[mi]->DescribeTo(listener->stream()); + sep = ",\n"; + } + } + } + + { + const char* sep = + "where the following elements don't match any matchers:\n"; + const char* outer_sep = ""; + if (!result) { + outer_sep = "\nand "; + } + for (size_t ei = 0; ei < element_matched.size(); ++ei) { + if (element_matched[ei]) + continue; + result = false; + if (listener->IsInterested()) { + *listener << outer_sep << sep << "element #" << ei << ": " + << element_printouts[ei]; + sep = ",\n"; + outer_sep = ""; + } + } + } + return result; +} + +} // namespace internal +} // namespace testing +// Copyright 2007, 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. +// +// Author: wan@google.com (Zhanyong Wan) + +// Google Mock - a framework for writing C++ mock classes. +// +// This file implements the spec builder syntax (ON_CALL and +// EXPECT_CALL). + + +#include +#include // NOLINT +#include +#include +#include + +#if GTEST_OS_CYGWIN || GTEST_OS_LINUX || GTEST_OS_MAC +# include // NOLINT +#endif + +namespace testing { +namespace internal { + +// Protects the mock object registry (in class Mock), all function +// mockers, and all expectations. +GTEST_API_ GTEST_DEFINE_STATIC_MUTEX_(g_gmock_mutex); + +// Logs a message including file and line number information. +GTEST_API_ void LogWithLocation(testing::internal::LogSeverity severity, + const char* file, int line, + const string& message) { + ::std::ostringstream s; + s << file << ":" << line << ": " << message << ::std::endl; + Log(severity, s.str(), 0); +} + +// Constructs an ExpectationBase object. +ExpectationBase::ExpectationBase(const char* a_file, + int a_line, + const string& a_source_text) + : file_(a_file), + line_(a_line), + source_text_(a_source_text), + cardinality_specified_(false), + cardinality_(Exactly(1)), + call_count_(0), + retired_(false), + extra_matcher_specified_(false), + repeated_action_specified_(false), + retires_on_saturation_(false), + last_clause_(kNone), + action_count_checked_(false) {} + +// Destructs an ExpectationBase object. +ExpectationBase::~ExpectationBase() {} + +// Explicitly specifies the cardinality of this expectation. Used by +// the subclasses to implement the .Times() clause. +void ExpectationBase::SpecifyCardinality(const Cardinality& a_cardinality) { + cardinality_specified_ = true; + cardinality_ = a_cardinality; +} + +// Retires all pre-requisites of this expectation. +void ExpectationBase::RetireAllPreRequisites() + GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) { + if (is_retired()) { + // We can take this short-cut as we never retire an expectation + // until we have retired all its pre-requisites. + return; + } + + for (ExpectationSet::const_iterator it = immediate_prerequisites_.begin(); + it != immediate_prerequisites_.end(); ++it) { + ExpectationBase* const prerequisite = it->expectation_base().get(); + if (!prerequisite->is_retired()) { + prerequisite->RetireAllPreRequisites(); + prerequisite->Retire(); + } + } +} + +// Returns true iff all pre-requisites of this expectation have been +// satisfied. +bool ExpectationBase::AllPrerequisitesAreSatisfied() const + GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) { + g_gmock_mutex.AssertHeld(); + for (ExpectationSet::const_iterator it = immediate_prerequisites_.begin(); + it != immediate_prerequisites_.end(); ++it) { + if (!(it->expectation_base()->IsSatisfied()) || + !(it->expectation_base()->AllPrerequisitesAreSatisfied())) + return false; + } + return true; +} + +// Adds unsatisfied pre-requisites of this expectation to 'result'. +void ExpectationBase::FindUnsatisfiedPrerequisites(ExpectationSet* result) const + GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) { + g_gmock_mutex.AssertHeld(); + for (ExpectationSet::const_iterator it = immediate_prerequisites_.begin(); + it != immediate_prerequisites_.end(); ++it) { + if (it->expectation_base()->IsSatisfied()) { + // If *it is satisfied and has a call count of 0, some of its + // pre-requisites may not be satisfied yet. + if (it->expectation_base()->call_count_ == 0) { + it->expectation_base()->FindUnsatisfiedPrerequisites(result); + } + } else { + // Now that we know *it is unsatisfied, we are not so interested + // in whether its pre-requisites are satisfied. Therefore we + // don't recursively call FindUnsatisfiedPrerequisites() here. + *result += *it; + } + } +} + +// Describes how many times a function call matching this +// expectation has occurred. +void ExpectationBase::DescribeCallCountTo(::std::ostream* os) const + GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) { + g_gmock_mutex.AssertHeld(); + + // Describes how many times the function is expected to be called. + *os << " Expected: to be "; + cardinality().DescribeTo(os); + *os << "\n Actual: "; + Cardinality::DescribeActualCallCountTo(call_count(), os); + + // Describes the state of the expectation (e.g. is it satisfied? + // is it active?). + *os << " - " << (IsOverSaturated() ? "over-saturated" : + IsSaturated() ? "saturated" : + IsSatisfied() ? "satisfied" : "unsatisfied") + << " and " + << (is_retired() ? "retired" : "active"); +} + +// Checks the action count (i.e. the number of WillOnce() and +// WillRepeatedly() clauses) against the cardinality if this hasn't +// been done before. Prints a warning if there are too many or too +// few actions. +void ExpectationBase::CheckActionCountIfNotDone() const + GTEST_LOCK_EXCLUDED_(mutex_) { + bool should_check = false; + { + MutexLock l(&mutex_); + if (!action_count_checked_) { + action_count_checked_ = true; + should_check = true; + } + } + + if (should_check) { + if (!cardinality_specified_) { + // The cardinality was inferred - no need to check the action + // count against it. + return; + } + + // The cardinality was explicitly specified. + const int action_count = static_cast(untyped_actions_.size()); + const int upper_bound = cardinality().ConservativeUpperBound(); + const int lower_bound = cardinality().ConservativeLowerBound(); + bool too_many; // True if there are too many actions, or false + // if there are too few. + if (action_count > upper_bound || + (action_count == upper_bound && repeated_action_specified_)) { + too_many = true; + } else if (0 < action_count && action_count < lower_bound && + !repeated_action_specified_) { + too_many = false; + } else { + return; + } + + ::std::stringstream ss; + DescribeLocationTo(&ss); + ss << "Too " << (too_many ? "many" : "few") + << " actions specified in " << source_text() << "...\n" + << "Expected to be "; + cardinality().DescribeTo(&ss); + ss << ", but has " << (too_many ? "" : "only ") + << action_count << " WillOnce()" + << (action_count == 1 ? "" : "s"); + if (repeated_action_specified_) { + ss << " and a WillRepeatedly()"; + } + ss << "."; + Log(kWarning, ss.str(), -1); // -1 means "don't print stack trace". + } +} + +// Implements the .Times() clause. +void ExpectationBase::UntypedTimes(const Cardinality& a_cardinality) { + if (last_clause_ == kTimes) { + ExpectSpecProperty(false, + ".Times() cannot appear " + "more than once in an EXPECT_CALL()."); + } else { + ExpectSpecProperty(last_clause_ < kTimes, + ".Times() cannot appear after " + ".InSequence(), .WillOnce(), .WillRepeatedly(), " + "or .RetiresOnSaturation()."); + } + last_clause_ = kTimes; + + SpecifyCardinality(a_cardinality); +} + +// Points to the implicit sequence introduced by a living InSequence +// object (if any) in the current thread or NULL. +GTEST_API_ ThreadLocal g_gmock_implicit_sequence; + +// Reports an uninteresting call (whose description is in msg) in the +// manner specified by 'reaction'. +void ReportUninterestingCall(CallReaction reaction, const string& msg) { + switch (reaction) { + case kAllow: + Log(kInfo, msg, 3); + break; + case kWarn: + Log(kWarning, msg, 3); + break; + default: // FAIL + Expect(false, NULL, -1, msg); + } +} + +UntypedFunctionMockerBase::UntypedFunctionMockerBase() + : mock_obj_(NULL), name_("") {} + +UntypedFunctionMockerBase::~UntypedFunctionMockerBase() {} + +// Sets the mock object this mock method belongs to, and registers +// this information in the global mock registry. Will be called +// whenever an EXPECT_CALL() or ON_CALL() is executed on this mock +// method. +void UntypedFunctionMockerBase::RegisterOwner(const void* mock_obj) + GTEST_LOCK_EXCLUDED_(g_gmock_mutex) { + { + MutexLock l(&g_gmock_mutex); + mock_obj_ = mock_obj; + } + Mock::Register(mock_obj, this); +} + +// Sets the mock object this mock method belongs to, and sets the name +// of the mock function. Will be called upon each invocation of this +// mock function. +void UntypedFunctionMockerBase::SetOwnerAndName(const void* mock_obj, + const char* name) + GTEST_LOCK_EXCLUDED_(g_gmock_mutex) { + // We protect name_ under g_gmock_mutex in case this mock function + // is called from two threads concurrently. + MutexLock l(&g_gmock_mutex); + mock_obj_ = mock_obj; + name_ = name; +} + +// Returns the name of the function being mocked. Must be called +// after RegisterOwner() or SetOwnerAndName() has been called. +const void* UntypedFunctionMockerBase::MockObject() const + GTEST_LOCK_EXCLUDED_(g_gmock_mutex) { + const void* mock_obj; + { + // We protect mock_obj_ under g_gmock_mutex in case this mock + // function is called from two threads concurrently. + MutexLock l(&g_gmock_mutex); + Assert(mock_obj_ != NULL, __FILE__, __LINE__, + "MockObject() must not be called before RegisterOwner() or " + "SetOwnerAndName() has been called."); + mock_obj = mock_obj_; + } + return mock_obj; +} + +// Returns the name of this mock method. Must be called after +// SetOwnerAndName() has been called. +const char* UntypedFunctionMockerBase::Name() const + GTEST_LOCK_EXCLUDED_(g_gmock_mutex) { + const char* name; + { + // We protect name_ under g_gmock_mutex in case this mock + // function is called from two threads concurrently. + MutexLock l(&g_gmock_mutex); + Assert(name_ != NULL, __FILE__, __LINE__, + "Name() must not be called before SetOwnerAndName() has " + "been called."); + name = name_; + } + return name; +} + +// Calculates the result of invoking this mock function with the given +// arguments, prints it, and returns it. The caller is responsible +// for deleting the result. +const UntypedActionResultHolderBase* +UntypedFunctionMockerBase::UntypedInvokeWith(const void* const untyped_args) + GTEST_LOCK_EXCLUDED_(g_gmock_mutex) { + if (untyped_expectations_.size() == 0) { + // No expectation is set on this mock method - we have an + // uninteresting call. + + // We must get Google Mock's reaction on uninteresting calls + // made on this mock object BEFORE performing the action, + // because the action may DELETE the mock object and make the + // following expression meaningless. + const CallReaction reaction = + Mock::GetReactionOnUninterestingCalls(MockObject()); + + // True iff we need to print this call's arguments and return + // value. This definition must be kept in sync with + // the behavior of ReportUninterestingCall(). + const bool need_to_report_uninteresting_call = + // If the user allows this uninteresting call, we print it + // only when he wants informational messages. + reaction == kAllow ? LogIsVisible(kInfo) : + // If the user wants this to be a warning, we print it only + // when he wants to see warnings. + reaction == kWarn ? LogIsVisible(kWarning) : + // Otherwise, the user wants this to be an error, and we + // should always print detailed information in the error. + true; + + if (!need_to_report_uninteresting_call) { + // Perform the action without printing the call information. + return this->UntypedPerformDefaultAction(untyped_args, ""); + } + + // Warns about the uninteresting call. + ::std::stringstream ss; + this->UntypedDescribeUninterestingCall(untyped_args, &ss); + + // Calculates the function result. + const UntypedActionResultHolderBase* const result = + this->UntypedPerformDefaultAction(untyped_args, ss.str()); + + // Prints the function result. + if (result != NULL) + result->PrintAsActionResult(&ss); + + ReportUninterestingCall(reaction, ss.str()); + return result; + } + + bool is_excessive = false; + ::std::stringstream ss; + ::std::stringstream why; + ::std::stringstream loc; + const void* untyped_action = NULL; + + // The UntypedFindMatchingExpectation() function acquires and + // releases g_gmock_mutex. + const ExpectationBase* const untyped_expectation = + this->UntypedFindMatchingExpectation( + untyped_args, &untyped_action, &is_excessive, + &ss, &why); + const bool found = untyped_expectation != NULL; + + // True iff we need to print the call's arguments and return value. + // This definition must be kept in sync with the uses of Expect() + // and Log() in this function. + const bool need_to_report_call = + !found || is_excessive || LogIsVisible(kInfo); + if (!need_to_report_call) { + // Perform the action without printing the call information. + return + untyped_action == NULL ? + this->UntypedPerformDefaultAction(untyped_args, "") : + this->UntypedPerformAction(untyped_action, untyped_args); + } + + ss << " Function call: " << Name(); + this->UntypedPrintArgs(untyped_args, &ss); + + // In case the action deletes a piece of the expectation, we + // generate the message beforehand. + if (found && !is_excessive) { + untyped_expectation->DescribeLocationTo(&loc); + } + + const UntypedActionResultHolderBase* const result = + untyped_action == NULL ? + this->UntypedPerformDefaultAction(untyped_args, ss.str()) : + this->UntypedPerformAction(untyped_action, untyped_args); + if (result != NULL) + result->PrintAsActionResult(&ss); + ss << "\n" << why.str(); + + if (!found) { + // No expectation matches this call - reports a failure. + Expect(false, NULL, -1, ss.str()); + } else if (is_excessive) { + // We had an upper-bound violation and the failure message is in ss. + Expect(false, untyped_expectation->file(), + untyped_expectation->line(), ss.str()); + } else { + // We had an expected call and the matching expectation is + // described in ss. + Log(kInfo, loc.str() + ss.str(), 2); + } + + return result; +} + +// Returns an Expectation object that references and co-owns exp, +// which must be an expectation on this mock function. +Expectation UntypedFunctionMockerBase::GetHandleOf(ExpectationBase* exp) { + for (UntypedExpectations::const_iterator it = + untyped_expectations_.begin(); + it != untyped_expectations_.end(); ++it) { + if (it->get() == exp) { + return Expectation(*it); + } + } + + Assert(false, __FILE__, __LINE__, "Cannot find expectation."); + return Expectation(); + // The above statement is just to make the code compile, and will + // never be executed. +} + +// Verifies that all expectations on this mock function have been +// satisfied. Reports one or more Google Test non-fatal failures +// and returns false if not. +bool UntypedFunctionMockerBase::VerifyAndClearExpectationsLocked() + GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) { + g_gmock_mutex.AssertHeld(); + bool expectations_met = true; + for (UntypedExpectations::const_iterator it = + untyped_expectations_.begin(); + it != untyped_expectations_.end(); ++it) { + ExpectationBase* const untyped_expectation = it->get(); + if (untyped_expectation->IsOverSaturated()) { + // There was an upper-bound violation. Since the error was + // already reported when it occurred, there is no need to do + // anything here. + expectations_met = false; + } else if (!untyped_expectation->IsSatisfied()) { + expectations_met = false; + ::std::stringstream ss; + ss << "Actual function call count doesn't match " + << untyped_expectation->source_text() << "...\n"; + // No need to show the source file location of the expectation + // in the description, as the Expect() call that follows already + // takes care of it. + untyped_expectation->MaybeDescribeExtraMatcherTo(&ss); + untyped_expectation->DescribeCallCountTo(&ss); + Expect(false, untyped_expectation->file(), + untyped_expectation->line(), ss.str()); + } + } + + // Deleting our expectations may trigger other mock objects to be deleted, for + // example if an action contains a reference counted smart pointer to that + // mock object, and that is the last reference. So if we delete our + // expectations within the context of the global mutex we may deadlock when + // this method is called again. Instead, make a copy of the set of + // expectations to delete, clear our set within the mutex, and then clear the + // copied set outside of it. + UntypedExpectations expectations_to_delete; + untyped_expectations_.swap(expectations_to_delete); + + g_gmock_mutex.Unlock(); + expectations_to_delete.clear(); + g_gmock_mutex.Lock(); + + return expectations_met; +} + +} // namespace internal + +// Class Mock. + +namespace { + +typedef std::set FunctionMockers; + +// The current state of a mock object. Such information is needed for +// detecting leaked mock objects and explicitly verifying a mock's +// expectations. +struct MockObjectState { + MockObjectState() + : first_used_file(NULL), first_used_line(-1), leakable(false) {} + + // Where in the source file an ON_CALL or EXPECT_CALL is first + // invoked on this mock object. + const char* first_used_file; + int first_used_line; + ::std::string first_used_test_case; + ::std::string first_used_test; + bool leakable; // true iff it's OK to leak the object. + FunctionMockers function_mockers; // All registered methods of the object. +}; + +// A global registry holding the state of all mock objects that are +// alive. A mock object is added to this registry the first time +// Mock::AllowLeak(), ON_CALL(), or EXPECT_CALL() is called on it. It +// is removed from the registry in the mock object's destructor. +class MockObjectRegistry { + public: + // Maps a mock object (identified by its address) to its state. + typedef std::map StateMap; + + // This destructor will be called when a program exits, after all + // tests in it have been run. By then, there should be no mock + // object alive. Therefore we report any living object as test + // failure, unless the user explicitly asked us to ignore it. + ~MockObjectRegistry() { + // "using ::std::cout;" doesn't work with Symbian's STLport, where cout is + // a macro. + + if (!GMOCK_FLAG(catch_leaked_mocks)) + return; + + int leaked_count = 0; + for (StateMap::const_iterator it = states_.begin(); it != states_.end(); + ++it) { + if (it->second.leakable) // The user said it's fine to leak this object. + continue; + + // TODO(wan@google.com): Print the type of the leaked object. + // This can help the user identify the leaked object. + std::cout << "\n"; + const MockObjectState& state = it->second; + std::cout << internal::FormatFileLocation(state.first_used_file, + state.first_used_line); + std::cout << " ERROR: this mock object"; + if (state.first_used_test != "") { + std::cout << " (used in test " << state.first_used_test_case << "." + << state.first_used_test << ")"; + } + std::cout << " should be deleted but never is. Its address is @" + << it->first << "."; + leaked_count++; + } + if (leaked_count > 0) { + std::cout << "\nERROR: " << leaked_count + << " leaked mock " << (leaked_count == 1 ? "object" : "objects") + << " found at program exit.\n"; + std::cout.flush(); + ::std::cerr.flush(); + // RUN_ALL_TESTS() has already returned when this destructor is + // called. Therefore we cannot use the normal Google Test + // failure reporting mechanism. + _exit(1); // We cannot call exit() as it is not reentrant and + // may already have been called. + } + } + + StateMap& states() { return states_; } + + private: + StateMap states_; +}; + +// Protected by g_gmock_mutex. +MockObjectRegistry g_mock_object_registry; + +// Maps a mock object to the reaction Google Mock should have when an +// uninteresting method is called. Protected by g_gmock_mutex. +std::map g_uninteresting_call_reaction; + +// Sets the reaction Google Mock should have when an uninteresting +// method of the given mock object is called. +void SetReactionOnUninterestingCalls(const void* mock_obj, + internal::CallReaction reaction) + GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) { + internal::MutexLock l(&internal::g_gmock_mutex); + g_uninteresting_call_reaction[mock_obj] = reaction; +} + +} // namespace + +// Tells Google Mock to allow uninteresting calls on the given mock +// object. +void Mock::AllowUninterestingCalls(const void* mock_obj) + GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) { + SetReactionOnUninterestingCalls(mock_obj, internal::kAllow); +} + +// Tells Google Mock to warn the user about uninteresting calls on the +// given mock object. +void Mock::WarnUninterestingCalls(const void* mock_obj) + GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) { + SetReactionOnUninterestingCalls(mock_obj, internal::kWarn); +} + +// Tells Google Mock to fail uninteresting calls on the given mock +// object. +void Mock::FailUninterestingCalls(const void* mock_obj) + GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) { + SetReactionOnUninterestingCalls(mock_obj, internal::kFail); +} + +// Tells Google Mock the given mock object is being destroyed and its +// entry in the call-reaction table should be removed. +void Mock::UnregisterCallReaction(const void* mock_obj) + GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) { + internal::MutexLock l(&internal::g_gmock_mutex); + g_uninteresting_call_reaction.erase(mock_obj); +} + +// Returns the reaction Google Mock will have on uninteresting calls +// made on the given mock object. +internal::CallReaction Mock::GetReactionOnUninterestingCalls( + const void* mock_obj) + GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) { + internal::MutexLock l(&internal::g_gmock_mutex); + return (g_uninteresting_call_reaction.count(mock_obj) == 0) ? + internal::kDefault : g_uninteresting_call_reaction[mock_obj]; +} + +// Tells Google Mock to ignore mock_obj when checking for leaked mock +// objects. +void Mock::AllowLeak(const void* mock_obj) + GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) { + internal::MutexLock l(&internal::g_gmock_mutex); + g_mock_object_registry.states()[mock_obj].leakable = true; +} + +// Verifies and clears all expectations on the given mock object. If +// the expectations aren't satisfied, generates one or more Google +// Test non-fatal failures and returns false. +bool Mock::VerifyAndClearExpectations(void* mock_obj) + GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) { + internal::MutexLock l(&internal::g_gmock_mutex); + return VerifyAndClearExpectationsLocked(mock_obj); +} + +// Verifies all expectations on the given mock object and clears its +// default actions and expectations. Returns true iff the +// verification was successful. +bool Mock::VerifyAndClear(void* mock_obj) + GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) { + internal::MutexLock l(&internal::g_gmock_mutex); + ClearDefaultActionsLocked(mock_obj); + return VerifyAndClearExpectationsLocked(mock_obj); +} + +// Verifies and clears all expectations on the given mock object. If +// the expectations aren't satisfied, generates one or more Google +// Test non-fatal failures and returns false. +bool Mock::VerifyAndClearExpectationsLocked(void* mock_obj) + GTEST_EXCLUSIVE_LOCK_REQUIRED_(internal::g_gmock_mutex) { + internal::g_gmock_mutex.AssertHeld(); + if (g_mock_object_registry.states().count(mock_obj) == 0) { + // No EXPECT_CALL() was set on the given mock object. + return true; + } + + // Verifies and clears the expectations on each mock method in the + // given mock object. + bool expectations_met = true; + FunctionMockers& mockers = + g_mock_object_registry.states()[mock_obj].function_mockers; + for (FunctionMockers::const_iterator it = mockers.begin(); + it != mockers.end(); ++it) { + if (!(*it)->VerifyAndClearExpectationsLocked()) { + expectations_met = false; + } + } + + // We don't clear the content of mockers, as they may still be + // needed by ClearDefaultActionsLocked(). + return expectations_met; +} + +// Registers a mock object and a mock method it owns. +void Mock::Register(const void* mock_obj, + internal::UntypedFunctionMockerBase* mocker) + GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) { + internal::MutexLock l(&internal::g_gmock_mutex); + g_mock_object_registry.states()[mock_obj].function_mockers.insert(mocker); +} + +// Tells Google Mock where in the source code mock_obj is used in an +// ON_CALL or EXPECT_CALL. In case mock_obj is leaked, this +// information helps the user identify which object it is. +void Mock::RegisterUseByOnCallOrExpectCall(const void* mock_obj, + const char* file, int line) + GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) { + internal::MutexLock l(&internal::g_gmock_mutex); + MockObjectState& state = g_mock_object_registry.states()[mock_obj]; + if (state.first_used_file == NULL) { + state.first_used_file = file; + state.first_used_line = line; + const TestInfo* const test_info = + UnitTest::GetInstance()->current_test_info(); + if (test_info != NULL) { + // TODO(wan@google.com): record the test case name when the + // ON_CALL or EXPECT_CALL is invoked from SetUpTestCase() or + // TearDownTestCase(). + state.first_used_test_case = test_info->test_case_name(); + state.first_used_test = test_info->name(); + } + } +} + +// Unregisters a mock method; removes the owning mock object from the +// registry when the last mock method associated with it has been +// unregistered. This is called only in the destructor of +// FunctionMockerBase. +void Mock::UnregisterLocked(internal::UntypedFunctionMockerBase* mocker) + GTEST_EXCLUSIVE_LOCK_REQUIRED_(internal::g_gmock_mutex) { + internal::g_gmock_mutex.AssertHeld(); + for (MockObjectRegistry::StateMap::iterator it = + g_mock_object_registry.states().begin(); + it != g_mock_object_registry.states().end(); ++it) { + FunctionMockers& mockers = it->second.function_mockers; + if (mockers.erase(mocker) > 0) { + // mocker was in mockers and has been just removed. + if (mockers.empty()) { + g_mock_object_registry.states().erase(it); + } + return; + } + } +} + +// Clears all ON_CALL()s set on the given mock object. +void Mock::ClearDefaultActionsLocked(void* mock_obj) + GTEST_EXCLUSIVE_LOCK_REQUIRED_(internal::g_gmock_mutex) { + internal::g_gmock_mutex.AssertHeld(); + + if (g_mock_object_registry.states().count(mock_obj) == 0) { + // No ON_CALL() was set on the given mock object. + return; + } + + // Clears the default actions for each mock method in the given mock + // object. + FunctionMockers& mockers = + g_mock_object_registry.states()[mock_obj].function_mockers; + for (FunctionMockers::const_iterator it = mockers.begin(); + it != mockers.end(); ++it) { + (*it)->ClearDefaultActionsLocked(); + } + + // We don't clear the content of mockers, as they may still be + // needed by VerifyAndClearExpectationsLocked(). +} + +Expectation::Expectation() {} + +Expectation::Expectation( + const internal::linked_ptr& an_expectation_base) + : expectation_base_(an_expectation_base) {} + +Expectation::~Expectation() {} + +// Adds an expectation to a sequence. +void Sequence::AddExpectation(const Expectation& expectation) const { + if (*last_expectation_ != expectation) { + if (last_expectation_->expectation_base() != NULL) { + expectation.expectation_base()->immediate_prerequisites_ + += *last_expectation_; + } + *last_expectation_ = expectation; + } +} + +// Creates the implicit sequence if there isn't one. +InSequence::InSequence() { + if (internal::g_gmock_implicit_sequence.get() == NULL) { + internal::g_gmock_implicit_sequence.set(new Sequence); + sequence_created_ = true; + } else { + sequence_created_ = false; + } +} + +// Deletes the implicit sequence if it was created by the constructor +// of this object. +InSequence::~InSequence() { + if (sequence_created_) { + delete internal::g_gmock_implicit_sequence.get(); + internal::g_gmock_implicit_sequence.set(NULL); + } +} + +} // namespace testing +// Copyright 2008, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Author: wan@google.com (Zhanyong Wan) + + +namespace testing { + +// TODO(wan@google.com): support using environment variables to +// control the flag values, like what Google Test does. + +GMOCK_DEFINE_bool_(catch_leaked_mocks, true, + "true iff Google Mock should report leaked mock objects " + "as failures."); + +GMOCK_DEFINE_string_(verbose, internal::kWarningVerbosity, + "Controls how verbose Google Mock's output is." + " Valid values:\n" + " info - prints all messages.\n" + " warning - prints warnings and errors.\n" + " error - prints errors only."); + +namespace internal { + +// Parses a string as a command line flag. The string should have the +// format "--gmock_flag=value". When def_optional is true, the +// "=value" part can be omitted. +// +// Returns the value of the flag, or NULL if the parsing failed. +static const char* ParseGoogleMockFlagValue(const char* str, + const char* flag, + bool def_optional) { + // str and flag must not be NULL. + if (str == NULL || flag == NULL) return NULL; + + // The flag must start with "--gmock_". + const std::string flag_str = std::string("--gmock_") + flag; + const size_t flag_len = flag_str.length(); + if (strncmp(str, flag_str.c_str(), flag_len) != 0) return NULL; + + // Skips the flag name. + const char* flag_end = str + flag_len; + + // When def_optional is true, it's OK to not have a "=value" part. + if (def_optional && (flag_end[0] == '\0')) { + return flag_end; + } + + // If def_optional is true and there are more characters after the + // flag name, or if def_optional is false, there must be a '=' after + // the flag name. + if (flag_end[0] != '=') return NULL; + + // Returns the string after "=". + return flag_end + 1; +} + +// Parses a string for a Google Mock bool flag, in the form of +// "--gmock_flag=value". +// +// On success, stores the value of the flag in *value, and returns +// true. On failure, returns false without changing *value. +static bool ParseGoogleMockBoolFlag(const char* str, const char* flag, + bool* value) { + // Gets the value of the flag as a string. + const char* const value_str = ParseGoogleMockFlagValue(str, flag, true); + + // Aborts if the parsing failed. + if (value_str == NULL) return false; + + // Converts the string value to a bool. + *value = !(*value_str == '0' || *value_str == 'f' || *value_str == 'F'); + return true; +} + +// Parses a string for a Google Mock string flag, in the form of +// "--gmock_flag=value". +// +// On success, stores the value of the flag in *value, and returns +// true. On failure, returns false without changing *value. +static bool ParseGoogleMockStringFlag(const char* str, const char* flag, + std::string* value) { + // Gets the value of the flag as a string. + const char* const value_str = ParseGoogleMockFlagValue(str, flag, false); + + // Aborts if the parsing failed. + if (value_str == NULL) return false; + + // Sets *value to the value of the flag. + *value = value_str; + return true; +} + +// The internal implementation of InitGoogleMock(). +// +// The type parameter CharType can be instantiated to either char or +// wchar_t. +template +void InitGoogleMockImpl(int* argc, CharType** argv) { + // Makes sure Google Test is initialized. InitGoogleTest() is + // idempotent, so it's fine if the user has already called it. + InitGoogleTest(argc, argv); + if (*argc <= 0) return; + + for (int i = 1; i != *argc; i++) { + const std::string arg_string = StreamableToString(argv[i]); + const char* const arg = arg_string.c_str(); + + // Do we see a Google Mock flag? + if (ParseGoogleMockBoolFlag(arg, "catch_leaked_mocks", + &GMOCK_FLAG(catch_leaked_mocks)) || + ParseGoogleMockStringFlag(arg, "verbose", &GMOCK_FLAG(verbose))) { + // Yes. Shift the remainder of the argv list left by one. Note + // that argv has (*argc + 1) elements, the last one always being + // NULL. The following loop moves the trailing NULL element as + // well. + for (int j = i; j != *argc; j++) { + argv[j] = argv[j + 1]; + } + + // Decrements the argument count. + (*argc)--; + + // We also need to decrement the iterator as we just removed + // an element. + i--; + } + } +} + +} // namespace internal + +// Initializes Google Mock. This must be called before running the +// tests. In particular, it parses a command line for the flags that +// Google Mock recognizes. Whenever a Google Mock flag is seen, it is +// removed from argv, and *argc is decremented. +// +// No value is returned. Instead, the Google Mock flag variables are +// updated. +// +// Since Google Test is needed for Google Mock to work, this function +// also initializes Google Test and parses its flags, if that hasn't +// been done. +GTEST_API_ void InitGoogleMock(int* argc, char** argv) { + internal::InitGoogleMockImpl(argc, argv); +} + +// This overloaded version can be used in Windows programs compiled in +// UNICODE mode. +GTEST_API_ void InitGoogleMock(int* argc, wchar_t** argv) { + internal::InitGoogleMockImpl(argc, argv); +} + +} // namespace testing diff --git a/ceph/src/gmock/fused-src/gmock/gmock.h b/ceph/src/gmock/fused-src/gmock/gmock.h new file mode 100644 index 00000000..e8dd7fc3 --- /dev/null +++ b/ceph/src/gmock/fused-src/gmock/gmock.h @@ -0,0 +1,14198 @@ +// Copyright 2007, 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. +// +// Author: wan@google.com (Zhanyong Wan) + +// Google Mock - a framework for writing C++ mock classes. +// +// This is the main header file a user should include. + +#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_H_ +#define GMOCK_INCLUDE_GMOCK_GMOCK_H_ + +// This file implements the following syntax: +// +// ON_CALL(mock_object.Method(...)) +// .With(...) ? +// .WillByDefault(...); +// +// where With() is optional and WillByDefault() must appear exactly +// once. +// +// EXPECT_CALL(mock_object.Method(...)) +// .With(...) ? +// .Times(...) ? +// .InSequence(...) * +// .WillOnce(...) * +// .WillRepeatedly(...) ? +// .RetiresOnSaturation() ? ; +// +// where all clauses are optional and WillOnce() can be repeated. + +// Copyright 2007, 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. +// +// Author: wan@google.com (Zhanyong Wan) + +// Google Mock - a framework for writing C++ mock classes. +// +// This file implements some commonly used actions. + +#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_ +#define GMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_ + +#ifndef _WIN32_WCE +# include +#endif + +#include +#include + +// Copyright 2007, 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. +// +// Author: wan@google.com (Zhanyong Wan) + +// Google Mock - a framework for writing C++ mock classes. +// +// This file defines some utilities useful for implementing Google +// Mock. They are subject to change without notice, so please DO NOT +// USE THEM IN USER CODE. + +#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_ +#define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_ + +#include +#include // NOLINT +#include + +// This file was GENERATED by command: +// pump.py gmock-generated-internal-utils.h.pump +// DO NOT EDIT BY HAND!!! + +// Copyright 2007, 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. +// +// Author: wan@google.com (Zhanyong Wan) + +// Google Mock - a framework for writing C++ mock classes. +// +// This file contains template meta-programming utility classes needed +// for implementing Google Mock. + +#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_ +#define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_ + +// Copyright 2008, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Author: vadimb@google.com (Vadim Berman) +// +// Low-level types and utilities for porting Google Mock to various +// platforms. They are subject to change without notice. DO NOT USE +// THEM IN USER CODE. + +#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PORT_H_ +#define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PORT_H_ + +#include +#include +#include + +// Most of the types needed for porting Google Mock are also required +// for Google Test and are defined in gtest-port.h. +#include "gtest/gtest.h" + +// To avoid conditional compilation everywhere, we make it +// gmock-port.h's responsibility to #include the header implementing +// tr1/tuple. gmock-port.h does this via gtest-port.h, which is +// guaranteed to pull in the tuple header. + +// For MS Visual C++, check the compiler version. At least VS 2003 is +// required to compile Google Mock. +#if defined(_MSC_VER) && _MSC_VER < 1310 +# error "At least Visual C++ 2003 (7.1) is required to compile Google Mock." +#endif + +// Macro for referencing flags. This is public as we want the user to +// use this syntax to reference Google Mock flags. +#define GMOCK_FLAG(name) FLAGS_gmock_##name + +// Macros for declaring flags. +#define GMOCK_DECLARE_bool_(name) extern GTEST_API_ bool GMOCK_FLAG(name) +#define GMOCK_DECLARE_int32_(name) \ + extern GTEST_API_ ::testing::internal::Int32 GMOCK_FLAG(name) +#define GMOCK_DECLARE_string_(name) \ + extern GTEST_API_ ::std::string GMOCK_FLAG(name) + +// Macros for defining flags. +#define GMOCK_DEFINE_bool_(name, default_val, doc) \ + GTEST_API_ bool GMOCK_FLAG(name) = (default_val) +#define GMOCK_DEFINE_int32_(name, default_val, doc) \ + GTEST_API_ ::testing::internal::Int32 GMOCK_FLAG(name) = (default_val) +#define GMOCK_DEFINE_string_(name, default_val, doc) \ + GTEST_API_ ::std::string GMOCK_FLAG(name) = (default_val) + +#endif // GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PORT_H_ + +namespace testing { + +template +class Matcher; + +namespace internal { + +// An IgnoredValue object can be implicitly constructed from ANY value. +// This is used in implementing the IgnoreResult(a) action. +class IgnoredValue { + public: + // This constructor template allows any value to be implicitly + // converted to IgnoredValue. The object has no data member and + // doesn't try to remember anything about the argument. We + // deliberately omit the 'explicit' keyword in order to allow the + // conversion to be implicit. + template + IgnoredValue(const T& /* ignored */) {} // NOLINT(runtime/explicit) +}; + +// MatcherTuple::type is a tuple type where each field is a Matcher +// for the corresponding field in tuple type T. +template +struct MatcherTuple; + +template <> +struct MatcherTuple< ::std::tr1::tuple<> > { + typedef ::std::tr1::tuple< > type; +}; + +template +struct MatcherTuple< ::std::tr1::tuple > { + typedef ::std::tr1::tuple > type; +}; + +template +struct MatcherTuple< ::std::tr1::tuple > { + typedef ::std::tr1::tuple, Matcher > type; +}; + +template +struct MatcherTuple< ::std::tr1::tuple > { + typedef ::std::tr1::tuple, Matcher, Matcher > type; +}; + +template +struct MatcherTuple< ::std::tr1::tuple > { + typedef ::std::tr1::tuple, Matcher, Matcher, + Matcher > type; +}; + +template +struct MatcherTuple< ::std::tr1::tuple > { + typedef ::std::tr1::tuple, Matcher, Matcher, Matcher, + Matcher > type; +}; + +template +struct MatcherTuple< ::std::tr1::tuple > { + typedef ::std::tr1::tuple, Matcher, Matcher, Matcher, + Matcher, Matcher > type; +}; + +template +struct MatcherTuple< ::std::tr1::tuple > { + typedef ::std::tr1::tuple, Matcher, Matcher, Matcher, + Matcher, Matcher, Matcher > type; +}; + +template +struct MatcherTuple< ::std::tr1::tuple > { + typedef ::std::tr1::tuple, Matcher, Matcher, Matcher, + Matcher, Matcher, Matcher, Matcher > type; +}; + +template +struct MatcherTuple< ::std::tr1::tuple > { + typedef ::std::tr1::tuple, Matcher, Matcher, Matcher, + Matcher, Matcher, Matcher, Matcher, Matcher > type; +}; + +template +struct MatcherTuple< ::std::tr1::tuple > { + typedef ::std::tr1::tuple, Matcher, Matcher, Matcher, + Matcher, Matcher, Matcher, Matcher, Matcher, + Matcher > type; +}; + +// Template struct Function, where F must be a function type, contains +// the following typedefs: +// +// Result: the function's return type. +// ArgumentN: the type of the N-th argument, where N starts with 1. +// ArgumentTuple: the tuple type consisting of all parameters of F. +// ArgumentMatcherTuple: the tuple type consisting of Matchers for all +// parameters of F. +// MakeResultVoid: the function type obtained by substituting void +// for the return type of F. +// MakeResultIgnoredValue: +// the function type obtained by substituting Something +// for the return type of F. +template +struct Function; + +template +struct Function { + typedef R Result; + typedef ::std::tr1::tuple<> ArgumentTuple; + typedef typename MatcherTuple::type ArgumentMatcherTuple; + typedef void MakeResultVoid(); + typedef IgnoredValue MakeResultIgnoredValue(); +}; + +template +struct Function + : Function { + typedef A1 Argument1; + typedef ::std::tr1::tuple ArgumentTuple; + typedef typename MatcherTuple::type ArgumentMatcherTuple; + typedef void MakeResultVoid(A1); + typedef IgnoredValue MakeResultIgnoredValue(A1); +}; + +template +struct Function + : Function { + typedef A2 Argument2; + typedef ::std::tr1::tuple ArgumentTuple; + typedef typename MatcherTuple::type ArgumentMatcherTuple; + typedef void MakeResultVoid(A1, A2); + typedef IgnoredValue MakeResultIgnoredValue(A1, A2); +}; + +template +struct Function + : Function { + typedef A3 Argument3; + typedef ::std::tr1::tuple ArgumentTuple; + typedef typename MatcherTuple::type ArgumentMatcherTuple; + typedef void MakeResultVoid(A1, A2, A3); + typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3); +}; + +template +struct Function + : Function { + typedef A4 Argument4; + typedef ::std::tr1::tuple ArgumentTuple; + typedef typename MatcherTuple::type ArgumentMatcherTuple; + typedef void MakeResultVoid(A1, A2, A3, A4); + typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4); +}; + +template +struct Function + : Function { + typedef A5 Argument5; + typedef ::std::tr1::tuple ArgumentTuple; + typedef typename MatcherTuple::type ArgumentMatcherTuple; + typedef void MakeResultVoid(A1, A2, A3, A4, A5); + typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5); +}; + +template +struct Function + : Function { + typedef A6 Argument6; + typedef ::std::tr1::tuple ArgumentTuple; + typedef typename MatcherTuple::type ArgumentMatcherTuple; + typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6); + typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6); +}; + +template +struct Function + : Function { + typedef A7 Argument7; + typedef ::std::tr1::tuple ArgumentTuple; + typedef typename MatcherTuple::type ArgumentMatcherTuple; + typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7); + typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7); +}; + +template +struct Function + : Function { + typedef A8 Argument8; + typedef ::std::tr1::tuple ArgumentTuple; + typedef typename MatcherTuple::type ArgumentMatcherTuple; + typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7, A8); + typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7, A8); +}; + +template +struct Function + : Function { + typedef A9 Argument9; + typedef ::std::tr1::tuple ArgumentTuple; + typedef typename MatcherTuple::type ArgumentMatcherTuple; + typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7, A8, A9); + typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7, A8, + A9); +}; + +template +struct Function + : Function { + typedef A10 Argument10; + typedef ::std::tr1::tuple ArgumentTuple; + typedef typename MatcherTuple::type ArgumentMatcherTuple; + typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10); + typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7, A8, + A9, A10); +}; + +} // namespace internal + +} // namespace testing + +#endif // GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_ + +namespace testing { +namespace internal { + +// Converts an identifier name to a space-separated list of lower-case +// words. Each maximum substring of the form [A-Za-z][a-z]*|\d+ is +// treated as one word. For example, both "FooBar123" and +// "foo_bar_123" are converted to "foo bar 123". +GTEST_API_ string ConvertIdentifierNameToWords(const char* id_name); + +// PointeeOf::type is the type of a value pointed to by a +// Pointer, which can be either a smart pointer or a raw pointer. The +// following default implementation is for the case where Pointer is a +// smart pointer. +template +struct PointeeOf { + // Smart pointer classes define type element_type as the type of + // their pointees. + typedef typename Pointer::element_type type; +}; +// This specialization is for the raw pointer case. +template +struct PointeeOf { typedef T type; }; // NOLINT + +// GetRawPointer(p) returns the raw pointer underlying p when p is a +// smart pointer, or returns p itself when p is already a raw pointer. +// The following default implementation is for the smart pointer case. +template +inline const typename Pointer::element_type* GetRawPointer(const Pointer& p) { + return p.get(); +} +// This overloaded version is for the raw pointer case. +template +inline Element* GetRawPointer(Element* p) { return p; } + +// This comparator allows linked_ptr to be stored in sets. +template +struct LinkedPtrLessThan { + bool operator()(const ::testing::internal::linked_ptr& lhs, + const ::testing::internal::linked_ptr& rhs) const { + return lhs.get() < rhs.get(); + } +}; + +// Symbian compilation can be done with wchar_t being either a native +// type or a typedef. Using Google Mock with OpenC without wchar_t +// should require the definition of _STLP_NO_WCHAR_T. +// +// MSVC treats wchar_t as a native type usually, but treats it as the +// same as unsigned short when the compiler option /Zc:wchar_t- is +// specified. It defines _NATIVE_WCHAR_T_DEFINED symbol when wchar_t +// is a native type. +#if (GTEST_OS_SYMBIAN && defined(_STLP_NO_WCHAR_T)) || \ + (defined(_MSC_VER) && !defined(_NATIVE_WCHAR_T_DEFINED)) +// wchar_t is a typedef. +#else +# define GMOCK_WCHAR_T_IS_NATIVE_ 1 +#endif + +// signed wchar_t and unsigned wchar_t are NOT in the C++ standard. +// Using them is a bad practice and not portable. So DON'T use them. +// +// Still, Google Mock is designed to work even if the user uses signed +// wchar_t or unsigned wchar_t (obviously, assuming the compiler +// supports them). +// +// To gcc, +// wchar_t == signed wchar_t != unsigned wchar_t == unsigned int +#ifdef __GNUC__ +// signed/unsigned wchar_t are valid types. +# define GMOCK_HAS_SIGNED_WCHAR_T_ 1 +#endif + +// In what follows, we use the term "kind" to indicate whether a type +// is bool, an integer type (excluding bool), a floating-point type, +// or none of them. This categorization is useful for determining +// when a matcher argument type can be safely converted to another +// type in the implementation of SafeMatcherCast. +enum TypeKind { + kBool, kInteger, kFloatingPoint, kOther +}; + +// KindOf::value is the kind of type T. +template struct KindOf { + enum { value = kOther }; // The default kind. +}; + +// This macro declares that the kind of 'type' is 'kind'. +#define GMOCK_DECLARE_KIND_(type, kind) \ + template <> struct KindOf { enum { value = kind }; } + +GMOCK_DECLARE_KIND_(bool, kBool); + +// All standard integer types. +GMOCK_DECLARE_KIND_(char, kInteger); +GMOCK_DECLARE_KIND_(signed char, kInteger); +GMOCK_DECLARE_KIND_(unsigned char, kInteger); +GMOCK_DECLARE_KIND_(short, kInteger); // NOLINT +GMOCK_DECLARE_KIND_(unsigned short, kInteger); // NOLINT +GMOCK_DECLARE_KIND_(int, kInteger); +GMOCK_DECLARE_KIND_(unsigned int, kInteger); +GMOCK_DECLARE_KIND_(long, kInteger); // NOLINT +GMOCK_DECLARE_KIND_(unsigned long, kInteger); // NOLINT + +#if GMOCK_WCHAR_T_IS_NATIVE_ +GMOCK_DECLARE_KIND_(wchar_t, kInteger); +#endif + +// Non-standard integer types. +GMOCK_DECLARE_KIND_(Int64, kInteger); +GMOCK_DECLARE_KIND_(UInt64, kInteger); + +// All standard floating-point types. +GMOCK_DECLARE_KIND_(float, kFloatingPoint); +GMOCK_DECLARE_KIND_(double, kFloatingPoint); +GMOCK_DECLARE_KIND_(long double, kFloatingPoint); + +#undef GMOCK_DECLARE_KIND_ + +// Evaluates to the kind of 'type'. +#define GMOCK_KIND_OF_(type) \ + static_cast< ::testing::internal::TypeKind>( \ + ::testing::internal::KindOf::value) + +// Evaluates to true iff integer type T is signed. +#define GMOCK_IS_SIGNED_(T) (static_cast(-1) < 0) + +// LosslessArithmeticConvertibleImpl::value +// is true iff arithmetic type From can be losslessly converted to +// arithmetic type To. +// +// It's the user's responsibility to ensure that both From and To are +// raw (i.e. has no CV modifier, is not a pointer, and is not a +// reference) built-in arithmetic types, kFromKind is the kind of +// From, and kToKind is the kind of To; the value is +// implementation-defined when the above pre-condition is violated. +template +struct LosslessArithmeticConvertibleImpl : public false_type {}; + +// Converting bool to bool is lossless. +template <> +struct LosslessArithmeticConvertibleImpl + : public true_type {}; // NOLINT + +// Converting bool to any integer type is lossless. +template +struct LosslessArithmeticConvertibleImpl + : public true_type {}; // NOLINT + +// Converting bool to any floating-point type is lossless. +template +struct LosslessArithmeticConvertibleImpl + : public true_type {}; // NOLINT + +// Converting an integer to bool is lossy. +template +struct LosslessArithmeticConvertibleImpl + : public false_type {}; // NOLINT + +// Converting an integer to another non-bool integer is lossless iff +// the target type's range encloses the source type's range. +template +struct LosslessArithmeticConvertibleImpl + : public bool_constant< + // When converting from a smaller size to a larger size, we are + // fine as long as we are not converting from signed to unsigned. + ((sizeof(From) < sizeof(To)) && + (!GMOCK_IS_SIGNED_(From) || GMOCK_IS_SIGNED_(To))) || + // When converting between the same size, the signedness must match. + ((sizeof(From) == sizeof(To)) && + (GMOCK_IS_SIGNED_(From) == GMOCK_IS_SIGNED_(To)))> {}; // NOLINT + +#undef GMOCK_IS_SIGNED_ + +// Converting an integer to a floating-point type may be lossy, since +// the format of a floating-point number is implementation-defined. +template +struct LosslessArithmeticConvertibleImpl + : public false_type {}; // NOLINT + +// Converting a floating-point to bool is lossy. +template +struct LosslessArithmeticConvertibleImpl + : public false_type {}; // NOLINT + +// Converting a floating-point to an integer is lossy. +template +struct LosslessArithmeticConvertibleImpl + : public false_type {}; // NOLINT + +// Converting a floating-point to another floating-point is lossless +// iff the target type is at least as big as the source type. +template +struct LosslessArithmeticConvertibleImpl< + kFloatingPoint, From, kFloatingPoint, To> + : public bool_constant {}; // NOLINT + +// LosslessArithmeticConvertible::value is true iff arithmetic +// type From can be losslessly converted to arithmetic type To. +// +// It's the user's responsibility to ensure that both From and To are +// raw (i.e. has no CV modifier, is not a pointer, and is not a +// reference) built-in arithmetic types; the value is +// implementation-defined when the above pre-condition is violated. +template +struct LosslessArithmeticConvertible + : public LosslessArithmeticConvertibleImpl< + GMOCK_KIND_OF_(From), From, GMOCK_KIND_OF_(To), To> {}; // NOLINT + +// This interface knows how to report a Google Mock failure (either +// non-fatal or fatal). +class FailureReporterInterface { + public: + // The type of a failure (either non-fatal or fatal). + enum FailureType { + kNonfatal, kFatal + }; + + virtual ~FailureReporterInterface() {} + + // Reports a failure that occurred at the given source file location. + virtual void ReportFailure(FailureType type, const char* file, int line, + const string& message) = 0; +}; + +// Returns the failure reporter used by Google Mock. +GTEST_API_ FailureReporterInterface* GetFailureReporter(); + +// Asserts that condition is true; aborts the process with the given +// message if condition is false. We cannot use LOG(FATAL) or CHECK() +// as Google Mock might be used to mock the log sink itself. We +// inline this function to prevent it from showing up in the stack +// trace. +inline void Assert(bool condition, const char* file, int line, + const string& msg) { + if (!condition) { + GetFailureReporter()->ReportFailure(FailureReporterInterface::kFatal, + file, line, msg); + } +} +inline void Assert(bool condition, const char* file, int line) { + Assert(condition, file, line, "Assertion failed."); +} + +// Verifies that condition is true; generates a non-fatal failure if +// condition is false. +inline void Expect(bool condition, const char* file, int line, + const string& msg) { + if (!condition) { + GetFailureReporter()->ReportFailure(FailureReporterInterface::kNonfatal, + file, line, msg); + } +} +inline void Expect(bool condition, const char* file, int line) { + Expect(condition, file, line, "Expectation failed."); +} + +// Severity level of a log. +enum LogSeverity { + kInfo = 0, + kWarning = 1 +}; + +// Valid values for the --gmock_verbose flag. + +// All logs (informational and warnings) are printed. +const char kInfoVerbosity[] = "info"; +// Only warnings are printed. +const char kWarningVerbosity[] = "warning"; +// No logs are printed. +const char kErrorVerbosity[] = "error"; + +// Returns true iff a log with the given severity is visible according +// to the --gmock_verbose flag. +GTEST_API_ bool LogIsVisible(LogSeverity severity); + +// Prints the given message to stdout iff 'severity' >= the level +// specified by the --gmock_verbose flag. If stack_frames_to_skip >= +// 0, also prints the stack trace excluding the top +// stack_frames_to_skip frames. In opt mode, any positive +// stack_frames_to_skip is treated as 0, since we don't know which +// function calls will be inlined by the compiler and need to be +// conservative. +GTEST_API_ void Log(LogSeverity severity, + const string& message, + int stack_frames_to_skip); + +// TODO(wan@google.com): group all type utilities together. + +// Type traits. + +// is_reference::value is non-zero iff T is a reference type. +template struct is_reference : public false_type {}; +template struct is_reference : public true_type {}; + +// type_equals::value is non-zero iff T1 and T2 are the same type. +template struct type_equals : public false_type {}; +template struct type_equals : public true_type {}; + +// remove_reference::type removes the reference from type T, if any. +template struct remove_reference { typedef T type; }; // NOLINT +template struct remove_reference { typedef T type; }; // NOLINT + +// DecayArray::type turns an array type U[N] to const U* and preserves +// other types. Useful for saving a copy of a function argument. +template struct DecayArray { typedef T type; }; // NOLINT +template struct DecayArray { + typedef const T* type; +}; +// Sometimes people use arrays whose size is not available at the use site +// (e.g. extern const char kNamePrefix[]). This specialization covers that +// case. +template struct DecayArray { + typedef const T* type; +}; + +// Invalid() returns an invalid value of type T. This is useful +// when a value of type T is needed for compilation, but the statement +// will not really be executed (or we don't care if the statement +// crashes). +template +inline T Invalid() { + return const_cast::type&>( + *static_cast::type*>(NULL)); +} +template <> +inline void Invalid() {} + +// Given a raw type (i.e. having no top-level reference or const +// modifier) RawContainer that's either an STL-style container or a +// native array, class StlContainerView has the +// following members: +// +// - type is a type that provides an STL-style container view to +// (i.e. implements the STL container concept for) RawContainer; +// - const_reference is a type that provides a reference to a const +// RawContainer; +// - ConstReference(raw_container) returns a const reference to an STL-style +// container view to raw_container, which is a RawContainer. +// - Copy(raw_container) returns an STL-style container view of a +// copy of raw_container, which is a RawContainer. +// +// This generic version is used when RawContainer itself is already an +// STL-style container. +template +class StlContainerView { + public: + typedef RawContainer type; + typedef const type& const_reference; + + static const_reference ConstReference(const RawContainer& container) { + // Ensures that RawContainer is not a const type. + testing::StaticAssertTypeEq(); + return container; + } + static type Copy(const RawContainer& container) { return container; } +}; + +// This specialization is used when RawContainer is a native array type. +template +class StlContainerView { + public: + typedef GTEST_REMOVE_CONST_(Element) RawElement; + typedef internal::NativeArray type; + // NativeArray can represent a native array either by value or by + // reference (selected by a constructor argument), so 'const type' + // can be used to reference a const native array. We cannot + // 'typedef const type& const_reference' here, as that would mean + // ConstReference() has to return a reference to a local variable. + typedef const type const_reference; + + static const_reference ConstReference(const Element (&array)[N]) { + // Ensures that Element is not a const type. + testing::StaticAssertTypeEq(); +#if GTEST_OS_SYMBIAN + // The Nokia Symbian compiler confuses itself in template instantiation + // for this call without the cast to Element*: + // function call '[testing::internal::NativeArray].NativeArray( + // {lval} const char *[4], long, testing::internal::RelationToSource)' + // does not match + // 'testing::internal::NativeArray::NativeArray( + // char *const *, unsigned int, testing::internal::RelationToSource)' + // (instantiating: 'testing::internal::ContainsMatcherImpl + // ::Matches(const char * (&)[4]) const') + // (instantiating: 'testing::internal::StlContainerView:: + // ConstReference(const char * (&)[4])') + // (and though the N parameter type is mismatched in the above explicit + // conversion of it doesn't help - only the conversion of the array). + return type(const_cast(&array[0]), N, kReference); +#else + return type(array, N, kReference); +#endif // GTEST_OS_SYMBIAN + } + static type Copy(const Element (&array)[N]) { +#if GTEST_OS_SYMBIAN + return type(const_cast(&array[0]), N, kCopy); +#else + return type(array, N, kCopy); +#endif // GTEST_OS_SYMBIAN + } +}; + +// This specialization is used when RawContainer is a native array +// represented as a (pointer, size) tuple. +template +class StlContainerView< ::std::tr1::tuple > { + public: + typedef GTEST_REMOVE_CONST_( + typename internal::PointeeOf::type) RawElement; + typedef internal::NativeArray type; + typedef const type const_reference; + + static const_reference ConstReference( + const ::std::tr1::tuple& array) { + using ::std::tr1::get; + return type(get<0>(array), get<1>(array), kReference); + } + static type Copy(const ::std::tr1::tuple& array) { + using ::std::tr1::get; + return type(get<0>(array), get<1>(array), kCopy); + } +}; + +// The following specialization prevents the user from instantiating +// StlContainer with a reference type. +template class StlContainerView; + +// A type transform to remove constness from the first part of a pair. +// Pairs like that are used as the value_type of associative containers, +// and this transform produces a similar but assignable pair. +template +struct RemoveConstFromKey { + typedef T type; +}; + +// Partially specialized to remove constness from std::pair. +template +struct RemoveConstFromKey > { + typedef std::pair type; +}; + +// Mapping from booleans to types. Similar to boost::bool_ and +// std::integral_constant. +template +struct BooleanConstant {}; + +} // namespace internal +} // namespace testing + +#endif // GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_ + +namespace testing { + +// To implement an action Foo, define: +// 1. a class FooAction that implements the ActionInterface interface, and +// 2. a factory function that creates an Action object from a +// const FooAction*. +// +// The two-level delegation design follows that of Matcher, providing +// consistency for extension developers. It also eases ownership +// management as Action objects can now be copied like plain values. + +namespace internal { + +template +class ActionAdaptor; + +// BuiltInDefaultValue::Get() returns the "built-in" default +// value for type T, which is NULL when T is a pointer type, 0 when T +// is a numeric type, false when T is bool, or "" when T is string or +// std::string. For any other type T, this value is undefined and the +// function will abort the process. +template +class BuiltInDefaultValue { + public: + // This function returns true iff type T has a built-in default value. + static bool Exists() { return false; } + static T Get() { + Assert(false, __FILE__, __LINE__, + "Default action undefined for the function return type."); + return internal::Invalid(); + // The above statement will never be reached, but is required in + // order for this function to compile. + } +}; + +// This partial specialization says that we use the same built-in +// default value for T and const T. +template +class BuiltInDefaultValue { + public: + static bool Exists() { return BuiltInDefaultValue::Exists(); } + static T Get() { return BuiltInDefaultValue::Get(); } +}; + +// This partial specialization defines the default values for pointer +// types. +template +class BuiltInDefaultValue { + public: + static bool Exists() { return true; } + static T* Get() { return NULL; } +}; + +// The following specializations define the default values for +// specific types we care about. +#define GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(type, value) \ + template <> \ + class BuiltInDefaultValue { \ + public: \ + static bool Exists() { return true; } \ + static type Get() { return value; } \ + } + +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(void, ); // NOLINT +#if GTEST_HAS_GLOBAL_STRING +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(::string, ""); +#endif // GTEST_HAS_GLOBAL_STRING +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(::std::string, ""); +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(bool, false); +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned char, '\0'); +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed char, '\0'); +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(char, '\0'); + +// There's no need for a default action for signed wchar_t, as that +// type is the same as wchar_t for gcc, and invalid for MSVC. +// +// There's also no need for a default action for unsigned wchar_t, as +// that type is the same as unsigned int for gcc, and invalid for +// MSVC. +#if GMOCK_WCHAR_T_IS_NATIVE_ +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(wchar_t, 0U); // NOLINT +#endif + +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned short, 0U); // NOLINT +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed short, 0); // NOLINT +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned int, 0U); +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed int, 0); +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned long, 0UL); // NOLINT +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed long, 0L); // NOLINT +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(UInt64, 0); +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(Int64, 0); +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(float, 0); +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(double, 0); + +#undef GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ + +} // namespace internal + +// When an unexpected function call is encountered, Google Mock will +// let it return a default value if the user has specified one for its +// return type, or if the return type has a built-in default value; +// otherwise Google Mock won't know what value to return and will have +// to abort the process. +// +// The DefaultValue class allows a user to specify the +// default value for a type T that is both copyable and publicly +// destructible (i.e. anything that can be used as a function return +// type). The usage is: +// +// // Sets the default value for type T to be foo. +// DefaultValue::Set(foo); +template +class DefaultValue { + public: + // Sets the default value for type T; requires T to be + // copy-constructable and have a public destructor. + static void Set(T x) { + delete value_; + value_ = new T(x); + } + + // Unsets the default value for type T. + static void Clear() { + delete value_; + value_ = NULL; + } + + // Returns true iff the user has set the default value for type T. + static bool IsSet() { return value_ != NULL; } + + // Returns true if T has a default return value set by the user or there + // exists a built-in default value. + static bool Exists() { + return IsSet() || internal::BuiltInDefaultValue::Exists(); + } + + // Returns the default value for type T if the user has set one; + // otherwise returns the built-in default value if there is one; + // otherwise aborts the process. + static T Get() { + return value_ == NULL ? + internal::BuiltInDefaultValue::Get() : *value_; + } + + private: + static const T* value_; +}; + +// This partial specialization allows a user to set default values for +// reference types. +template +class DefaultValue { + public: + // Sets the default value for type T&. + static void Set(T& x) { // NOLINT + address_ = &x; + } + + // Unsets the default value for type T&. + static void Clear() { + address_ = NULL; + } + + // Returns true iff the user has set the default value for type T&. + static bool IsSet() { return address_ != NULL; } + + // Returns true if T has a default return value set by the user or there + // exists a built-in default value. + static bool Exists() { + return IsSet() || internal::BuiltInDefaultValue::Exists(); + } + + // Returns the default value for type T& if the user has set one; + // otherwise returns the built-in default value if there is one; + // otherwise aborts the process. + static T& Get() { + return address_ == NULL ? + internal::BuiltInDefaultValue::Get() : *address_; + } + + private: + static T* address_; +}; + +// This specialization allows DefaultValue::Get() to +// compile. +template <> +class DefaultValue { + public: + static bool Exists() { return true; } + static void Get() {} +}; + +// Points to the user-set default value for type T. +template +const T* DefaultValue::value_ = NULL; + +// Points to the user-set default value for type T&. +template +T* DefaultValue::address_ = NULL; + +// Implement this interface to define an action for function type F. +template +class ActionInterface { + public: + typedef typename internal::Function::Result Result; + typedef typename internal::Function::ArgumentTuple ArgumentTuple; + + ActionInterface() {} + virtual ~ActionInterface() {} + + // Performs the action. This method is not const, as in general an + // action can have side effects and be stateful. For example, a + // get-the-next-element-from-the-collection action will need to + // remember the current element. + virtual Result Perform(const ArgumentTuple& args) = 0; + + private: + GTEST_DISALLOW_COPY_AND_ASSIGN_(ActionInterface); +}; + +// An Action is a copyable and IMMUTABLE (except by assignment) +// object that represents an action to be taken when a mock function +// of type F is called. The implementation of Action is just a +// linked_ptr to const ActionInterface, so copying is fairly cheap. +// Don't inherit from Action! +// +// You can view an object implementing ActionInterface as a +// concrete action (including its current state), and an Action +// object as a handle to it. +template +class Action { + public: + typedef typename internal::Function::Result Result; + typedef typename internal::Function::ArgumentTuple ArgumentTuple; + + // Constructs a null Action. Needed for storing Action objects in + // STL containers. + Action() : impl_(NULL) {} + + // Constructs an Action from its implementation. A NULL impl is + // used to represent the "do-default" action. + explicit Action(ActionInterface* impl) : impl_(impl) {} + + // Copy constructor. + Action(const Action& action) : impl_(action.impl_) {} + + // This constructor allows us to turn an Action object into an + // Action, as long as F's arguments can be implicitly converted + // to Func's and Func's return type can be implicitly converted to + // F's. + template + explicit Action(const Action& action); + + // Returns true iff this is the DoDefault() action. + bool IsDoDefault() const { return impl_.get() == NULL; } + + // Performs the action. Note that this method is const even though + // the corresponding method in ActionInterface is not. The reason + // is that a const Action means that it cannot be re-bound to + // another concrete action, not that the concrete action it binds to + // cannot change state. (Think of the difference between a const + // pointer and a pointer to const.) + Result Perform(const ArgumentTuple& args) const { + internal::Assert( + !IsDoDefault(), __FILE__, __LINE__, + "You are using DoDefault() inside a composite action like " + "DoAll() or WithArgs(). This is not supported for technical " + "reasons. Please instead spell out the default action, or " + "assign the default action to an Action variable and use " + "the variable in various places."); + return impl_->Perform(args); + } + + private: + template + friend class internal::ActionAdaptor; + + internal::linked_ptr > impl_; +}; + +// The PolymorphicAction class template makes it easy to implement a +// polymorphic action (i.e. an action that can be used in mock +// functions of than one type, e.g. Return()). +// +// To define a polymorphic action, a user first provides a COPYABLE +// implementation class that has a Perform() method template: +// +// class FooAction { +// public: +// template +// Result Perform(const ArgumentTuple& args) const { +// // Processes the arguments and returns a result, using +// // tr1::get(args) to get the N-th (0-based) argument in the tuple. +// } +// ... +// }; +// +// Then the user creates the polymorphic action using +// MakePolymorphicAction(object) where object has type FooAction. See +// the definition of Return(void) and SetArgumentPointee(value) for +// complete examples. +template +class PolymorphicAction { + public: + explicit PolymorphicAction(const Impl& impl) : impl_(impl) {} + + template + operator Action() const { + return Action(new MonomorphicImpl(impl_)); + } + + private: + template + class MonomorphicImpl : public ActionInterface { + public: + typedef typename internal::Function::Result Result; + typedef typename internal::Function::ArgumentTuple ArgumentTuple; + + explicit MonomorphicImpl(const Impl& impl) : impl_(impl) {} + + virtual Result Perform(const ArgumentTuple& args) { + return impl_.template Perform(args); + } + + private: + Impl impl_; + + GTEST_DISALLOW_ASSIGN_(MonomorphicImpl); + }; + + Impl impl_; + + GTEST_DISALLOW_ASSIGN_(PolymorphicAction); +}; + +// Creates an Action from its implementation and returns it. The +// created Action object owns the implementation. +template +Action MakeAction(ActionInterface* impl) { + return Action(impl); +} + +// Creates a polymorphic action from its implementation. This is +// easier to use than the PolymorphicAction constructor as it +// doesn't require you to explicitly write the template argument, e.g. +// +// MakePolymorphicAction(foo); +// vs +// PolymorphicAction(foo); +template +inline PolymorphicAction MakePolymorphicAction(const Impl& impl) { + return PolymorphicAction(impl); +} + +namespace internal { + +// Allows an Action object to pose as an Action, as long as F2 +// and F1 are compatible. +template +class ActionAdaptor : public ActionInterface { + public: + typedef typename internal::Function::Result Result; + typedef typename internal::Function::ArgumentTuple ArgumentTuple; + + explicit ActionAdaptor(const Action& from) : impl_(from.impl_) {} + + virtual Result Perform(const ArgumentTuple& args) { + return impl_->Perform(args); + } + + private: + const internal::linked_ptr > impl_; + + GTEST_DISALLOW_ASSIGN_(ActionAdaptor); +}; + +// Implements the polymorphic Return(x) action, which can be used in +// any function that returns the type of x, regardless of the argument +// types. +// +// Note: The value passed into Return must be converted into +// Function::Result when this action is cast to Action rather than +// when that action is performed. This is important in scenarios like +// +// MOCK_METHOD1(Method, T(U)); +// ... +// { +// Foo foo; +// X x(&foo); +// EXPECT_CALL(mock, Method(_)).WillOnce(Return(x)); +// } +// +// In the example above the variable x holds reference to foo which leaves +// scope and gets destroyed. If copying X just copies a reference to foo, +// that copy will be left with a hanging reference. If conversion to T +// makes a copy of foo, the above code is safe. To support that scenario, we +// need to make sure that the type conversion happens inside the EXPECT_CALL +// statement, and conversion of the result of Return to Action is a +// good place for that. +// +template +class ReturnAction { + public: + // Constructs a ReturnAction object from the value to be returned. + // 'value' is passed by value instead of by const reference in order + // to allow Return("string literal") to compile. + explicit ReturnAction(R value) : value_(value) {} + + // This template type conversion operator allows Return(x) to be + // used in ANY function that returns x's type. + template + operator Action() const { + // Assert statement belongs here because this is the best place to verify + // conditions on F. It produces the clearest error messages + // in most compilers. + // Impl really belongs in this scope as a local class but can't + // because MSVC produces duplicate symbols in different translation units + // in this case. Until MS fixes that bug we put Impl into the class scope + // and put the typedef both here (for use in assert statement) and + // in the Impl class. But both definitions must be the same. + typedef typename Function::Result Result; + GTEST_COMPILE_ASSERT_( + !internal::is_reference::value, + use_ReturnRef_instead_of_Return_to_return_a_reference); + return Action(new Impl(value_)); + } + + private: + // Implements the Return(x) action for a particular function type F. + template + class Impl : public ActionInterface { + public: + typedef typename Function::Result Result; + typedef typename Function::ArgumentTuple ArgumentTuple; + + // The implicit cast is necessary when Result has more than one + // single-argument constructor (e.g. Result is std::vector) and R + // has a type conversion operator template. In that case, value_(value) + // won't compile as the compiler doesn't known which constructor of + // Result to call. ImplicitCast_ forces the compiler to convert R to + // Result without considering explicit constructors, thus resolving the + // ambiguity. value_ is then initialized using its copy constructor. + explicit Impl(R value) + : value_(::testing::internal::ImplicitCast_(value)) {} + + virtual Result Perform(const ArgumentTuple&) { return value_; } + + private: + GTEST_COMPILE_ASSERT_(!internal::is_reference::value, + Result_cannot_be_a_reference_type); + Result value_; + + GTEST_DISALLOW_ASSIGN_(Impl); + }; + + R value_; + + GTEST_DISALLOW_ASSIGN_(ReturnAction); +}; + +// Implements the ReturnNull() action. +class ReturnNullAction { + public: + // Allows ReturnNull() to be used in any pointer-returning function. + template + static Result Perform(const ArgumentTuple&) { + GTEST_COMPILE_ASSERT_(internal::is_pointer::value, + ReturnNull_can_be_used_to_return_a_pointer_only); + return NULL; + } +}; + +// Implements the Return() action. +class ReturnVoidAction { + public: + // Allows Return() to be used in any void-returning function. + template + static void Perform(const ArgumentTuple&) { + CompileAssertTypesEqual(); + } +}; + +// Implements the polymorphic ReturnRef(x) action, which can be used +// in any function that returns a reference to the type of x, +// regardless of the argument types. +template +class ReturnRefAction { + public: + // Constructs a ReturnRefAction object from the reference to be returned. + explicit ReturnRefAction(T& ref) : ref_(ref) {} // NOLINT + + // This template type conversion operator allows ReturnRef(x) to be + // used in ANY function that returns a reference to x's type. + template + operator Action() const { + typedef typename Function::Result Result; + // Asserts that the function return type is a reference. This + // catches the user error of using ReturnRef(x) when Return(x) + // should be used, and generates some helpful error message. + GTEST_COMPILE_ASSERT_(internal::is_reference::value, + use_Return_instead_of_ReturnRef_to_return_a_value); + return Action(new Impl(ref_)); + } + + private: + // Implements the ReturnRef(x) action for a particular function type F. + template + class Impl : public ActionInterface { + public: + typedef typename Function::Result Result; + typedef typename Function::ArgumentTuple ArgumentTuple; + + explicit Impl(T& ref) : ref_(ref) {} // NOLINT + + virtual Result Perform(const ArgumentTuple&) { + return ref_; + } + + private: + T& ref_; + + GTEST_DISALLOW_ASSIGN_(Impl); + }; + + T& ref_; + + GTEST_DISALLOW_ASSIGN_(ReturnRefAction); +}; + +// Implements the polymorphic ReturnRefOfCopy(x) action, which can be +// used in any function that returns a reference to the type of x, +// regardless of the argument types. +template +class ReturnRefOfCopyAction { + public: + // Constructs a ReturnRefOfCopyAction object from the reference to + // be returned. + explicit ReturnRefOfCopyAction(const T& value) : value_(value) {} // NOLINT + + // This template type conversion operator allows ReturnRefOfCopy(x) to be + // used in ANY function that returns a reference to x's type. + template + operator Action() const { + typedef typename Function::Result Result; + // Asserts that the function return type is a reference. This + // catches the user error of using ReturnRefOfCopy(x) when Return(x) + // should be used, and generates some helpful error message. + GTEST_COMPILE_ASSERT_( + internal::is_reference::value, + use_Return_instead_of_ReturnRefOfCopy_to_return_a_value); + return Action(new Impl(value_)); + } + + private: + // Implements the ReturnRefOfCopy(x) action for a particular function type F. + template + class Impl : public ActionInterface { + public: + typedef typename Function::Result Result; + typedef typename Function::ArgumentTuple ArgumentTuple; + + explicit Impl(const T& value) : value_(value) {} // NOLINT + + virtual Result Perform(const ArgumentTuple&) { + return value_; + } + + private: + T value_; + + GTEST_DISALLOW_ASSIGN_(Impl); + }; + + const T value_; + + GTEST_DISALLOW_ASSIGN_(ReturnRefOfCopyAction); +}; + +// Implements the polymorphic DoDefault() action. +class DoDefaultAction { + public: + // This template type conversion operator allows DoDefault() to be + // used in any function. + template + operator Action() const { return Action(NULL); } +}; + +// Implements the Assign action to set a given pointer referent to a +// particular value. +template +class AssignAction { + public: + AssignAction(T1* ptr, T2 value) : ptr_(ptr), value_(value) {} + + template + void Perform(const ArgumentTuple& /* args */) const { + *ptr_ = value_; + } + + private: + T1* const ptr_; + const T2 value_; + + GTEST_DISALLOW_ASSIGN_(AssignAction); +}; + +#if !GTEST_OS_WINDOWS_MOBILE + +// Implements the SetErrnoAndReturn action to simulate return from +// various system calls and libc functions. +template +class SetErrnoAndReturnAction { + public: + SetErrnoAndReturnAction(int errno_value, T result) + : errno_(errno_value), + result_(result) {} + template + Result Perform(const ArgumentTuple& /* args */) const { + errno = errno_; + return result_; + } + + private: + const int errno_; + const T result_; + + GTEST_DISALLOW_ASSIGN_(SetErrnoAndReturnAction); +}; + +#endif // !GTEST_OS_WINDOWS_MOBILE + +// Implements the SetArgumentPointee(x) action for any function +// whose N-th argument (0-based) is a pointer to x's type. The +// template parameter kIsProto is true iff type A is ProtocolMessage, +// proto2::Message, or a sub-class of those. +template +class SetArgumentPointeeAction { + public: + // Constructs an action that sets the variable pointed to by the + // N-th function argument to 'value'. + explicit SetArgumentPointeeAction(const A& value) : value_(value) {} + + template + void Perform(const ArgumentTuple& args) const { + CompileAssertTypesEqual(); + *::std::tr1::get(args) = value_; + } + + private: + const A value_; + + GTEST_DISALLOW_ASSIGN_(SetArgumentPointeeAction); +}; + +template +class SetArgumentPointeeAction { + public: + // Constructs an action that sets the variable pointed to by the + // N-th function argument to 'proto'. Both ProtocolMessage and + // proto2::Message have the CopyFrom() method, so the same + // implementation works for both. + explicit SetArgumentPointeeAction(const Proto& proto) : proto_(new Proto) { + proto_->CopyFrom(proto); + } + + template + void Perform(const ArgumentTuple& args) const { + CompileAssertTypesEqual(); + ::std::tr1::get(args)->CopyFrom(*proto_); + } + + private: + const internal::linked_ptr proto_; + + GTEST_DISALLOW_ASSIGN_(SetArgumentPointeeAction); +}; + +// Implements the InvokeWithoutArgs(f) action. The template argument +// FunctionImpl is the implementation type of f, which can be either a +// function pointer or a functor. InvokeWithoutArgs(f) can be used as an +// Action as long as f's type is compatible with F (i.e. f can be +// assigned to a tr1::function). +template +class InvokeWithoutArgsAction { + public: + // The c'tor makes a copy of function_impl (either a function + // pointer or a functor). + explicit InvokeWithoutArgsAction(FunctionImpl function_impl) + : function_impl_(function_impl) {} + + // Allows InvokeWithoutArgs(f) to be used as any action whose type is + // compatible with f. + template + Result Perform(const ArgumentTuple&) { return function_impl_(); } + + private: + FunctionImpl function_impl_; + + GTEST_DISALLOW_ASSIGN_(InvokeWithoutArgsAction); +}; + +// Implements the InvokeWithoutArgs(object_ptr, &Class::Method) action. +template +class InvokeMethodWithoutArgsAction { + public: + InvokeMethodWithoutArgsAction(Class* obj_ptr, MethodPtr method_ptr) + : obj_ptr_(obj_ptr), method_ptr_(method_ptr) {} + + template + Result Perform(const ArgumentTuple&) const { + return (obj_ptr_->*method_ptr_)(); + } + + private: + Class* const obj_ptr_; + const MethodPtr method_ptr_; + + GTEST_DISALLOW_ASSIGN_(InvokeMethodWithoutArgsAction); +}; + +// Implements the IgnoreResult(action) action. +template +class IgnoreResultAction { + public: + explicit IgnoreResultAction(const A& action) : action_(action) {} + + template + operator Action() const { + // Assert statement belongs here because this is the best place to verify + // conditions on F. It produces the clearest error messages + // in most compilers. + // Impl really belongs in this scope as a local class but can't + // because MSVC produces duplicate symbols in different translation units + // in this case. Until MS fixes that bug we put Impl into the class scope + // and put the typedef both here (for use in assert statement) and + // in the Impl class. But both definitions must be the same. + typedef typename internal::Function::Result Result; + + // Asserts at compile time that F returns void. + CompileAssertTypesEqual(); + + return Action(new Impl(action_)); + } + + private: + template + class Impl : public ActionInterface { + public: + typedef typename internal::Function::Result Result; + typedef typename internal::Function::ArgumentTuple ArgumentTuple; + + explicit Impl(const A& action) : action_(action) {} + + virtual void Perform(const ArgumentTuple& args) { + // Performs the action and ignores its result. + action_.Perform(args); + } + + private: + // Type OriginalFunction is the same as F except that its return + // type is IgnoredValue. + typedef typename internal::Function::MakeResultIgnoredValue + OriginalFunction; + + const Action action_; + + GTEST_DISALLOW_ASSIGN_(Impl); + }; + + const A action_; + + GTEST_DISALLOW_ASSIGN_(IgnoreResultAction); +}; + +// A ReferenceWrapper object represents a reference to type T, +// which can be either const or not. It can be explicitly converted +// from, and implicitly converted to, a T&. Unlike a reference, +// ReferenceWrapper can be copied and can survive template type +// inference. This is used to support by-reference arguments in the +// InvokeArgument(...) action. The idea was from "reference +// wrappers" in tr1, which we don't have in our source tree yet. +template +class ReferenceWrapper { + public: + // Constructs a ReferenceWrapper object from a T&. + explicit ReferenceWrapper(T& l_value) : pointer_(&l_value) {} // NOLINT + + // Allows a ReferenceWrapper object to be implicitly converted to + // a T&. + operator T&() const { return *pointer_; } + private: + T* pointer_; +}; + +// Allows the expression ByRef(x) to be printed as a reference to x. +template +void PrintTo(const ReferenceWrapper& ref, ::std::ostream* os) { + T& value = ref; + UniversalPrinter::Print(value, os); +} + +// Does two actions sequentially. Used for implementing the DoAll(a1, +// a2, ...) action. +template +class DoBothAction { + public: + DoBothAction(Action1 action1, Action2 action2) + : action1_(action1), action2_(action2) {} + + // This template type conversion operator allows DoAll(a1, ..., a_n) + // to be used in ANY function of compatible type. + template + operator Action() const { + return Action(new Impl(action1_, action2_)); + } + + private: + // Implements the DoAll(...) action for a particular function type F. + template + class Impl : public ActionInterface { + public: + typedef typename Function::Result Result; + typedef typename Function::ArgumentTuple ArgumentTuple; + typedef typename Function::MakeResultVoid VoidResult; + + Impl(const Action& action1, const Action& action2) + : action1_(action1), action2_(action2) {} + + virtual Result Perform(const ArgumentTuple& args) { + action1_.Perform(args); + return action2_.Perform(args); + } + + private: + const Action action1_; + const Action action2_; + + GTEST_DISALLOW_ASSIGN_(Impl); + }; + + Action1 action1_; + Action2 action2_; + + GTEST_DISALLOW_ASSIGN_(DoBothAction); +}; + +} // namespace internal + +// An Unused object can be implicitly constructed from ANY value. +// This is handy when defining actions that ignore some or all of the +// mock function arguments. For example, given +// +// MOCK_METHOD3(Foo, double(const string& label, double x, double y)); +// MOCK_METHOD3(Bar, double(int index, double x, double y)); +// +// instead of +// +// double DistanceToOriginWithLabel(const string& label, double x, double y) { +// return sqrt(x*x + y*y); +// } +// double DistanceToOriginWithIndex(int index, double x, double y) { +// return sqrt(x*x + y*y); +// } +// ... +// EXEPCT_CALL(mock, Foo("abc", _, _)) +// .WillOnce(Invoke(DistanceToOriginWithLabel)); +// EXEPCT_CALL(mock, Bar(5, _, _)) +// .WillOnce(Invoke(DistanceToOriginWithIndex)); +// +// you could write +// +// // We can declare any uninteresting argument as Unused. +// double DistanceToOrigin(Unused, double x, double y) { +// return sqrt(x*x + y*y); +// } +// ... +// EXEPCT_CALL(mock, Foo("abc", _, _)).WillOnce(Invoke(DistanceToOrigin)); +// EXEPCT_CALL(mock, Bar(5, _, _)).WillOnce(Invoke(DistanceToOrigin)); +typedef internal::IgnoredValue Unused; + +// This constructor allows us to turn an Action object into an +// Action, as long as To's arguments can be implicitly converted +// to From's and From's return type cann be implicitly converted to +// To's. +template +template +Action::Action(const Action& from) + : impl_(new internal::ActionAdaptor(from)) {} + +// Creates an action that returns 'value'. 'value' is passed by value +// instead of const reference - otherwise Return("string literal") +// will trigger a compiler error about using array as initializer. +template +internal::ReturnAction Return(R value) { + return internal::ReturnAction(value); +} + +// Creates an action that returns NULL. +inline PolymorphicAction ReturnNull() { + return MakePolymorphicAction(internal::ReturnNullAction()); +} + +// Creates an action that returns from a void function. +inline PolymorphicAction Return() { + return MakePolymorphicAction(internal::ReturnVoidAction()); +} + +// Creates an action that returns the reference to a variable. +template +inline internal::ReturnRefAction ReturnRef(R& x) { // NOLINT + return internal::ReturnRefAction(x); +} + +// Creates an action that returns the reference to a copy of the +// argument. The copy is created when the action is constructed and +// lives as long as the action. +template +inline internal::ReturnRefOfCopyAction ReturnRefOfCopy(const R& x) { + return internal::ReturnRefOfCopyAction(x); +} + +// Creates an action that does the default action for the give mock function. +inline internal::DoDefaultAction DoDefault() { + return internal::DoDefaultAction(); +} + +// Creates an action that sets the variable pointed by the N-th +// (0-based) function argument to 'value'. +template +PolymorphicAction< + internal::SetArgumentPointeeAction< + N, T, internal::IsAProtocolMessage::value> > +SetArgPointee(const T& x) { + return MakePolymorphicAction(internal::SetArgumentPointeeAction< + N, T, internal::IsAProtocolMessage::value>(x)); +} + +#if !((GTEST_GCC_VER_ && GTEST_GCC_VER_ < 40000) || GTEST_OS_SYMBIAN) +// This overload allows SetArgPointee() to accept a string literal. +// GCC prior to the version 4.0 and Symbian C++ compiler cannot distinguish +// this overload from the templated version and emit a compile error. +template +PolymorphicAction< + internal::SetArgumentPointeeAction > +SetArgPointee(const char* p) { + return MakePolymorphicAction(internal::SetArgumentPointeeAction< + N, const char*, false>(p)); +} + +template +PolymorphicAction< + internal::SetArgumentPointeeAction > +SetArgPointee(const wchar_t* p) { + return MakePolymorphicAction(internal::SetArgumentPointeeAction< + N, const wchar_t*, false>(p)); +} +#endif + +// The following version is DEPRECATED. +template +PolymorphicAction< + internal::SetArgumentPointeeAction< + N, T, internal::IsAProtocolMessage::value> > +SetArgumentPointee(const T& x) { + return MakePolymorphicAction(internal::SetArgumentPointeeAction< + N, T, internal::IsAProtocolMessage::value>(x)); +} + +// Creates an action that sets a pointer referent to a given value. +template +PolymorphicAction > Assign(T1* ptr, T2 val) { + return MakePolymorphicAction(internal::AssignAction(ptr, val)); +} + +#if !GTEST_OS_WINDOWS_MOBILE + +// Creates an action that sets errno and returns the appropriate error. +template +PolymorphicAction > +SetErrnoAndReturn(int errval, T result) { + return MakePolymorphicAction( + internal::SetErrnoAndReturnAction(errval, result)); +} + +#endif // !GTEST_OS_WINDOWS_MOBILE + +// Various overloads for InvokeWithoutArgs(). + +// Creates an action that invokes 'function_impl' with no argument. +template +PolymorphicAction > +InvokeWithoutArgs(FunctionImpl function_impl) { + return MakePolymorphicAction( + internal::InvokeWithoutArgsAction(function_impl)); +} + +// Creates an action that invokes the given method on the given object +// with no argument. +template +PolymorphicAction > +InvokeWithoutArgs(Class* obj_ptr, MethodPtr method_ptr) { + return MakePolymorphicAction( + internal::InvokeMethodWithoutArgsAction( + obj_ptr, method_ptr)); +} + +// Creates an action that performs an_action and throws away its +// result. In other words, it changes the return type of an_action to +// void. an_action MUST NOT return void, or the code won't compile. +template +inline internal::IgnoreResultAction IgnoreResult(const A& an_action) { + return internal::IgnoreResultAction(an_action); +} + +// Creates a reference wrapper for the given L-value. If necessary, +// you can explicitly specify the type of the reference. For example, +// suppose 'derived' is an object of type Derived, ByRef(derived) +// would wrap a Derived&. If you want to wrap a const Base& instead, +// where Base is a base class of Derived, just write: +// +// ByRef(derived) +template +inline internal::ReferenceWrapper ByRef(T& l_value) { // NOLINT + return internal::ReferenceWrapper(l_value); +} + +} // namespace testing + +#endif // GMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_ +// Copyright 2007, 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. +// +// Author: wan@google.com (Zhanyong Wan) + +// Google Mock - a framework for writing C++ mock classes. +// +// This file implements some commonly used cardinalities. More +// cardinalities can be defined by the user implementing the +// CardinalityInterface interface if necessary. + +#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_ +#define GMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_ + +#include +#include // NOLINT + +namespace testing { + +// To implement a cardinality Foo, define: +// 1. a class FooCardinality that implements the +// CardinalityInterface interface, and +// 2. a factory function that creates a Cardinality object from a +// const FooCardinality*. +// +// The two-level delegation design follows that of Matcher, providing +// consistency for extension developers. It also eases ownership +// management as Cardinality objects can now be copied like plain values. + +// The implementation of a cardinality. +class CardinalityInterface { + public: + virtual ~CardinalityInterface() {} + + // Conservative estimate on the lower/upper bound of the number of + // calls allowed. + virtual int ConservativeLowerBound() const { return 0; } + virtual int ConservativeUpperBound() const { return INT_MAX; } + + // Returns true iff call_count calls will satisfy this cardinality. + virtual bool IsSatisfiedByCallCount(int call_count) const = 0; + + // Returns true iff call_count calls will saturate this cardinality. + virtual bool IsSaturatedByCallCount(int call_count) const = 0; + + // Describes self to an ostream. + virtual void DescribeTo(::std::ostream* os) const = 0; +}; + +// A Cardinality is a copyable and IMMUTABLE (except by assignment) +// object that specifies how many times a mock function is expected to +// be called. The implementation of Cardinality is just a linked_ptr +// to const CardinalityInterface, so copying is fairly cheap. +// Don't inherit from Cardinality! +class GTEST_API_ Cardinality { + public: + // Constructs a null cardinality. Needed for storing Cardinality + // objects in STL containers. + Cardinality() {} + + // Constructs a Cardinality from its implementation. + explicit Cardinality(const CardinalityInterface* impl) : impl_(impl) {} + + // Conservative estimate on the lower/upper bound of the number of + // calls allowed. + int ConservativeLowerBound() const { return impl_->ConservativeLowerBound(); } + int ConservativeUpperBound() const { return impl_->ConservativeUpperBound(); } + + // Returns true iff call_count calls will satisfy this cardinality. + bool IsSatisfiedByCallCount(int call_count) const { + return impl_->IsSatisfiedByCallCount(call_count); + } + + // Returns true iff call_count calls will saturate this cardinality. + bool IsSaturatedByCallCount(int call_count) const { + return impl_->IsSaturatedByCallCount(call_count); + } + + // Returns true iff call_count calls will over-saturate this + // cardinality, i.e. exceed the maximum number of allowed calls. + bool IsOverSaturatedByCallCount(int call_count) const { + return impl_->IsSaturatedByCallCount(call_count) && + !impl_->IsSatisfiedByCallCount(call_count); + } + + // Describes self to an ostream + void DescribeTo(::std::ostream* os) const { impl_->DescribeTo(os); } + + // Describes the given actual call count to an ostream. + static void DescribeActualCallCountTo(int actual_call_count, + ::std::ostream* os); + + private: + internal::linked_ptr impl_; +}; + +// Creates a cardinality that allows at least n calls. +GTEST_API_ Cardinality AtLeast(int n); + +// Creates a cardinality that allows at most n calls. +GTEST_API_ Cardinality AtMost(int n); + +// Creates a cardinality that allows any number of calls. +GTEST_API_ Cardinality AnyNumber(); + +// Creates a cardinality that allows between min and max calls. +GTEST_API_ Cardinality Between(int min, int max); + +// Creates a cardinality that allows exactly n calls. +GTEST_API_ Cardinality Exactly(int n); + +// Creates a cardinality from its implementation. +inline Cardinality MakeCardinality(const CardinalityInterface* c) { + return Cardinality(c); +} + +} // namespace testing + +#endif // GMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_ +// This file was GENERATED by a script. DO NOT EDIT BY HAND!!! + +// Copyright 2007, 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. +// +// Author: wan@google.com (Zhanyong Wan) + +// Google Mock - a framework for writing C++ mock classes. +// +// This file implements some commonly used variadic actions. + +#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_ +#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_ + + +namespace testing { +namespace internal { + +// InvokeHelper knows how to unpack an N-tuple and invoke an N-ary +// function or method with the unpacked values, where F is a function +// type that takes N arguments. +template +class InvokeHelper; + +template +class InvokeHelper > { + public: + template + static R Invoke(Function function, const ::std::tr1::tuple<>&) { + return function(); + } + + template + static R InvokeMethod(Class* obj_ptr, + MethodPtr method_ptr, + const ::std::tr1::tuple<>&) { + return (obj_ptr->*method_ptr)(); + } +}; + +template +class InvokeHelper > { + public: + template + static R Invoke(Function function, const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return function(get<0>(args)); + } + + template + static R InvokeMethod(Class* obj_ptr, + MethodPtr method_ptr, + const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return (obj_ptr->*method_ptr)(get<0>(args)); + } +}; + +template +class InvokeHelper > { + public: + template + static R Invoke(Function function, const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return function(get<0>(args), get<1>(args)); + } + + template + static R InvokeMethod(Class* obj_ptr, + MethodPtr method_ptr, + const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args)); + } +}; + +template +class InvokeHelper > { + public: + template + static R Invoke(Function function, const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return function(get<0>(args), get<1>(args), get<2>(args)); + } + + template + static R InvokeMethod(Class* obj_ptr, + MethodPtr method_ptr, + const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args)); + } +}; + +template +class InvokeHelper > { + public: + template + static R Invoke(Function function, const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args)); + } + + template + static R InvokeMethod(Class* obj_ptr, + MethodPtr method_ptr, + const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args), + get<3>(args)); + } +}; + +template +class InvokeHelper > { + public: + template + static R Invoke(Function function, const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args), + get<4>(args)); + } + + template + static R InvokeMethod(Class* obj_ptr, + MethodPtr method_ptr, + const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args), + get<3>(args), get<4>(args)); + } +}; + +template +class InvokeHelper > { + public: + template + static R Invoke(Function function, const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args), + get<4>(args), get<5>(args)); + } + + template + static R InvokeMethod(Class* obj_ptr, + MethodPtr method_ptr, + const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args), + get<3>(args), get<4>(args), get<5>(args)); + } +}; + +template +class InvokeHelper > { + public: + template + static R Invoke(Function function, const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args), + get<4>(args), get<5>(args), get<6>(args)); + } + + template + static R InvokeMethod(Class* obj_ptr, + MethodPtr method_ptr, + const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args), + get<3>(args), get<4>(args), get<5>(args), get<6>(args)); + } +}; + +template +class InvokeHelper > { + public: + template + static R Invoke(Function function, const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args), + get<4>(args), get<5>(args), get<6>(args), get<7>(args)); + } + + template + static R InvokeMethod(Class* obj_ptr, + MethodPtr method_ptr, + const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args), + get<3>(args), get<4>(args), get<5>(args), get<6>(args), get<7>(args)); + } +}; + +template +class InvokeHelper > { + public: + template + static R Invoke(Function function, const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args), + get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args)); + } + + template + static R InvokeMethod(Class* obj_ptr, + MethodPtr method_ptr, + const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args), + get<3>(args), get<4>(args), get<5>(args), get<6>(args), get<7>(args), + get<8>(args)); + } +}; + +template +class InvokeHelper > { + public: + template + static R Invoke(Function function, const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args), + get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args), + get<9>(args)); + } + + template + static R InvokeMethod(Class* obj_ptr, + MethodPtr method_ptr, + const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args), + get<3>(args), get<4>(args), get<5>(args), get<6>(args), get<7>(args), + get<8>(args), get<9>(args)); + } +}; + +// CallableHelper has static methods for invoking "callables", +// i.e. function pointers and functors. It uses overloading to +// provide a uniform interface for invoking different kinds of +// callables. In particular, you can use: +// +// CallableHelper::Call(callable, a1, a2, ..., an) +// +// to invoke an n-ary callable, where R is its return type. If an +// argument, say a2, needs to be passed by reference, you should write +// ByRef(a2) instead of a2 in the above expression. +template +class CallableHelper { + public: + // Calls a nullary callable. + template + static R Call(Function function) { return function(); } + + // Calls a unary callable. + + // We deliberately pass a1 by value instead of const reference here + // in case it is a C-string literal. If we had declared the + // parameter as 'const A1& a1' and write Call(function, "Hi"), the + // compiler would've thought A1 is 'char[3]', which causes trouble + // when you need to copy a value of type A1. By declaring the + // parameter as 'A1 a1', the compiler will correctly infer that A1 + // is 'const char*' when it sees Call(function, "Hi"). + // + // Since this function is defined inline, the compiler can get rid + // of the copying of the arguments. Therefore the performance won't + // be hurt. + template + static R Call(Function function, A1 a1) { return function(a1); } + + // Calls a binary callable. + template + static R Call(Function function, A1 a1, A2 a2) { + return function(a1, a2); + } + + // Calls a ternary callable. + template + static R Call(Function function, A1 a1, A2 a2, A3 a3) { + return function(a1, a2, a3); + } + + // Calls a 4-ary callable. + template + static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4) { + return function(a1, a2, a3, a4); + } + + // Calls a 5-ary callable. + template + static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { + return function(a1, a2, a3, a4, a5); + } + + // Calls a 6-ary callable. + template + static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) { + return function(a1, a2, a3, a4, a5, a6); + } + + // Calls a 7-ary callable. + template + static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, + A7 a7) { + return function(a1, a2, a3, a4, a5, a6, a7); + } + + // Calls a 8-ary callable. + template + static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, + A7 a7, A8 a8) { + return function(a1, a2, a3, a4, a5, a6, a7, a8); + } + + // Calls a 9-ary callable. + template + static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, + A7 a7, A8 a8, A9 a9) { + return function(a1, a2, a3, a4, a5, a6, a7, a8, a9); + } + + // Calls a 10-ary callable. + template + static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, + A7 a7, A8 a8, A9 a9, A10 a10) { + return function(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); + } +}; // class CallableHelper + +// An INTERNAL macro for extracting the type of a tuple field. It's +// subject to change without notice - DO NOT USE IN USER CODE! +#define GMOCK_FIELD_(Tuple, N) \ + typename ::std::tr1::tuple_element::type + +// SelectArgs::type is the +// type of an n-ary function whose i-th (1-based) argument type is the +// k{i}-th (0-based) field of ArgumentTuple, which must be a tuple +// type, and whose return type is Result. For example, +// SelectArgs, 0, 3>::type +// is int(bool, long). +// +// SelectArgs::Select(args) +// returns the selected fields (k1, k2, ..., k_n) of args as a tuple. +// For example, +// SelectArgs, 2, 0>::Select( +// ::std::tr1::make_tuple(true, 'a', 2.5)) +// returns ::std::tr1::tuple (2.5, true). +// +// The numbers in list k1, k2, ..., k_n must be >= 0, where n can be +// in the range [0, 10]. Duplicates are allowed and they don't have +// to be in an ascending or descending order. + +template +class SelectArgs { + public: + typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), + GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), + GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5), + GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7), + GMOCK_FIELD_(ArgumentTuple, k8), GMOCK_FIELD_(ArgumentTuple, k9), + GMOCK_FIELD_(ArgumentTuple, k10)); + typedef typename Function::ArgumentTuple SelectedArgs; + static SelectedArgs Select(const ArgumentTuple& args) { + using ::std::tr1::get; + return SelectedArgs(get(args), get(args), get(args), + get(args), get(args), get(args), get(args), + get(args), get(args), get(args)); + } +}; + +template +class SelectArgs { + public: + typedef Result type(); + typedef typename Function::ArgumentTuple SelectedArgs; + static SelectedArgs Select(const ArgumentTuple& /* args */) { + using ::std::tr1::get; + return SelectedArgs(); + } +}; + +template +class SelectArgs { + public: + typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1)); + typedef typename Function::ArgumentTuple SelectedArgs; + static SelectedArgs Select(const ArgumentTuple& args) { + using ::std::tr1::get; + return SelectedArgs(get(args)); + } +}; + +template +class SelectArgs { + public: + typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), + GMOCK_FIELD_(ArgumentTuple, k2)); + typedef typename Function::ArgumentTuple SelectedArgs; + static SelectedArgs Select(const ArgumentTuple& args) { + using ::std::tr1::get; + return SelectedArgs(get(args), get(args)); + } +}; + +template +class SelectArgs { + public: + typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), + GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3)); + typedef typename Function::ArgumentTuple SelectedArgs; + static SelectedArgs Select(const ArgumentTuple& args) { + using ::std::tr1::get; + return SelectedArgs(get(args), get(args), get(args)); + } +}; + +template +class SelectArgs { + public: + typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), + GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), + GMOCK_FIELD_(ArgumentTuple, k4)); + typedef typename Function::ArgumentTuple SelectedArgs; + static SelectedArgs Select(const ArgumentTuple& args) { + using ::std::tr1::get; + return SelectedArgs(get(args), get(args), get(args), + get(args)); + } +}; + +template +class SelectArgs { + public: + typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), + GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), + GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5)); + typedef typename Function::ArgumentTuple SelectedArgs; + static SelectedArgs Select(const ArgumentTuple& args) { + using ::std::tr1::get; + return SelectedArgs(get(args), get(args), get(args), + get(args), get(args)); + } +}; + +template +class SelectArgs { + public: + typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), + GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), + GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5), + GMOCK_FIELD_(ArgumentTuple, k6)); + typedef typename Function::ArgumentTuple SelectedArgs; + static SelectedArgs Select(const ArgumentTuple& args) { + using ::std::tr1::get; + return SelectedArgs(get(args), get(args), get(args), + get(args), get(args), get(args)); + } +}; + +template +class SelectArgs { + public: + typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), + GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), + GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5), + GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7)); + typedef typename Function::ArgumentTuple SelectedArgs; + static SelectedArgs Select(const ArgumentTuple& args) { + using ::std::tr1::get; + return SelectedArgs(get(args), get(args), get(args), + get(args), get(args), get(args), get(args)); + } +}; + +template +class SelectArgs { + public: + typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), + GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), + GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5), + GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7), + GMOCK_FIELD_(ArgumentTuple, k8)); + typedef typename Function::ArgumentTuple SelectedArgs; + static SelectedArgs Select(const ArgumentTuple& args) { + using ::std::tr1::get; + return SelectedArgs(get(args), get(args), get(args), + get(args), get(args), get(args), get(args), + get(args)); + } +}; + +template +class SelectArgs { + public: + typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), + GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), + GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5), + GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7), + GMOCK_FIELD_(ArgumentTuple, k8), GMOCK_FIELD_(ArgumentTuple, k9)); + typedef typename Function::ArgumentTuple SelectedArgs; + static SelectedArgs Select(const ArgumentTuple& args) { + using ::std::tr1::get; + return SelectedArgs(get(args), get(args), get(args), + get(args), get(args), get(args), get(args), + get(args), get(args)); + } +}; + +#undef GMOCK_FIELD_ + +// Implements the WithArgs action. +template +class WithArgsAction { + public: + explicit WithArgsAction(const InnerAction& action) : action_(action) {} + + template + operator Action() const { return MakeAction(new Impl(action_)); } + + private: + template + class Impl : public ActionInterface { + public: + typedef typename Function::Result Result; + typedef typename Function::ArgumentTuple ArgumentTuple; + + explicit Impl(const InnerAction& action) : action_(action) {} + + virtual Result Perform(const ArgumentTuple& args) { + return action_.Perform(SelectArgs::Select(args)); + } + + private: + typedef typename SelectArgs::type InnerFunctionType; + + Action action_; + }; + + const InnerAction action_; + + GTEST_DISALLOW_ASSIGN_(WithArgsAction); +}; + +// A macro from the ACTION* family (defined later in this file) +// defines an action that can be used in a mock function. Typically, +// these actions only care about a subset of the arguments of the mock +// function. For example, if such an action only uses the second +// argument, it can be used in any mock function that takes >= 2 +// arguments where the type of the second argument is compatible. +// +// Therefore, the action implementation must be prepared to take more +// arguments than it needs. The ExcessiveArg type is used to +// represent those excessive arguments. In order to keep the compiler +// error messages tractable, we define it in the testing namespace +// instead of testing::internal. However, this is an INTERNAL TYPE +// and subject to change without notice, so a user MUST NOT USE THIS +// TYPE DIRECTLY. +struct ExcessiveArg {}; + +// A helper class needed for implementing the ACTION* macros. +template +class ActionHelper { + public: + static Result Perform(Impl* impl, const ::std::tr1::tuple<>& args) { + using ::std::tr1::get; + return impl->template gmock_PerformImpl<>(args, ExcessiveArg(), + ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), + ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), + ExcessiveArg()); + } + + template + static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return impl->template gmock_PerformImpl(args, get<0>(args), + ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), + ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), + ExcessiveArg()); + } + + template + static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return impl->template gmock_PerformImpl(args, get<0>(args), + get<1>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), + ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), + ExcessiveArg()); + } + + template + static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return impl->template gmock_PerformImpl(args, get<0>(args), + get<1>(args), get<2>(args), ExcessiveArg(), ExcessiveArg(), + ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), + ExcessiveArg()); + } + + template + static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return impl->template gmock_PerformImpl(args, get<0>(args), + get<1>(args), get<2>(args), get<3>(args), ExcessiveArg(), + ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), + ExcessiveArg()); + } + + template + static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return impl->template gmock_PerformImpl(args, + get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args), + ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), + ExcessiveArg()); + } + + template + static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return impl->template gmock_PerformImpl(args, + get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args), + get<5>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), + ExcessiveArg()); + } + + template + static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return impl->template gmock_PerformImpl(args, + get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args), + get<5>(args), get<6>(args), ExcessiveArg(), ExcessiveArg(), + ExcessiveArg()); + } + + template + static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return impl->template gmock_PerformImpl(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args), + get<4>(args), get<5>(args), get<6>(args), get<7>(args), ExcessiveArg(), + ExcessiveArg()); + } + + template + static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return impl->template gmock_PerformImpl(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args), + get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args), + ExcessiveArg()); + } + + template + static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return impl->template gmock_PerformImpl(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args), + get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args), + get<9>(args)); + } +}; + +} // namespace internal + +// Various overloads for Invoke(). + +// WithArgs(an_action) creates an action that passes +// the selected arguments of the mock function to an_action and +// performs it. It serves as an adaptor between actions with +// different argument lists. C++ doesn't support default arguments for +// function templates, so we have to overload it. +template +inline internal::WithArgsAction +WithArgs(const InnerAction& action) { + return internal::WithArgsAction(action); +} + +template +inline internal::WithArgsAction +WithArgs(const InnerAction& action) { + return internal::WithArgsAction(action); +} + +template +inline internal::WithArgsAction +WithArgs(const InnerAction& action) { + return internal::WithArgsAction(action); +} + +template +inline internal::WithArgsAction +WithArgs(const InnerAction& action) { + return internal::WithArgsAction(action); +} + +template +inline internal::WithArgsAction +WithArgs(const InnerAction& action) { + return internal::WithArgsAction(action); +} + +template +inline internal::WithArgsAction +WithArgs(const InnerAction& action) { + return internal::WithArgsAction(action); +} + +template +inline internal::WithArgsAction +WithArgs(const InnerAction& action) { + return internal::WithArgsAction(action); +} + +template +inline internal::WithArgsAction +WithArgs(const InnerAction& action) { + return internal::WithArgsAction(action); +} + +template +inline internal::WithArgsAction +WithArgs(const InnerAction& action) { + return internal::WithArgsAction(action); +} + +template +inline internal::WithArgsAction +WithArgs(const InnerAction& action) { + return internal::WithArgsAction(action); +} + +// Creates an action that does actions a1, a2, ..., sequentially in +// each invocation. +template +inline internal::DoBothAction +DoAll(Action1 a1, Action2 a2) { + return internal::DoBothAction(a1, a2); +} + +template +inline internal::DoBothAction > +DoAll(Action1 a1, Action2 a2, Action3 a3) { + return DoAll(a1, DoAll(a2, a3)); +} + +template +inline internal::DoBothAction > > +DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4) { + return DoAll(a1, DoAll(a2, a3, a4)); +} + +template +inline internal::DoBothAction > > > +DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5) { + return DoAll(a1, DoAll(a2, a3, a4, a5)); +} + +template +inline internal::DoBothAction > > > > +DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6) { + return DoAll(a1, DoAll(a2, a3, a4, a5, a6)); +} + +template +inline internal::DoBothAction > > > > > +DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, + Action7 a7) { + return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7)); +} + +template +inline internal::DoBothAction > > > > > > +DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, + Action7 a7, Action8 a8) { + return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7, a8)); +} + +template +inline internal::DoBothAction > > > > > > > +DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, + Action7 a7, Action8 a8, Action9 a9) { + return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7, a8, a9)); +} + +template +inline internal::DoBothAction > > > > > > > > +DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, + Action7 a7, Action8 a8, Action9 a9, Action10 a10) { + return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7, a8, a9, a10)); +} + +} // namespace testing + +// The ACTION* family of macros can be used in a namespace scope to +// define custom actions easily. The syntax: +// +// ACTION(name) { statements; } +// +// will define an action with the given name that executes the +// statements. The value returned by the statements will be used as +// the return value of the action. Inside the statements, you can +// refer to the K-th (0-based) argument of the mock function by +// 'argK', and refer to its type by 'argK_type'. For example: +// +// ACTION(IncrementArg1) { +// arg1_type temp = arg1; +// return ++(*temp); +// } +// +// allows you to write +// +// ...WillOnce(IncrementArg1()); +// +// You can also refer to the entire argument tuple and its type by +// 'args' and 'args_type', and refer to the mock function type and its +// return type by 'function_type' and 'return_type'. +// +// Note that you don't need to specify the types of the mock function +// arguments. However rest assured that your code is still type-safe: +// you'll get a compiler error if *arg1 doesn't support the ++ +// operator, or if the type of ++(*arg1) isn't compatible with the +// mock function's return type, for example. +// +// Sometimes you'll want to parameterize the action. For that you can use +// another macro: +// +// ACTION_P(name, param_name) { statements; } +// +// For example: +// +// ACTION_P(Add, n) { return arg0 + n; } +// +// will allow you to write: +// +// ...WillOnce(Add(5)); +// +// Note that you don't need to provide the type of the parameter +// either. If you need to reference the type of a parameter named +// 'foo', you can write 'foo_type'. For example, in the body of +// ACTION_P(Add, n) above, you can write 'n_type' to refer to the type +// of 'n'. +// +// We also provide ACTION_P2, ACTION_P3, ..., up to ACTION_P10 to support +// multi-parameter actions. +// +// For the purpose of typing, you can view +// +// ACTION_Pk(Foo, p1, ..., pk) { ... } +// +// as shorthand for +// +// template +// FooActionPk Foo(p1_type p1, ..., pk_type pk) { ... } +// +// In particular, you can provide the template type arguments +// explicitly when invoking Foo(), as in Foo(5, false); +// although usually you can rely on the compiler to infer the types +// for you automatically. You can assign the result of expression +// Foo(p1, ..., pk) to a variable of type FooActionPk. This can be useful when composing actions. +// +// You can also overload actions with different numbers of parameters: +// +// ACTION_P(Plus, a) { ... } +// ACTION_P2(Plus, a, b) { ... } +// +// While it's tempting to always use the ACTION* macros when defining +// a new action, you should also consider implementing ActionInterface +// or using MakePolymorphicAction() instead, especially if you need to +// use the action a lot. While these approaches require more work, +// they give you more control on the types of the mock function +// arguments and the action parameters, which in general leads to +// better compiler error messages that pay off in the long run. They +// also allow overloading actions based on parameter types (as opposed +// to just based on the number of parameters). +// +// CAVEAT: +// +// ACTION*() can only be used in a namespace scope. The reason is +// that C++ doesn't yet allow function-local types to be used to +// instantiate templates. The up-coming C++0x standard will fix this. +// Once that's done, we'll consider supporting using ACTION*() inside +// a function. +// +// MORE INFORMATION: +// +// To learn more about using these macros, please search for 'ACTION' +// on http://code.google.com/p/googlemock/wiki/CookBook. + +// An internal macro needed for implementing ACTION*(). +#define GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_\ + const args_type& args GTEST_ATTRIBUTE_UNUSED_, \ + arg0_type arg0 GTEST_ATTRIBUTE_UNUSED_, \ + arg1_type arg1 GTEST_ATTRIBUTE_UNUSED_, \ + arg2_type arg2 GTEST_ATTRIBUTE_UNUSED_, \ + arg3_type arg3 GTEST_ATTRIBUTE_UNUSED_, \ + arg4_type arg4 GTEST_ATTRIBUTE_UNUSED_, \ + arg5_type arg5 GTEST_ATTRIBUTE_UNUSED_, \ + arg6_type arg6 GTEST_ATTRIBUTE_UNUSED_, \ + arg7_type arg7 GTEST_ATTRIBUTE_UNUSED_, \ + arg8_type arg8 GTEST_ATTRIBUTE_UNUSED_, \ + arg9_type arg9 GTEST_ATTRIBUTE_UNUSED_ + +// Sometimes you want to give an action explicit template parameters +// that cannot be inferred from its value parameters. ACTION() and +// ACTION_P*() don't support that. ACTION_TEMPLATE() remedies that +// and can be viewed as an extension to ACTION() and ACTION_P*(). +// +// The syntax: +// +// ACTION_TEMPLATE(ActionName, +// HAS_m_TEMPLATE_PARAMS(kind1, name1, ..., kind_m, name_m), +// AND_n_VALUE_PARAMS(p1, ..., p_n)) { statements; } +// +// defines an action template that takes m explicit template +// parameters and n value parameters. name_i is the name of the i-th +// template parameter, and kind_i specifies whether it's a typename, +// an integral constant, or a template. p_i is the name of the i-th +// value parameter. +// +// Example: +// +// // DuplicateArg(output) converts the k-th argument of the mock +// // function to type T and copies it to *output. +// ACTION_TEMPLATE(DuplicateArg, +// HAS_2_TEMPLATE_PARAMS(int, k, typename, T), +// AND_1_VALUE_PARAMS(output)) { +// *output = T(std::tr1::get(args)); +// } +// ... +// int n; +// EXPECT_CALL(mock, Foo(_, _)) +// .WillOnce(DuplicateArg<1, unsigned char>(&n)); +// +// To create an instance of an action template, write: +// +// ActionName(v1, ..., v_n) +// +// where the ts are the template arguments and the vs are the value +// arguments. The value argument types are inferred by the compiler. +// If you want to explicitly specify the value argument types, you can +// provide additional template arguments: +// +// ActionName(v1, ..., v_n) +// +// where u_i is the desired type of v_i. +// +// ACTION_TEMPLATE and ACTION/ACTION_P* can be overloaded on the +// number of value parameters, but not on the number of template +// parameters. Without the restriction, the meaning of the following +// is unclear: +// +// OverloadedAction(x); +// +// Are we using a single-template-parameter action where 'bool' refers +// to the type of x, or are we using a two-template-parameter action +// where the compiler is asked to infer the type of x? +// +// Implementation notes: +// +// GMOCK_INTERNAL_*_HAS_m_TEMPLATE_PARAMS and +// GMOCK_INTERNAL_*_AND_n_VALUE_PARAMS are internal macros for +// implementing ACTION_TEMPLATE. The main trick we use is to create +// new macro invocations when expanding a macro. For example, we have +// +// #define ACTION_TEMPLATE(name, template_params, value_params) +// ... GMOCK_INTERNAL_DECL_##template_params ... +// +// which causes ACTION_TEMPLATE(..., HAS_1_TEMPLATE_PARAMS(typename, T), ...) +// to expand to +// +// ... GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS(typename, T) ... +// +// Since GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS is a macro, the +// preprocessor will continue to expand it to +// +// ... typename T ... +// +// This technique conforms to the C++ standard and is portable. It +// allows us to implement action templates using O(N) code, where N is +// the maximum number of template/value parameters supported. Without +// using it, we'd have to devote O(N^2) amount of code to implement all +// combinations of m and n. + +// Declares the template parameters. +#define GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS(kind0, name0) kind0 name0 +#define GMOCK_INTERNAL_DECL_HAS_2_TEMPLATE_PARAMS(kind0, name0, kind1, \ + name1) kind0 name0, kind1 name1 +#define GMOCK_INTERNAL_DECL_HAS_3_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ + kind2, name2) kind0 name0, kind1 name1, kind2 name2 +#define GMOCK_INTERNAL_DECL_HAS_4_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ + kind2, name2, kind3, name3) kind0 name0, kind1 name1, kind2 name2, \ + kind3 name3 +#define GMOCK_INTERNAL_DECL_HAS_5_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ + kind2, name2, kind3, name3, kind4, name4) kind0 name0, kind1 name1, \ + kind2 name2, kind3 name3, kind4 name4 +#define GMOCK_INTERNAL_DECL_HAS_6_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ + kind2, name2, kind3, name3, kind4, name4, kind5, name5) kind0 name0, \ + kind1 name1, kind2 name2, kind3 name3, kind4 name4, kind5 name5 +#define GMOCK_INTERNAL_DECL_HAS_7_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ + kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \ + name6) kind0 name0, kind1 name1, kind2 name2, kind3 name3, kind4 name4, \ + kind5 name5, kind6 name6 +#define GMOCK_INTERNAL_DECL_HAS_8_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ + kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \ + kind7, name7) kind0 name0, kind1 name1, kind2 name2, kind3 name3, \ + kind4 name4, kind5 name5, kind6 name6, kind7 name7 +#define GMOCK_INTERNAL_DECL_HAS_9_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ + kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \ + kind7, name7, kind8, name8) kind0 name0, kind1 name1, kind2 name2, \ + kind3 name3, kind4 name4, kind5 name5, kind6 name6, kind7 name7, \ + kind8 name8 +#define GMOCK_INTERNAL_DECL_HAS_10_TEMPLATE_PARAMS(kind0, name0, kind1, \ + name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \ + name6, kind7, name7, kind8, name8, kind9, name9) kind0 name0, \ + kind1 name1, kind2 name2, kind3 name3, kind4 name4, kind5 name5, \ + kind6 name6, kind7 name7, kind8 name8, kind9 name9 + +// Lists the template parameters. +#define GMOCK_INTERNAL_LIST_HAS_1_TEMPLATE_PARAMS(kind0, name0) name0 +#define GMOCK_INTERNAL_LIST_HAS_2_TEMPLATE_PARAMS(kind0, name0, kind1, \ + name1) name0, name1 +#define GMOCK_INTERNAL_LIST_HAS_3_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ + kind2, name2) name0, name1, name2 +#define GMOCK_INTERNAL_LIST_HAS_4_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ + kind2, name2, kind3, name3) name0, name1, name2, name3 +#define GMOCK_INTERNAL_LIST_HAS_5_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ + kind2, name2, kind3, name3, kind4, name4) name0, name1, name2, name3, \ + name4 +#define GMOCK_INTERNAL_LIST_HAS_6_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ + kind2, name2, kind3, name3, kind4, name4, kind5, name5) name0, name1, \ + name2, name3, name4, name5 +#define GMOCK_INTERNAL_LIST_HAS_7_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ + kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \ + name6) name0, name1, name2, name3, name4, name5, name6 +#define GMOCK_INTERNAL_LIST_HAS_8_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ + kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \ + kind7, name7) name0, name1, name2, name3, name4, name5, name6, name7 +#define GMOCK_INTERNAL_LIST_HAS_9_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ + kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \ + kind7, name7, kind8, name8) name0, name1, name2, name3, name4, name5, \ + name6, name7, name8 +#define GMOCK_INTERNAL_LIST_HAS_10_TEMPLATE_PARAMS(kind0, name0, kind1, \ + name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \ + name6, kind7, name7, kind8, name8, kind9, name9) name0, name1, name2, \ + name3, name4, name5, name6, name7, name8, name9 + +// Declares the types of value parameters. +#define GMOCK_INTERNAL_DECL_TYPE_AND_0_VALUE_PARAMS() +#define GMOCK_INTERNAL_DECL_TYPE_AND_1_VALUE_PARAMS(p0) , typename p0##_type +#define GMOCK_INTERNAL_DECL_TYPE_AND_2_VALUE_PARAMS(p0, p1) , \ + typename p0##_type, typename p1##_type +#define GMOCK_INTERNAL_DECL_TYPE_AND_3_VALUE_PARAMS(p0, p1, p2) , \ + typename p0##_type, typename p1##_type, typename p2##_type +#define GMOCK_INTERNAL_DECL_TYPE_AND_4_VALUE_PARAMS(p0, p1, p2, p3) , \ + typename p0##_type, typename p1##_type, typename p2##_type, \ + typename p3##_type +#define GMOCK_INTERNAL_DECL_TYPE_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) , \ + typename p0##_type, typename p1##_type, typename p2##_type, \ + typename p3##_type, typename p4##_type +#define GMOCK_INTERNAL_DECL_TYPE_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) , \ + typename p0##_type, typename p1##_type, typename p2##_type, \ + typename p3##_type, typename p4##_type, typename p5##_type +#define GMOCK_INTERNAL_DECL_TYPE_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ + p6) , typename p0##_type, typename p1##_type, typename p2##_type, \ + typename p3##_type, typename p4##_type, typename p5##_type, \ + typename p6##_type +#define GMOCK_INTERNAL_DECL_TYPE_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ + p6, p7) , typename p0##_type, typename p1##_type, typename p2##_type, \ + typename p3##_type, typename p4##_type, typename p5##_type, \ + typename p6##_type, typename p7##_type +#define GMOCK_INTERNAL_DECL_TYPE_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ + p6, p7, p8) , typename p0##_type, typename p1##_type, typename p2##_type, \ + typename p3##_type, typename p4##_type, typename p5##_type, \ + typename p6##_type, typename p7##_type, typename p8##_type +#define GMOCK_INTERNAL_DECL_TYPE_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ + p6, p7, p8, p9) , typename p0##_type, typename p1##_type, \ + typename p2##_type, typename p3##_type, typename p4##_type, \ + typename p5##_type, typename p6##_type, typename p7##_type, \ + typename p8##_type, typename p9##_type + +// Initializes the value parameters. +#define GMOCK_INTERNAL_INIT_AND_0_VALUE_PARAMS()\ + () +#define GMOCK_INTERNAL_INIT_AND_1_VALUE_PARAMS(p0)\ + (p0##_type gmock_p0) : p0(gmock_p0) +#define GMOCK_INTERNAL_INIT_AND_2_VALUE_PARAMS(p0, p1)\ + (p0##_type gmock_p0, p1##_type gmock_p1) : p0(gmock_p0), p1(gmock_p1) +#define GMOCK_INTERNAL_INIT_AND_3_VALUE_PARAMS(p0, p1, p2)\ + (p0##_type gmock_p0, p1##_type gmock_p1, \ + p2##_type gmock_p2) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2) +#define GMOCK_INTERNAL_INIT_AND_4_VALUE_PARAMS(p0, p1, p2, p3)\ + (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ + p3##_type gmock_p3) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ + p3(gmock_p3) +#define GMOCK_INTERNAL_INIT_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)\ + (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ + p3##_type gmock_p3, p4##_type gmock_p4) : p0(gmock_p0), p1(gmock_p1), \ + p2(gmock_p2), p3(gmock_p3), p4(gmock_p4) +#define GMOCK_INTERNAL_INIT_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)\ + (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ + p3##_type gmock_p3, p4##_type gmock_p4, \ + p5##_type gmock_p5) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ + p3(gmock_p3), p4(gmock_p4), p5(gmock_p5) +#define GMOCK_INTERNAL_INIT_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)\ + (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ + p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ + p6##_type gmock_p6) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ + p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6) +#define GMOCK_INTERNAL_INIT_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)\ + (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ + p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ + p6##_type gmock_p6, p7##_type gmock_p7) : p0(gmock_p0), p1(gmock_p1), \ + p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \ + p7(gmock_p7) +#define GMOCK_INTERNAL_INIT_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ + p7, p8)\ + (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ + p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ + p6##_type gmock_p6, p7##_type gmock_p7, \ + p8##_type gmock_p8) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ + p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \ + p8(gmock_p8) +#define GMOCK_INTERNAL_INIT_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ + p7, p8, p9)\ + (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ + p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ + p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \ + p9##_type gmock_p9) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ + p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \ + p8(gmock_p8), p9(gmock_p9) + +// Declares the fields for storing the value parameters. +#define GMOCK_INTERNAL_DEFN_AND_0_VALUE_PARAMS() +#define GMOCK_INTERNAL_DEFN_AND_1_VALUE_PARAMS(p0) p0##_type p0; +#define GMOCK_INTERNAL_DEFN_AND_2_VALUE_PARAMS(p0, p1) p0##_type p0; \ + p1##_type p1; +#define GMOCK_INTERNAL_DEFN_AND_3_VALUE_PARAMS(p0, p1, p2) p0##_type p0; \ + p1##_type p1; p2##_type p2; +#define GMOCK_INTERNAL_DEFN_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0##_type p0; \ + p1##_type p1; p2##_type p2; p3##_type p3; +#define GMOCK_INTERNAL_DEFN_AND_5_VALUE_PARAMS(p0, p1, p2, p3, \ + p4) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; +#define GMOCK_INTERNAL_DEFN_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, \ + p5) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \ + p5##_type p5; +#define GMOCK_INTERNAL_DEFN_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ + p6) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \ + p5##_type p5; p6##_type p6; +#define GMOCK_INTERNAL_DEFN_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ + p7) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \ + p5##_type p5; p6##_type p6; p7##_type p7; +#define GMOCK_INTERNAL_DEFN_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ + p7, p8) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; \ + p4##_type p4; p5##_type p5; p6##_type p6; p7##_type p7; p8##_type p8; +#define GMOCK_INTERNAL_DEFN_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ + p7, p8, p9) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; \ + p4##_type p4; p5##_type p5; p6##_type p6; p7##_type p7; p8##_type p8; \ + p9##_type p9; + +// Lists the value parameters. +#define GMOCK_INTERNAL_LIST_AND_0_VALUE_PARAMS() +#define GMOCK_INTERNAL_LIST_AND_1_VALUE_PARAMS(p0) p0 +#define GMOCK_INTERNAL_LIST_AND_2_VALUE_PARAMS(p0, p1) p0, p1 +#define GMOCK_INTERNAL_LIST_AND_3_VALUE_PARAMS(p0, p1, p2) p0, p1, p2 +#define GMOCK_INTERNAL_LIST_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0, p1, p2, p3 +#define GMOCK_INTERNAL_LIST_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) p0, p1, \ + p2, p3, p4 +#define GMOCK_INTERNAL_LIST_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) p0, \ + p1, p2, p3, p4, p5 +#define GMOCK_INTERNAL_LIST_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ + p6) p0, p1, p2, p3, p4, p5, p6 +#define GMOCK_INTERNAL_LIST_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ + p7) p0, p1, p2, p3, p4, p5, p6, p7 +#define GMOCK_INTERNAL_LIST_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ + p7, p8) p0, p1, p2, p3, p4, p5, p6, p7, p8 +#define GMOCK_INTERNAL_LIST_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ + p7, p8, p9) p0, p1, p2, p3, p4, p5, p6, p7, p8, p9 + +// Lists the value parameter types. +#define GMOCK_INTERNAL_LIST_TYPE_AND_0_VALUE_PARAMS() +#define GMOCK_INTERNAL_LIST_TYPE_AND_1_VALUE_PARAMS(p0) , p0##_type +#define GMOCK_INTERNAL_LIST_TYPE_AND_2_VALUE_PARAMS(p0, p1) , p0##_type, \ + p1##_type +#define GMOCK_INTERNAL_LIST_TYPE_AND_3_VALUE_PARAMS(p0, p1, p2) , p0##_type, \ + p1##_type, p2##_type +#define GMOCK_INTERNAL_LIST_TYPE_AND_4_VALUE_PARAMS(p0, p1, p2, p3) , \ + p0##_type, p1##_type, p2##_type, p3##_type +#define GMOCK_INTERNAL_LIST_TYPE_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) , \ + p0##_type, p1##_type, p2##_type, p3##_type, p4##_type +#define GMOCK_INTERNAL_LIST_TYPE_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) , \ + p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type +#define GMOCK_INTERNAL_LIST_TYPE_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ + p6) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type, \ + p6##_type +#define GMOCK_INTERNAL_LIST_TYPE_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ + p6, p7) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \ + p5##_type, p6##_type, p7##_type +#define GMOCK_INTERNAL_LIST_TYPE_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ + p6, p7, p8) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \ + p5##_type, p6##_type, p7##_type, p8##_type +#define GMOCK_INTERNAL_LIST_TYPE_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ + p6, p7, p8, p9) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \ + p5##_type, p6##_type, p7##_type, p8##_type, p9##_type + +// Declares the value parameters. +#define GMOCK_INTERNAL_DECL_AND_0_VALUE_PARAMS() +#define GMOCK_INTERNAL_DECL_AND_1_VALUE_PARAMS(p0) p0##_type p0 +#define GMOCK_INTERNAL_DECL_AND_2_VALUE_PARAMS(p0, p1) p0##_type p0, \ + p1##_type p1 +#define GMOCK_INTERNAL_DECL_AND_3_VALUE_PARAMS(p0, p1, p2) p0##_type p0, \ + p1##_type p1, p2##_type p2 +#define GMOCK_INTERNAL_DECL_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0##_type p0, \ + p1##_type p1, p2##_type p2, p3##_type p3 +#define GMOCK_INTERNAL_DECL_AND_5_VALUE_PARAMS(p0, p1, p2, p3, \ + p4) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4 +#define GMOCK_INTERNAL_DECL_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, \ + p5) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \ + p5##_type p5 +#define GMOCK_INTERNAL_DECL_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ + p6) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \ + p5##_type p5, p6##_type p6 +#define GMOCK_INTERNAL_DECL_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ + p7) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \ + p5##_type p5, p6##_type p6, p7##_type p7 +#define GMOCK_INTERNAL_DECL_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ + p7, p8) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \ + p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8 +#define GMOCK_INTERNAL_DECL_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ + p7, p8, p9) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \ + p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, \ + p9##_type p9 + +// The suffix of the class template implementing the action template. +#define GMOCK_INTERNAL_COUNT_AND_0_VALUE_PARAMS() +#define GMOCK_INTERNAL_COUNT_AND_1_VALUE_PARAMS(p0) P +#define GMOCK_INTERNAL_COUNT_AND_2_VALUE_PARAMS(p0, p1) P2 +#define GMOCK_INTERNAL_COUNT_AND_3_VALUE_PARAMS(p0, p1, p2) P3 +#define GMOCK_INTERNAL_COUNT_AND_4_VALUE_PARAMS(p0, p1, p2, p3) P4 +#define GMOCK_INTERNAL_COUNT_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) P5 +#define GMOCK_INTERNAL_COUNT_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) P6 +#define GMOCK_INTERNAL_COUNT_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6) P7 +#define GMOCK_INTERNAL_COUNT_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ + p7) P8 +#define GMOCK_INTERNAL_COUNT_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ + p7, p8) P9 +#define GMOCK_INTERNAL_COUNT_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ + p7, p8, p9) P10 + +// The name of the class template implementing the action template. +#define GMOCK_ACTION_CLASS_(name, value_params)\ + GTEST_CONCAT_TOKEN_(name##Action, GMOCK_INTERNAL_COUNT_##value_params) + +#define ACTION_TEMPLATE(name, template_params, value_params)\ + template \ + class GMOCK_ACTION_CLASS_(name, value_params) {\ + public:\ + GMOCK_ACTION_CLASS_(name, value_params)\ + GMOCK_INTERNAL_INIT_##value_params {}\ + template \ + class gmock_Impl : public ::testing::ActionInterface {\ + public:\ + typedef F function_type;\ + typedef typename ::testing::internal::Function::Result return_type;\ + typedef typename ::testing::internal::Function::ArgumentTuple\ + args_type;\ + explicit gmock_Impl GMOCK_INTERNAL_INIT_##value_params {}\ + virtual return_type Perform(const args_type& args) {\ + return ::testing::internal::ActionHelper::\ + Perform(this, args);\ + }\ + template \ + return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ + arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ + arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ + arg9_type arg9) const;\ + GMOCK_INTERNAL_DEFN_##value_params\ + private:\ + GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ + };\ + template operator ::testing::Action() const {\ + return ::testing::Action(\ + new gmock_Impl(GMOCK_INTERNAL_LIST_##value_params));\ + }\ + GMOCK_INTERNAL_DEFN_##value_params\ + private:\ + GTEST_DISALLOW_ASSIGN_(GMOCK_ACTION_CLASS_(name, value_params));\ + };\ + template \ + inline GMOCK_ACTION_CLASS_(name, value_params)<\ + GMOCK_INTERNAL_LIST_##template_params\ + GMOCK_INTERNAL_LIST_TYPE_##value_params> name(\ + GMOCK_INTERNAL_DECL_##value_params) {\ + return GMOCK_ACTION_CLASS_(name, value_params)<\ + GMOCK_INTERNAL_LIST_##template_params\ + GMOCK_INTERNAL_LIST_TYPE_##value_params>(\ + GMOCK_INTERNAL_LIST_##value_params);\ + }\ + template \ + template \ + template \ + typename ::testing::internal::Function::Result\ + GMOCK_ACTION_CLASS_(name, value_params)<\ + GMOCK_INTERNAL_LIST_##template_params\ + GMOCK_INTERNAL_LIST_TYPE_##value_params>::gmock_Impl::\ + gmock_PerformImpl(\ + GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const + +#define ACTION(name)\ + class name##Action {\ + public:\ + name##Action() {}\ + template \ + class gmock_Impl : public ::testing::ActionInterface {\ + public:\ + typedef F function_type;\ + typedef typename ::testing::internal::Function::Result return_type;\ + typedef typename ::testing::internal::Function::ArgumentTuple\ + args_type;\ + gmock_Impl() {}\ + virtual return_type Perform(const args_type& args) {\ + return ::testing::internal::ActionHelper::\ + Perform(this, args);\ + }\ + template \ + return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ + arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ + arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ + arg9_type arg9) const;\ + private:\ + GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ + };\ + template operator ::testing::Action() const {\ + return ::testing::Action(new gmock_Impl());\ + }\ + private:\ + GTEST_DISALLOW_ASSIGN_(name##Action);\ + };\ + inline name##Action name() {\ + return name##Action();\ + }\ + template \ + template \ + typename ::testing::internal::Function::Result\ + name##Action::gmock_Impl::gmock_PerformImpl(\ + GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const + +#define ACTION_P(name, p0)\ + template \ + class name##ActionP {\ + public:\ + name##ActionP(p0##_type gmock_p0) : p0(gmock_p0) {}\ + template \ + class gmock_Impl : public ::testing::ActionInterface {\ + public:\ + typedef F function_type;\ + typedef typename ::testing::internal::Function::Result return_type;\ + typedef typename ::testing::internal::Function::ArgumentTuple\ + args_type;\ + explicit gmock_Impl(p0##_type gmock_p0) : p0(gmock_p0) {}\ + virtual return_type Perform(const args_type& args) {\ + return ::testing::internal::ActionHelper::\ + Perform(this, args);\ + }\ + template \ + return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ + arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ + arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ + arg9_type arg9) const;\ + p0##_type p0;\ + private:\ + GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ + };\ + template operator ::testing::Action() const {\ + return ::testing::Action(new gmock_Impl(p0));\ + }\ + p0##_type p0;\ + private:\ + GTEST_DISALLOW_ASSIGN_(name##ActionP);\ + };\ + template \ + inline name##ActionP name(p0##_type p0) {\ + return name##ActionP(p0);\ + }\ + template \ + template \ + template \ + typename ::testing::internal::Function::Result\ + name##ActionP::gmock_Impl::gmock_PerformImpl(\ + GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const + +#define ACTION_P2(name, p0, p1)\ + template \ + class name##ActionP2 {\ + public:\ + name##ActionP2(p0##_type gmock_p0, p1##_type gmock_p1) : p0(gmock_p0), \ + p1(gmock_p1) {}\ + template \ + class gmock_Impl : public ::testing::ActionInterface {\ + public:\ + typedef F function_type;\ + typedef typename ::testing::internal::Function::Result return_type;\ + typedef typename ::testing::internal::Function::ArgumentTuple\ + args_type;\ + gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1) : p0(gmock_p0), \ + p1(gmock_p1) {}\ + virtual return_type Perform(const args_type& args) {\ + return ::testing::internal::ActionHelper::\ + Perform(this, args);\ + }\ + template \ + return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ + arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ + arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ + arg9_type arg9) const;\ + p0##_type p0;\ + p1##_type p1;\ + private:\ + GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ + };\ + template operator ::testing::Action() const {\ + return ::testing::Action(new gmock_Impl(p0, p1));\ + }\ + p0##_type p0;\ + p1##_type p1;\ + private:\ + GTEST_DISALLOW_ASSIGN_(name##ActionP2);\ + };\ + template \ + inline name##ActionP2 name(p0##_type p0, \ + p1##_type p1) {\ + return name##ActionP2(p0, p1);\ + }\ + template \ + template \ + template \ + typename ::testing::internal::Function::Result\ + name##ActionP2::gmock_Impl::gmock_PerformImpl(\ + GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const + +#define ACTION_P3(name, p0, p1, p2)\ + template \ + class name##ActionP3 {\ + public:\ + name##ActionP3(p0##_type gmock_p0, p1##_type gmock_p1, \ + p2##_type gmock_p2) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2) {}\ + template \ + class gmock_Impl : public ::testing::ActionInterface {\ + public:\ + typedef F function_type;\ + typedef typename ::testing::internal::Function::Result return_type;\ + typedef typename ::testing::internal::Function::ArgumentTuple\ + args_type;\ + gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, \ + p2##_type gmock_p2) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2) {}\ + virtual return_type Perform(const args_type& args) {\ + return ::testing::internal::ActionHelper::\ + Perform(this, args);\ + }\ + template \ + return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ + arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ + arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ + arg9_type arg9) const;\ + p0##_type p0;\ + p1##_type p1;\ + p2##_type p2;\ + private:\ + GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ + };\ + template operator ::testing::Action() const {\ + return ::testing::Action(new gmock_Impl(p0, p1, p2));\ + }\ + p0##_type p0;\ + p1##_type p1;\ + p2##_type p2;\ + private:\ + GTEST_DISALLOW_ASSIGN_(name##ActionP3);\ + };\ + template \ + inline name##ActionP3 name(p0##_type p0, \ + p1##_type p1, p2##_type p2) {\ + return name##ActionP3(p0, p1, p2);\ + }\ + template \ + template \ + template \ + typename ::testing::internal::Function::Result\ + name##ActionP3::gmock_Impl::gmock_PerformImpl(\ + GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const + +#define ACTION_P4(name, p0, p1, p2, p3)\ + template \ + class name##ActionP4 {\ + public:\ + name##ActionP4(p0##_type gmock_p0, p1##_type gmock_p1, \ + p2##_type gmock_p2, p3##_type gmock_p3) : p0(gmock_p0), p1(gmock_p1), \ + p2(gmock_p2), p3(gmock_p3) {}\ + template \ + class gmock_Impl : public ::testing::ActionInterface {\ + public:\ + typedef F function_type;\ + typedef typename ::testing::internal::Function::Result return_type;\ + typedef typename ::testing::internal::Function::ArgumentTuple\ + args_type;\ + gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ + p3##_type gmock_p3) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ + p3(gmock_p3) {}\ + virtual return_type Perform(const args_type& args) {\ + return ::testing::internal::ActionHelper::\ + Perform(this, args);\ + }\ + template \ + return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ + arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ + arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ + arg9_type arg9) const;\ + p0##_type p0;\ + p1##_type p1;\ + p2##_type p2;\ + p3##_type p3;\ + private:\ + GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ + };\ + template operator ::testing::Action() const {\ + return ::testing::Action(new gmock_Impl(p0, p1, p2, p3));\ + }\ + p0##_type p0;\ + p1##_type p1;\ + p2##_type p2;\ + p3##_type p3;\ + private:\ + GTEST_DISALLOW_ASSIGN_(name##ActionP4);\ + };\ + template \ + inline name##ActionP4 name(p0##_type p0, p1##_type p1, p2##_type p2, \ + p3##_type p3) {\ + return name##ActionP4(p0, p1, \ + p2, p3);\ + }\ + template \ + template \ + template \ + typename ::testing::internal::Function::Result\ + name##ActionP4::gmock_Impl::gmock_PerformImpl(\ + GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const + +#define ACTION_P5(name, p0, p1, p2, p3, p4)\ + template \ + class name##ActionP5 {\ + public:\ + name##ActionP5(p0##_type gmock_p0, p1##_type gmock_p1, \ + p2##_type gmock_p2, p3##_type gmock_p3, \ + p4##_type gmock_p4) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ + p3(gmock_p3), p4(gmock_p4) {}\ + template \ + class gmock_Impl : public ::testing::ActionInterface {\ + public:\ + typedef F function_type;\ + typedef typename ::testing::internal::Function::Result return_type;\ + typedef typename ::testing::internal::Function::ArgumentTuple\ + args_type;\ + gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ + p3##_type gmock_p3, p4##_type gmock_p4) : p0(gmock_p0), \ + p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), p4(gmock_p4) {}\ + virtual return_type Perform(const args_type& args) {\ + return ::testing::internal::ActionHelper::\ + Perform(this, args);\ + }\ + template \ + return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ + arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ + arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ + arg9_type arg9) const;\ + p0##_type p0;\ + p1##_type p1;\ + p2##_type p2;\ + p3##_type p3;\ + p4##_type p4;\ + private:\ + GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ + };\ + template operator ::testing::Action() const {\ + return ::testing::Action(new gmock_Impl(p0, p1, p2, p3, p4));\ + }\ + p0##_type p0;\ + p1##_type p1;\ + p2##_type p2;\ + p3##_type p3;\ + p4##_type p4;\ + private:\ + GTEST_DISALLOW_ASSIGN_(name##ActionP5);\ + };\ + template \ + inline name##ActionP5 name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \ + p4##_type p4) {\ + return name##ActionP5(p0, p1, p2, p3, p4);\ + }\ + template \ + template \ + template \ + typename ::testing::internal::Function::Result\ + name##ActionP5::gmock_Impl::gmock_PerformImpl(\ + GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const + +#define ACTION_P6(name, p0, p1, p2, p3, p4, p5)\ + template \ + class name##ActionP6 {\ + public:\ + name##ActionP6(p0##_type gmock_p0, p1##_type gmock_p1, \ + p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ + p5##_type gmock_p5) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ + p3(gmock_p3), p4(gmock_p4), p5(gmock_p5) {}\ + template \ + class gmock_Impl : public ::testing::ActionInterface {\ + public:\ + typedef F function_type;\ + typedef typename ::testing::internal::Function::Result return_type;\ + typedef typename ::testing::internal::Function::ArgumentTuple\ + args_type;\ + gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ + p3##_type gmock_p3, p4##_type gmock_p4, \ + p5##_type gmock_p5) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ + p3(gmock_p3), p4(gmock_p4), p5(gmock_p5) {}\ + virtual return_type Perform(const args_type& args) {\ + return ::testing::internal::ActionHelper::\ + Perform(this, args);\ + }\ + template \ + return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ + arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ + arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ + arg9_type arg9) const;\ + p0##_type p0;\ + p1##_type p1;\ + p2##_type p2;\ + p3##_type p3;\ + p4##_type p4;\ + p5##_type p5;\ + private:\ + GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ + };\ + template operator ::testing::Action() const {\ + return ::testing::Action(new gmock_Impl(p0, p1, p2, p3, p4, p5));\ + }\ + p0##_type p0;\ + p1##_type p1;\ + p2##_type p2;\ + p3##_type p3;\ + p4##_type p4;\ + p5##_type p5;\ + private:\ + GTEST_DISALLOW_ASSIGN_(name##ActionP6);\ + };\ + template \ + inline name##ActionP6 name(p0##_type p0, p1##_type p1, p2##_type p2, \ + p3##_type p3, p4##_type p4, p5##_type p5) {\ + return name##ActionP6(p0, p1, p2, p3, p4, p5);\ + }\ + template \ + template \ + template \ + typename ::testing::internal::Function::Result\ + name##ActionP6::gmock_Impl::gmock_PerformImpl(\ + GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const + +#define ACTION_P7(name, p0, p1, p2, p3, p4, p5, p6)\ + template \ + class name##ActionP7 {\ + public:\ + name##ActionP7(p0##_type gmock_p0, p1##_type gmock_p1, \ + p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ + p5##_type gmock_p5, p6##_type gmock_p6) : p0(gmock_p0), p1(gmock_p1), \ + p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), \ + p6(gmock_p6) {}\ + template \ + class gmock_Impl : public ::testing::ActionInterface {\ + public:\ + typedef F function_type;\ + typedef typename ::testing::internal::Function::Result return_type;\ + typedef typename ::testing::internal::Function::ArgumentTuple\ + args_type;\ + gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ + p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ + p6##_type gmock_p6) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ + p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6) {}\ + virtual return_type Perform(const args_type& args) {\ + return ::testing::internal::ActionHelper::\ + Perform(this, args);\ + }\ + template \ + return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ + arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ + arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ + arg9_type arg9) const;\ + p0##_type p0;\ + p1##_type p1;\ + p2##_type p2;\ + p3##_type p3;\ + p4##_type p4;\ + p5##_type p5;\ + p6##_type p6;\ + private:\ + GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ + };\ + template operator ::testing::Action() const {\ + return ::testing::Action(new gmock_Impl(p0, p1, p2, p3, p4, p5, \ + p6));\ + }\ + p0##_type p0;\ + p1##_type p1;\ + p2##_type p2;\ + p3##_type p3;\ + p4##_type p4;\ + p5##_type p5;\ + p6##_type p6;\ + private:\ + GTEST_DISALLOW_ASSIGN_(name##ActionP7);\ + };\ + template \ + inline name##ActionP7 name(p0##_type p0, p1##_type p1, \ + p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \ + p6##_type p6) {\ + return name##ActionP7(p0, p1, p2, p3, p4, p5, p6);\ + }\ + template \ + template \ + template \ + typename ::testing::internal::Function::Result\ + name##ActionP7::gmock_Impl::gmock_PerformImpl(\ + GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const + +#define ACTION_P8(name, p0, p1, p2, p3, p4, p5, p6, p7)\ + template \ + class name##ActionP8 {\ + public:\ + name##ActionP8(p0##_type gmock_p0, p1##_type gmock_p1, \ + p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ + p5##_type gmock_p5, p6##_type gmock_p6, \ + p7##_type gmock_p7) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ + p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \ + p7(gmock_p7) {}\ + template \ + class gmock_Impl : public ::testing::ActionInterface {\ + public:\ + typedef F function_type;\ + typedef typename ::testing::internal::Function::Result return_type;\ + typedef typename ::testing::internal::Function::ArgumentTuple\ + args_type;\ + gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ + p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ + p6##_type gmock_p6, p7##_type gmock_p7) : p0(gmock_p0), \ + p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), \ + p5(gmock_p5), p6(gmock_p6), p7(gmock_p7) {}\ + virtual return_type Perform(const args_type& args) {\ + return ::testing::internal::ActionHelper::\ + Perform(this, args);\ + }\ + template \ + return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ + arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ + arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ + arg9_type arg9) const;\ + p0##_type p0;\ + p1##_type p1;\ + p2##_type p2;\ + p3##_type p3;\ + p4##_type p4;\ + p5##_type p5;\ + p6##_type p6;\ + p7##_type p7;\ + private:\ + GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ + };\ + template operator ::testing::Action() const {\ + return ::testing::Action(new gmock_Impl(p0, p1, p2, p3, p4, p5, \ + p6, p7));\ + }\ + p0##_type p0;\ + p1##_type p1;\ + p2##_type p2;\ + p3##_type p3;\ + p4##_type p4;\ + p5##_type p5;\ + p6##_type p6;\ + p7##_type p7;\ + private:\ + GTEST_DISALLOW_ASSIGN_(name##ActionP8);\ + };\ + template \ + inline name##ActionP8 name(p0##_type p0, \ + p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \ + p6##_type p6, p7##_type p7) {\ + return name##ActionP8(p0, p1, p2, p3, p4, p5, \ + p6, p7);\ + }\ + template \ + template \ + template \ + typename ::testing::internal::Function::Result\ + name##ActionP8::gmock_Impl::gmock_PerformImpl(\ + GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const + +#define ACTION_P9(name, p0, p1, p2, p3, p4, p5, p6, p7, p8)\ + template \ + class name##ActionP9 {\ + public:\ + name##ActionP9(p0##_type gmock_p0, p1##_type gmock_p1, \ + p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ + p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \ + p8##_type gmock_p8) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ + p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \ + p8(gmock_p8) {}\ + template \ + class gmock_Impl : public ::testing::ActionInterface {\ + public:\ + typedef F function_type;\ + typedef typename ::testing::internal::Function::Result return_type;\ + typedef typename ::testing::internal::Function::ArgumentTuple\ + args_type;\ + gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ + p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ + p6##_type gmock_p6, p7##_type gmock_p7, \ + p8##_type gmock_p8) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ + p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \ + p7(gmock_p7), p8(gmock_p8) {}\ + virtual return_type Perform(const args_type& args) {\ + return ::testing::internal::ActionHelper::\ + Perform(this, args);\ + }\ + template \ + return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ + arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ + arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ + arg9_type arg9) const;\ + p0##_type p0;\ + p1##_type p1;\ + p2##_type p2;\ + p3##_type p3;\ + p4##_type p4;\ + p5##_type p5;\ + p6##_type p6;\ + p7##_type p7;\ + p8##_type p8;\ + private:\ + GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ + };\ + template operator ::testing::Action() const {\ + return ::testing::Action(new gmock_Impl(p0, p1, p2, p3, p4, p5, \ + p6, p7, p8));\ + }\ + p0##_type p0;\ + p1##_type p1;\ + p2##_type p2;\ + p3##_type p3;\ + p4##_type p4;\ + p5##_type p5;\ + p6##_type p6;\ + p7##_type p7;\ + p8##_type p8;\ + private:\ + GTEST_DISALLOW_ASSIGN_(name##ActionP9);\ + };\ + template \ + inline name##ActionP9 name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \ + p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, \ + p8##_type p8) {\ + return name##ActionP9(p0, p1, p2, \ + p3, p4, p5, p6, p7, p8);\ + }\ + template \ + template \ + template \ + typename ::testing::internal::Function::Result\ + name##ActionP9::gmock_Impl::gmock_PerformImpl(\ + GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const + +#define ACTION_P10(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)\ + template \ + class name##ActionP10 {\ + public:\ + name##ActionP10(p0##_type gmock_p0, p1##_type gmock_p1, \ + p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ + p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \ + p8##_type gmock_p8, p9##_type gmock_p9) : p0(gmock_p0), p1(gmock_p1), \ + p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \ + p7(gmock_p7), p8(gmock_p8), p9(gmock_p9) {}\ + template \ + class gmock_Impl : public ::testing::ActionInterface {\ + public:\ + typedef F function_type;\ + typedef typename ::testing::internal::Function::Result return_type;\ + typedef typename ::testing::internal::Function::ArgumentTuple\ + args_type;\ + gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ + p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ + p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \ + p9##_type gmock_p9) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ + p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \ + p7(gmock_p7), p8(gmock_p8), p9(gmock_p9) {}\ + virtual return_type Perform(const args_type& args) {\ + return ::testing::internal::ActionHelper::\ + Perform(this, args);\ + }\ + template \ + return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ + arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ + arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ + arg9_type arg9) const;\ + p0##_type p0;\ + p1##_type p1;\ + p2##_type p2;\ + p3##_type p3;\ + p4##_type p4;\ + p5##_type p5;\ + p6##_type p6;\ + p7##_type p7;\ + p8##_type p8;\ + p9##_type p9;\ + private:\ + GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ + };\ + template operator ::testing::Action() const {\ + return ::testing::Action(new gmock_Impl(p0, p1, p2, p3, p4, p5, \ + p6, p7, p8, p9));\ + }\ + p0##_type p0;\ + p1##_type p1;\ + p2##_type p2;\ + p3##_type p3;\ + p4##_type p4;\ + p5##_type p5;\ + p6##_type p6;\ + p7##_type p7;\ + p8##_type p8;\ + p9##_type p9;\ + private:\ + GTEST_DISALLOW_ASSIGN_(name##ActionP10);\ + };\ + template \ + inline name##ActionP10 name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \ + p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, \ + p9##_type p9) {\ + return name##ActionP10(p0, \ + p1, p2, p3, p4, p5, p6, p7, p8, p9);\ + }\ + template \ + template \ + template \ + typename ::testing::internal::Function::Result\ + name##ActionP10::gmock_Impl::gmock_PerformImpl(\ + GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const + +namespace testing { + +// The ACTION*() macros trigger warning C4100 (unreferenced formal +// parameter) in MSVC with -W4. Unfortunately they cannot be fixed in +// the macro definition, as the warnings are generated when the macro +// is expanded and macro expansion cannot contain #pragma. Therefore +// we suppress them here. +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable:4100) +#endif + +// Various overloads for InvokeArgument(). +// +// The InvokeArgument(a1, a2, ..., a_k) action invokes the N-th +// (0-based) argument, which must be a k-ary callable, of the mock +// function, with arguments a1, a2, ..., a_k. +// +// Notes: +// +// 1. The arguments are passed by value by default. If you need to +// pass an argument by reference, wrap it inside ByRef(). For +// example, +// +// InvokeArgument<1>(5, string("Hello"), ByRef(foo)) +// +// passes 5 and string("Hello") by value, and passes foo by +// reference. +// +// 2. If the callable takes an argument by reference but ByRef() is +// not used, it will receive the reference to a copy of the value, +// instead of the original value. For example, when the 0-th +// argument of the mock function takes a const string&, the action +// +// InvokeArgument<0>(string("Hello")) +// +// makes a copy of the temporary string("Hello") object and passes a +// reference of the copy, instead of the original temporary object, +// to the callable. This makes it easy for a user to define an +// InvokeArgument action from temporary values and have it performed +// later. + +ACTION_TEMPLATE(InvokeArgument, + HAS_1_TEMPLATE_PARAMS(int, k), + AND_0_VALUE_PARAMS()) { + return internal::CallableHelper::Call( + ::std::tr1::get(args)); +} + +ACTION_TEMPLATE(InvokeArgument, + HAS_1_TEMPLATE_PARAMS(int, k), + AND_1_VALUE_PARAMS(p0)) { + return internal::CallableHelper::Call( + ::std::tr1::get(args), p0); +} + +ACTION_TEMPLATE(InvokeArgument, + HAS_1_TEMPLATE_PARAMS(int, k), + AND_2_VALUE_PARAMS(p0, p1)) { + return internal::CallableHelper::Call( + ::std::tr1::get(args), p0, p1); +} + +ACTION_TEMPLATE(InvokeArgument, + HAS_1_TEMPLATE_PARAMS(int, k), + AND_3_VALUE_PARAMS(p0, p1, p2)) { + return internal::CallableHelper::Call( + ::std::tr1::get(args), p0, p1, p2); +} + +ACTION_TEMPLATE(InvokeArgument, + HAS_1_TEMPLATE_PARAMS(int, k), + AND_4_VALUE_PARAMS(p0, p1, p2, p3)) { + return internal::CallableHelper::Call( + ::std::tr1::get(args), p0, p1, p2, p3); +} + +ACTION_TEMPLATE(InvokeArgument, + HAS_1_TEMPLATE_PARAMS(int, k), + AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)) { + return internal::CallableHelper::Call( + ::std::tr1::get(args), p0, p1, p2, p3, p4); +} + +ACTION_TEMPLATE(InvokeArgument, + HAS_1_TEMPLATE_PARAMS(int, k), + AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)) { + return internal::CallableHelper::Call( + ::std::tr1::get(args), p0, p1, p2, p3, p4, p5); +} + +ACTION_TEMPLATE(InvokeArgument, + HAS_1_TEMPLATE_PARAMS(int, k), + AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)) { + return internal::CallableHelper::Call( + ::std::tr1::get(args), p0, p1, p2, p3, p4, p5, p6); +} + +ACTION_TEMPLATE(InvokeArgument, + HAS_1_TEMPLATE_PARAMS(int, k), + AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)) { + return internal::CallableHelper::Call( + ::std::tr1::get(args), p0, p1, p2, p3, p4, p5, p6, p7); +} + +ACTION_TEMPLATE(InvokeArgument, + HAS_1_TEMPLATE_PARAMS(int, k), + AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)) { + return internal::CallableHelper::Call( + ::std::tr1::get(args), p0, p1, p2, p3, p4, p5, p6, p7, p8); +} + +ACTION_TEMPLATE(InvokeArgument, + HAS_1_TEMPLATE_PARAMS(int, k), + AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)) { + return internal::CallableHelper::Call( + ::std::tr1::get(args), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); +} + +// Various overloads for ReturnNew(). +// +// The ReturnNew(a1, a2, ..., a_k) action returns a pointer to a new +// instance of type T, constructed on the heap with constructor arguments +// a1, a2, ..., and a_k. The caller assumes ownership of the returned value. +ACTION_TEMPLATE(ReturnNew, + HAS_1_TEMPLATE_PARAMS(typename, T), + AND_0_VALUE_PARAMS()) { + return new T(); +} + +ACTION_TEMPLATE(ReturnNew, + HAS_1_TEMPLATE_PARAMS(typename, T), + AND_1_VALUE_PARAMS(p0)) { + return new T(p0); +} + +ACTION_TEMPLATE(ReturnNew, + HAS_1_TEMPLATE_PARAMS(typename, T), + AND_2_VALUE_PARAMS(p0, p1)) { + return new T(p0, p1); +} + +ACTION_TEMPLATE(ReturnNew, + HAS_1_TEMPLATE_PARAMS(typename, T), + AND_3_VALUE_PARAMS(p0, p1, p2)) { + return new T(p0, p1, p2); +} + +ACTION_TEMPLATE(ReturnNew, + HAS_1_TEMPLATE_PARAMS(typename, T), + AND_4_VALUE_PARAMS(p0, p1, p2, p3)) { + return new T(p0, p1, p2, p3); +} + +ACTION_TEMPLATE(ReturnNew, + HAS_1_TEMPLATE_PARAMS(typename, T), + AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)) { + return new T(p0, p1, p2, p3, p4); +} + +ACTION_TEMPLATE(ReturnNew, + HAS_1_TEMPLATE_PARAMS(typename, T), + AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)) { + return new T(p0, p1, p2, p3, p4, p5); +} + +ACTION_TEMPLATE(ReturnNew, + HAS_1_TEMPLATE_PARAMS(typename, T), + AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)) { + return new T(p0, p1, p2, p3, p4, p5, p6); +} + +ACTION_TEMPLATE(ReturnNew, + HAS_1_TEMPLATE_PARAMS(typename, T), + AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)) { + return new T(p0, p1, p2, p3, p4, p5, p6, p7); +} + +ACTION_TEMPLATE(ReturnNew, + HAS_1_TEMPLATE_PARAMS(typename, T), + AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)) { + return new T(p0, p1, p2, p3, p4, p5, p6, p7, p8); +} + +ACTION_TEMPLATE(ReturnNew, + HAS_1_TEMPLATE_PARAMS(typename, T), + AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)) { + return new T(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); +} + +#ifdef _MSC_VER +# pragma warning(pop) +#endif + +} // namespace testing + +#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_ +// This file was GENERATED by command: +// pump.py gmock-generated-function-mockers.h.pump +// DO NOT EDIT BY HAND!!! + +// Copyright 2007, 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. +// +// Author: wan@google.com (Zhanyong Wan) + +// Google Mock - a framework for writing C++ mock classes. +// +// This file implements function mockers of various arities. + +#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_ +#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_ + +// Copyright 2007, 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. +// +// Author: wan@google.com (Zhanyong Wan) + +// Google Mock - a framework for writing C++ mock classes. +// +// This file implements the ON_CALL() and EXPECT_CALL() macros. +// +// A user can use the ON_CALL() macro to specify the default action of +// a mock method. The syntax is: +// +// ON_CALL(mock_object, Method(argument-matchers)) +// .With(multi-argument-matcher) +// .WillByDefault(action); +// +// where the .With() clause is optional. +// +// A user can use the EXPECT_CALL() macro to specify an expectation on +// a mock method. The syntax is: +// +// EXPECT_CALL(mock_object, Method(argument-matchers)) +// .With(multi-argument-matchers) +// .Times(cardinality) +// .InSequence(sequences) +// .After(expectations) +// .WillOnce(action) +// .WillRepeatedly(action) +// .RetiresOnSaturation(); +// +// where all clauses are optional, and .InSequence()/.After()/ +// .WillOnce() can appear any number of times. + +#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_SPEC_BUILDERS_H_ +#define GMOCK_INCLUDE_GMOCK_GMOCK_SPEC_BUILDERS_H_ + +#include +#include +#include +#include +#include + +#if GTEST_HAS_EXCEPTIONS +# include // NOLINT +#endif + +// Copyright 2007, 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. +// +// Author: wan@google.com (Zhanyong Wan) + +// Google Mock - a framework for writing C++ mock classes. +// +// This file implements some commonly used argument matchers. More +// matchers can be defined by the user implementing the +// MatcherInterface interface if necessary. + +#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_MATCHERS_H_ +#define GMOCK_INCLUDE_GMOCK_GMOCK_MATCHERS_H_ + +#include +#include +#include +#include +#include // NOLINT +#include +#include +#include +#include + + +#if GTEST_LANG_CXX11 +#include // NOLINT -- must be after gtest.h +#endif + +namespace testing { + +// To implement a matcher Foo for type T, define: +// 1. a class FooMatcherImpl that implements the +// MatcherInterface interface, and +// 2. a factory function that creates a Matcher object from a +// FooMatcherImpl*. +// +// The two-level delegation design makes it possible to allow a user +// to write "v" instead of "Eq(v)" where a Matcher is expected, which +// is impossible if we pass matchers by pointers. It also eases +// ownership management as Matcher objects can now be copied like +// plain values. + +// MatchResultListener is an abstract class. Its << operator can be +// used by a matcher to explain why a value matches or doesn't match. +// +// TODO(wan@google.com): add method +// bool InterestedInWhy(bool result) const; +// to indicate whether the listener is interested in why the match +// result is 'result'. +class MatchResultListener { + public: + // Creates a listener object with the given underlying ostream. The + // listener does not own the ostream, and does not dereference it + // in the constructor or destructor. + explicit MatchResultListener(::std::ostream* os) : stream_(os) {} + virtual ~MatchResultListener() = 0; // Makes this class abstract. + + // Streams x to the underlying ostream; does nothing if the ostream + // is NULL. + template + MatchResultListener& operator<<(const T& x) { + if (stream_ != NULL) + *stream_ << x; + return *this; + } + + // Returns the underlying ostream. + ::std::ostream* stream() { return stream_; } + + // Returns true iff the listener is interested in an explanation of + // the match result. A matcher's MatchAndExplain() method can use + // this information to avoid generating the explanation when no one + // intends to hear it. + bool IsInterested() const { return stream_ != NULL; } + + private: + ::std::ostream* const stream_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(MatchResultListener); +}; + +inline MatchResultListener::~MatchResultListener() { +} + +// An instance of a subclass of this knows how to describe itself as a +// matcher. +class MatcherDescriberInterface { + public: + virtual ~MatcherDescriberInterface() {} + + // Describes this matcher to an ostream. The function should print + // a verb phrase that describes the property a value matching this + // matcher should have. The subject of the verb phrase is the value + // being matched. For example, the DescribeTo() method of the Gt(7) + // matcher prints "is greater than 7". + virtual void DescribeTo(::std::ostream* os) const = 0; + + // Describes the negation of this matcher to an ostream. For + // example, if the description of this matcher is "is greater than + // 7", the negated description could be "is not greater than 7". + // You are not required to override this when implementing + // MatcherInterface, but it is highly advised so that your matcher + // can produce good error messages. + virtual void DescribeNegationTo(::std::ostream* os) const { + *os << "not ("; + DescribeTo(os); + *os << ")"; + } +}; + +// The implementation of a matcher. +template +class MatcherInterface : public MatcherDescriberInterface { + public: + // Returns true iff the matcher matches x; also explains the match + // result to 'listener' if necessary (see the next paragraph), in + // the form of a non-restrictive relative clause ("which ...", + // "whose ...", etc) that describes x. For example, the + // MatchAndExplain() method of the Pointee(...) matcher should + // generate an explanation like "which points to ...". + // + // Implementations of MatchAndExplain() should add an explanation of + // the match result *if and only if* they can provide additional + // information that's not already present (or not obvious) in the + // print-out of x and the matcher's description. Whether the match + // succeeds is not a factor in deciding whether an explanation is + // needed, as sometimes the caller needs to print a failure message + // when the match succeeds (e.g. when the matcher is used inside + // Not()). + // + // For example, a "has at least 10 elements" matcher should explain + // what the actual element count is, regardless of the match result, + // as it is useful information to the reader; on the other hand, an + // "is empty" matcher probably only needs to explain what the actual + // size is when the match fails, as it's redundant to say that the + // size is 0 when the value is already known to be empty. + // + // You should override this method when defining a new matcher. + // + // It's the responsibility of the caller (Google Mock) to guarantee + // that 'listener' is not NULL. This helps to simplify a matcher's + // implementation when it doesn't care about the performance, as it + // can talk to 'listener' without checking its validity first. + // However, in order to implement dummy listeners efficiently, + // listener->stream() may be NULL. + virtual bool MatchAndExplain(T x, MatchResultListener* listener) const = 0; + + // Inherits these methods from MatcherDescriberInterface: + // virtual void DescribeTo(::std::ostream* os) const = 0; + // virtual void DescribeNegationTo(::std::ostream* os) const; +}; + +// A match result listener that stores the explanation in a string. +class StringMatchResultListener : public MatchResultListener { + public: + StringMatchResultListener() : MatchResultListener(&ss_) {} + + // Returns the explanation accumulated so far. + internal::string str() const { return ss_.str(); } + + // Clears the explanation accumulated so far. + void Clear() { ss_.str(""); } + + private: + ::std::stringstream ss_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(StringMatchResultListener); +}; + +namespace internal { + +// A match result listener that ignores the explanation. +class DummyMatchResultListener : public MatchResultListener { + public: + DummyMatchResultListener() : MatchResultListener(NULL) {} + + private: + GTEST_DISALLOW_COPY_AND_ASSIGN_(DummyMatchResultListener); +}; + +// A match result listener that forwards the explanation to a given +// ostream. The difference between this and MatchResultListener is +// that the former is concrete. +class StreamMatchResultListener : public MatchResultListener { + public: + explicit StreamMatchResultListener(::std::ostream* os) + : MatchResultListener(os) {} + + private: + GTEST_DISALLOW_COPY_AND_ASSIGN_(StreamMatchResultListener); +}; + +// An internal class for implementing Matcher, which will derive +// from it. We put functionalities common to all Matcher +// specializations here to avoid code duplication. +template +class MatcherBase { + public: + // Returns true iff the matcher matches x; also explains the match + // result to 'listener'. + bool MatchAndExplain(T x, MatchResultListener* listener) const { + return impl_->MatchAndExplain(x, listener); + } + + // Returns true iff this matcher matches x. + bool Matches(T x) const { + DummyMatchResultListener dummy; + return MatchAndExplain(x, &dummy); + } + + // Describes this matcher to an ostream. + void DescribeTo(::std::ostream* os) const { impl_->DescribeTo(os); } + + // Describes the negation of this matcher to an ostream. + void DescribeNegationTo(::std::ostream* os) const { + impl_->DescribeNegationTo(os); + } + + // Explains why x matches, or doesn't match, the matcher. + void ExplainMatchResultTo(T x, ::std::ostream* os) const { + StreamMatchResultListener listener(os); + MatchAndExplain(x, &listener); + } + + // Returns the describer for this matcher object; retains ownership + // of the describer, which is only guaranteed to be alive when + // this matcher object is alive. + const MatcherDescriberInterface* GetDescriber() const { + return impl_.get(); + } + + protected: + MatcherBase() {} + + // Constructs a matcher from its implementation. + explicit MatcherBase(const MatcherInterface* impl) + : impl_(impl) {} + + virtual ~MatcherBase() {} + + private: + // shared_ptr (util/gtl/shared_ptr.h) and linked_ptr have similar + // interfaces. The former dynamically allocates a chunk of memory + // to hold the reference count, while the latter tracks all + // references using a circular linked list without allocating + // memory. It has been observed that linked_ptr performs better in + // typical scenarios. However, shared_ptr can out-perform + // linked_ptr when there are many more uses of the copy constructor + // than the default constructor. + // + // If performance becomes a problem, we should see if using + // shared_ptr helps. + ::testing::internal::linked_ptr > impl_; +}; + +} // namespace internal + +// A Matcher is a copyable and IMMUTABLE (except by assignment) +// object that can check whether a value of type T matches. The +// implementation of Matcher is just a linked_ptr to const +// MatcherInterface, so copying is fairly cheap. Don't inherit +// from Matcher! +template +class Matcher : public internal::MatcherBase { + public: + // Constructs a null matcher. Needed for storing Matcher objects in STL + // containers. A default-constructed matcher is not yet initialized. You + // cannot use it until a valid value has been assigned to it. + Matcher() {} + + // Constructs a matcher from its implementation. + explicit Matcher(const MatcherInterface* impl) + : internal::MatcherBase(impl) {} + + // Implicit constructor here allows people to write + // EXPECT_CALL(foo, Bar(5)) instead of EXPECT_CALL(foo, Bar(Eq(5))) sometimes + Matcher(T value); // NOLINT +}; + +// The following two specializations allow the user to write str +// instead of Eq(str) and "foo" instead of Eq("foo") when a string +// matcher is expected. +template <> +class GTEST_API_ Matcher + : public internal::MatcherBase { + public: + Matcher() {} + + explicit Matcher(const MatcherInterface* impl) + : internal::MatcherBase(impl) {} + + // Allows the user to write str instead of Eq(str) sometimes, where + // str is a string object. + Matcher(const internal::string& s); // NOLINT + + // Allows the user to write "foo" instead of Eq("foo") sometimes. + Matcher(const char* s); // NOLINT +}; + +template <> +class GTEST_API_ Matcher + : public internal::MatcherBase { + public: + Matcher() {} + + explicit Matcher(const MatcherInterface* impl) + : internal::MatcherBase(impl) {} + + // Allows the user to write str instead of Eq(str) sometimes, where + // str is a string object. + Matcher(const internal::string& s); // NOLINT + + // Allows the user to write "foo" instead of Eq("foo") sometimes. + Matcher(const char* s); // NOLINT +}; + +#if GTEST_HAS_STRING_PIECE_ +// The following two specializations allow the user to write str +// instead of Eq(str) and "foo" instead of Eq("foo") when a StringPiece +// matcher is expected. +template <> +class GTEST_API_ Matcher + : public internal::MatcherBase { + public: + Matcher() {} + + explicit Matcher(const MatcherInterface* impl) + : internal::MatcherBase(impl) {} + + // Allows the user to write str instead of Eq(str) sometimes, where + // str is a string object. + Matcher(const internal::string& s); // NOLINT + + // Allows the user to write "foo" instead of Eq("foo") sometimes. + Matcher(const char* s); // NOLINT + + // Allows the user to pass StringPieces directly. + Matcher(StringPiece s); // NOLINT +}; + +template <> +class GTEST_API_ Matcher + : public internal::MatcherBase { + public: + Matcher() {} + + explicit Matcher(const MatcherInterface* impl) + : internal::MatcherBase(impl) {} + + // Allows the user to write str instead of Eq(str) sometimes, where + // str is a string object. + Matcher(const internal::string& s); // NOLINT + + // Allows the user to write "foo" instead of Eq("foo") sometimes. + Matcher(const char* s); // NOLINT + + // Allows the user to pass StringPieces directly. + Matcher(StringPiece s); // NOLINT +}; +#endif // GTEST_HAS_STRING_PIECE_ + +// The PolymorphicMatcher class template makes it easy to implement a +// polymorphic matcher (i.e. a matcher that can match values of more +// than one type, e.g. Eq(n) and NotNull()). +// +// To define a polymorphic matcher, a user should provide an Impl +// class that has a DescribeTo() method and a DescribeNegationTo() +// method, and define a member function (or member function template) +// +// bool MatchAndExplain(const Value& value, +// MatchResultListener* listener) const; +// +// See the definition of NotNull() for a complete example. +template +class PolymorphicMatcher { + public: + explicit PolymorphicMatcher(const Impl& an_impl) : impl_(an_impl) {} + + // Returns a mutable reference to the underlying matcher + // implementation object. + Impl& mutable_impl() { return impl_; } + + // Returns an immutable reference to the underlying matcher + // implementation object. + const Impl& impl() const { return impl_; } + + template + operator Matcher() const { + return Matcher(new MonomorphicImpl(impl_)); + } + + private: + template + class MonomorphicImpl : public MatcherInterface { + public: + explicit MonomorphicImpl(const Impl& impl) : impl_(impl) {} + + virtual void DescribeTo(::std::ostream* os) const { + impl_.DescribeTo(os); + } + + virtual void DescribeNegationTo(::std::ostream* os) const { + impl_.DescribeNegationTo(os); + } + + virtual bool MatchAndExplain(T x, MatchResultListener* listener) const { + return impl_.MatchAndExplain(x, listener); + } + + private: + const Impl impl_; + + GTEST_DISALLOW_ASSIGN_(MonomorphicImpl); + }; + + Impl impl_; + + GTEST_DISALLOW_ASSIGN_(PolymorphicMatcher); +}; + +// Creates a matcher from its implementation. This is easier to use +// than the Matcher constructor as it doesn't require you to +// explicitly write the template argument, e.g. +// +// MakeMatcher(foo); +// vs +// Matcher(foo); +template +inline Matcher MakeMatcher(const MatcherInterface* impl) { + return Matcher(impl); +} + +// Creates a polymorphic matcher from its implementation. This is +// easier to use than the PolymorphicMatcher constructor as it +// doesn't require you to explicitly write the template argument, e.g. +// +// MakePolymorphicMatcher(foo); +// vs +// PolymorphicMatcher(foo); +template +inline PolymorphicMatcher MakePolymorphicMatcher(const Impl& impl) { + return PolymorphicMatcher(impl); +} + +// Anything inside the 'internal' namespace IS INTERNAL IMPLEMENTATION +// and MUST NOT BE USED IN USER CODE!!! +namespace internal { + +// The MatcherCastImpl class template is a helper for implementing +// MatcherCast(). We need this helper in order to partially +// specialize the implementation of MatcherCast() (C++ allows +// class/struct templates to be partially specialized, but not +// function templates.). + +// This general version is used when MatcherCast()'s argument is a +// polymorphic matcher (i.e. something that can be converted to a +// Matcher but is not one yet; for example, Eq(value)) or a value (for +// example, "hello"). +template +class MatcherCastImpl { + public: + static Matcher Cast(M polymorphic_matcher_or_value) { + // M can be a polymorhic matcher, in which case we want to use + // its conversion operator to create Matcher. Or it can be a value + // that should be passed to the Matcher's constructor. + // + // We can't call Matcher(polymorphic_matcher_or_value) when M is a + // polymorphic matcher because it'll be ambiguous if T has an implicit + // constructor from M (this usually happens when T has an implicit + // constructor from any type). + // + // It won't work to unconditionally implict_cast + // polymorphic_matcher_or_value to Matcher because it won't trigger + // a user-defined conversion from M to T if one exists (assuming M is + // a value). + return CastImpl( + polymorphic_matcher_or_value, + BooleanConstant< + internal::ImplicitlyConvertible >::value>()); + } + + private: + static Matcher CastImpl(M value, BooleanConstant) { + // M can't be implicitly converted to Matcher, so M isn't a polymorphic + // matcher. It must be a value then. Use direct initialization to create + // a matcher. + return Matcher(ImplicitCast_(value)); + } + + static Matcher CastImpl(M polymorphic_matcher_or_value, + BooleanConstant) { + // M is implicitly convertible to Matcher, which means that either + // M is a polymorhpic matcher or Matcher has an implicit constructor + // from M. In both cases using the implicit conversion will produce a + // matcher. + // + // Even if T has an implicit constructor from M, it won't be called because + // creating Matcher would require a chain of two user-defined conversions + // (first to create T from M and then to create Matcher from T). + return polymorphic_matcher_or_value; + } +}; + +// This more specialized version is used when MatcherCast()'s argument +// is already a Matcher. This only compiles when type T can be +// statically converted to type U. +template +class MatcherCastImpl > { + public: + static Matcher Cast(const Matcher& source_matcher) { + return Matcher(new Impl(source_matcher)); + } + + private: + class Impl : public MatcherInterface { + public: + explicit Impl(const Matcher& source_matcher) + : source_matcher_(source_matcher) {} + + // We delegate the matching logic to the source matcher. + virtual bool MatchAndExplain(T x, MatchResultListener* listener) const { + return source_matcher_.MatchAndExplain(static_cast(x), listener); + } + + virtual void DescribeTo(::std::ostream* os) const { + source_matcher_.DescribeTo(os); + } + + virtual void DescribeNegationTo(::std::ostream* os) const { + source_matcher_.DescribeNegationTo(os); + } + + private: + const Matcher source_matcher_; + + GTEST_DISALLOW_ASSIGN_(Impl); + }; +}; + +// This even more specialized version is used for efficiently casting +// a matcher to its own type. +template +class MatcherCastImpl > { + public: + static Matcher Cast(const Matcher& matcher) { return matcher; } +}; + +} // namespace internal + +// In order to be safe and clear, casting between different matcher +// types is done explicitly via MatcherCast(m), which takes a +// matcher m and returns a Matcher. It compiles only when T can be +// statically converted to the argument type of m. +template +inline Matcher MatcherCast(M matcher) { + return internal::MatcherCastImpl::Cast(matcher); +} + +// Implements SafeMatcherCast(). +// +// We use an intermediate class to do the actual safe casting as Nokia's +// Symbian compiler cannot decide between +// template ... (M) and +// template ... (const Matcher&) +// for function templates but can for member function templates. +template +class SafeMatcherCastImpl { + public: + // This overload handles polymorphic matchers and values only since + // monomorphic matchers are handled by the next one. + template + static inline Matcher Cast(M polymorphic_matcher_or_value) { + return internal::MatcherCastImpl::Cast(polymorphic_matcher_or_value); + } + + // This overload handles monomorphic matchers. + // + // In general, if type T can be implicitly converted to type U, we can + // safely convert a Matcher to a Matcher (i.e. Matcher is + // contravariant): just keep a copy of the original Matcher, convert the + // argument from type T to U, and then pass it to the underlying Matcher. + // The only exception is when U is a reference and T is not, as the + // underlying Matcher may be interested in the argument's address, which + // is not preserved in the conversion from T to U. + template + static inline Matcher Cast(const Matcher& matcher) { + // Enforce that T can be implicitly converted to U. + GTEST_COMPILE_ASSERT_((internal::ImplicitlyConvertible::value), + T_must_be_implicitly_convertible_to_U); + // Enforce that we are not converting a non-reference type T to a reference + // type U. + GTEST_COMPILE_ASSERT_( + internal::is_reference::value || !internal::is_reference::value, + cannot_convert_non_referentce_arg_to_reference); + // In case both T and U are arithmetic types, enforce that the + // conversion is not lossy. + typedef GTEST_REMOVE_REFERENCE_AND_CONST_(T) RawT; + typedef GTEST_REMOVE_REFERENCE_AND_CONST_(U) RawU; + const bool kTIsOther = GMOCK_KIND_OF_(RawT) == internal::kOther; + const bool kUIsOther = GMOCK_KIND_OF_(RawU) == internal::kOther; + GTEST_COMPILE_ASSERT_( + kTIsOther || kUIsOther || + (internal::LosslessArithmeticConvertible::value), + conversion_of_arithmetic_types_must_be_lossless); + return MatcherCast(matcher); + } +}; + +template +inline Matcher SafeMatcherCast(const M& polymorphic_matcher) { + return SafeMatcherCastImpl::Cast(polymorphic_matcher); +} + +// A() returns a matcher that matches any value of type T. +template +Matcher A(); + +// Anything inside the 'internal' namespace IS INTERNAL IMPLEMENTATION +// and MUST NOT BE USED IN USER CODE!!! +namespace internal { + +// If the explanation is not empty, prints it to the ostream. +inline void PrintIfNotEmpty(const internal::string& explanation, + ::std::ostream* os) { + if (explanation != "" && os != NULL) { + *os << ", " << explanation; + } +} + +// Returns true if the given type name is easy to read by a human. +// This is used to decide whether printing the type of a value might +// be helpful. +inline bool IsReadableTypeName(const string& type_name) { + // We consider a type name readable if it's short or doesn't contain + // a template or function type. + return (type_name.length() <= 20 || + type_name.find_first_of("<(") == string::npos); +} + +// Matches the value against the given matcher, prints the value and explains +// the match result to the listener. Returns the match result. +// 'listener' must not be NULL. +// Value cannot be passed by const reference, because some matchers take a +// non-const argument. +template +bool MatchPrintAndExplain(Value& value, const Matcher& matcher, + MatchResultListener* listener) { + if (!listener->IsInterested()) { + // If the listener is not interested, we do not need to construct the + // inner explanation. + return matcher.Matches(value); + } + + StringMatchResultListener inner_listener; + const bool match = matcher.MatchAndExplain(value, &inner_listener); + + UniversalPrint(value, listener->stream()); +#if GTEST_HAS_RTTI + const string& type_name = GetTypeName(); + if (IsReadableTypeName(type_name)) + *listener->stream() << " (of type " << type_name << ")"; +#endif + PrintIfNotEmpty(inner_listener.str(), listener->stream()); + + return match; +} + +// An internal helper class for doing compile-time loop on a tuple's +// fields. +template +class TuplePrefix { + public: + // TuplePrefix::Matches(matcher_tuple, value_tuple) returns true + // iff the first N fields of matcher_tuple matches the first N + // fields of value_tuple, respectively. + template + static bool Matches(const MatcherTuple& matcher_tuple, + const ValueTuple& value_tuple) { + using ::std::tr1::get; + return TuplePrefix::Matches(matcher_tuple, value_tuple) + && get(matcher_tuple).Matches(get(value_tuple)); + } + + // TuplePrefix::ExplainMatchFailuresTo(matchers, values, os) + // describes failures in matching the first N fields of matchers + // against the first N fields of values. If there is no failure, + // nothing will be streamed to os. + template + static void ExplainMatchFailuresTo(const MatcherTuple& matchers, + const ValueTuple& values, + ::std::ostream* os) { + using ::std::tr1::tuple_element; + using ::std::tr1::get; + + // First, describes failures in the first N - 1 fields. + TuplePrefix::ExplainMatchFailuresTo(matchers, values, os); + + // Then describes the failure (if any) in the (N - 1)-th (0-based) + // field. + typename tuple_element::type matcher = + get(matchers); + typedef typename tuple_element::type Value; + Value value = get(values); + StringMatchResultListener listener; + if (!matcher.MatchAndExplain(value, &listener)) { + // TODO(wan): include in the message the name of the parameter + // as used in MOCK_METHOD*() when possible. + *os << " Expected arg #" << N - 1 << ": "; + get(matchers).DescribeTo(os); + *os << "\n Actual: "; + // We remove the reference in type Value to prevent the + // universal printer from printing the address of value, which + // isn't interesting to the user most of the time. The + // matcher's MatchAndExplain() method handles the case when + // the address is interesting. + internal::UniversalPrint(value, os); + PrintIfNotEmpty(listener.str(), os); + *os << "\n"; + } + } +}; + +// The base case. +template <> +class TuplePrefix<0> { + public: + template + static bool Matches(const MatcherTuple& /* matcher_tuple */, + const ValueTuple& /* value_tuple */) { + return true; + } + + template + static void ExplainMatchFailuresTo(const MatcherTuple& /* matchers */, + const ValueTuple& /* values */, + ::std::ostream* /* os */) {} +}; + +// TupleMatches(matcher_tuple, value_tuple) returns true iff all +// matchers in matcher_tuple match the corresponding fields in +// value_tuple. It is a compiler error if matcher_tuple and +// value_tuple have different number of fields or incompatible field +// types. +template +bool TupleMatches(const MatcherTuple& matcher_tuple, + const ValueTuple& value_tuple) { + using ::std::tr1::tuple_size; + // Makes sure that matcher_tuple and value_tuple have the same + // number of fields. + GTEST_COMPILE_ASSERT_(tuple_size::value == + tuple_size::value, + matcher_and_value_have_different_numbers_of_fields); + return TuplePrefix::value>:: + Matches(matcher_tuple, value_tuple); +} + +// Describes failures in matching matchers against values. If there +// is no failure, nothing will be streamed to os. +template +void ExplainMatchFailureTupleTo(const MatcherTuple& matchers, + const ValueTuple& values, + ::std::ostream* os) { + using ::std::tr1::tuple_size; + TuplePrefix::value>::ExplainMatchFailuresTo( + matchers, values, os); +} + +// TransformTupleValues and its helper. +// +// TransformTupleValuesHelper hides the internal machinery that +// TransformTupleValues uses to implement a tuple traversal. +template +class TransformTupleValuesHelper { + private: + typedef typename ::std::tr1::tuple_size TupleSize; + + public: + // For each member of tuple 't', taken in order, evaluates '*out++ = f(t)'. + // Returns the final value of 'out' in case the caller needs it. + static OutIter Run(Func f, const Tuple& t, OutIter out) { + return IterateOverTuple()(f, t, out); + } + + private: + template + struct IterateOverTuple { + OutIter operator() (Func f, const Tup& t, OutIter out) const { + *out++ = f(::std::tr1::get(t)); + return IterateOverTuple()(f, t, out); + } + }; + template + struct IterateOverTuple { + OutIter operator() (Func /* f */, const Tup& /* t */, OutIter out) const { + return out; + } + }; +}; + +// Successively invokes 'f(element)' on each element of the tuple 't', +// appending each result to the 'out' iterator. Returns the final value +// of 'out'. +template +OutIter TransformTupleValues(Func f, const Tuple& t, OutIter out) { + return TransformTupleValuesHelper::Run(f, t, out); +} + +// Implements A(). +template +class AnyMatcherImpl : public MatcherInterface { + public: + virtual bool MatchAndExplain( + T /* x */, MatchResultListener* /* listener */) const { return true; } + virtual void DescribeTo(::std::ostream* os) const { *os << "is anything"; } + virtual void DescribeNegationTo(::std::ostream* os) const { + // This is mostly for completeness' safe, as it's not very useful + // to write Not(A()). However we cannot completely rule out + // such a possibility, and it doesn't hurt to be prepared. + *os << "never matches"; + } +}; + +// Implements _, a matcher that matches any value of any +// type. This is a polymorphic matcher, so we need a template type +// conversion operator to make it appearing as a Matcher for any +// type T. +class AnythingMatcher { + public: + template + operator Matcher() const { return A(); } +}; + +// Implements a matcher that compares a given value with a +// pre-supplied value using one of the ==, <=, <, etc, operators. The +// two values being compared don't have to have the same type. +// +// The matcher defined here is polymorphic (for example, Eq(5) can be +// used to match an int, a short, a double, etc). Therefore we use +// a template type conversion operator in the implementation. +// +// We define this as a macro in order to eliminate duplicated source +// code. +// +// The following template definition assumes that the Rhs parameter is +// a "bare" type (i.e. neither 'const T' nor 'T&'). +#define GMOCK_IMPLEMENT_COMPARISON_MATCHER_( \ + name, op, relation, negated_relation) \ + template class name##Matcher { \ + public: \ + explicit name##Matcher(const Rhs& rhs) : rhs_(rhs) {} \ + template \ + operator Matcher() const { \ + return MakeMatcher(new Impl(rhs_)); \ + } \ + private: \ + template \ + class Impl : public MatcherInterface { \ + public: \ + explicit Impl(const Rhs& rhs) : rhs_(rhs) {} \ + virtual bool MatchAndExplain(\ + Lhs lhs, MatchResultListener* /* listener */) const { \ + return lhs op rhs_; \ + } \ + virtual void DescribeTo(::std::ostream* os) const { \ + *os << relation " "; \ + UniversalPrint(rhs_, os); \ + } \ + virtual void DescribeNegationTo(::std::ostream* os) const { \ + *os << negated_relation " "; \ + UniversalPrint(rhs_, os); \ + } \ + private: \ + Rhs rhs_; \ + GTEST_DISALLOW_ASSIGN_(Impl); \ + }; \ + Rhs rhs_; \ + GTEST_DISALLOW_ASSIGN_(name##Matcher); \ + } + +// Implements Eq(v), Ge(v), Gt(v), Le(v), Lt(v), and Ne(v) +// respectively. +GMOCK_IMPLEMENT_COMPARISON_MATCHER_(Eq, ==, "is equal to", "isn't equal to"); +GMOCK_IMPLEMENT_COMPARISON_MATCHER_(Ge, >=, "is >=", "isn't >="); +GMOCK_IMPLEMENT_COMPARISON_MATCHER_(Gt, >, "is >", "isn't >"); +GMOCK_IMPLEMENT_COMPARISON_MATCHER_(Le, <=, "is <=", "isn't <="); +GMOCK_IMPLEMENT_COMPARISON_MATCHER_(Lt, <, "is <", "isn't <"); +GMOCK_IMPLEMENT_COMPARISON_MATCHER_(Ne, !=, "isn't equal to", "is equal to"); + +#undef GMOCK_IMPLEMENT_COMPARISON_MATCHER_ + +// Implements the polymorphic IsNull() matcher, which matches any raw or smart +// pointer that is NULL. +class IsNullMatcher { + public: + template + bool MatchAndExplain(const Pointer& p, + MatchResultListener* /* listener */) const { + return GetRawPointer(p) == NULL; + } + + void DescribeTo(::std::ostream* os) const { *os << "is NULL"; } + void DescribeNegationTo(::std::ostream* os) const { + *os << "isn't NULL"; + } +}; + +// Implements the polymorphic NotNull() matcher, which matches any raw or smart +// pointer that is not NULL. +class NotNullMatcher { + public: + template + bool MatchAndExplain(const Pointer& p, + MatchResultListener* /* listener */) const { + return GetRawPointer(p) != NULL; + } + + void DescribeTo(::std::ostream* os) const { *os << "isn't NULL"; } + void DescribeNegationTo(::std::ostream* os) const { + *os << "is NULL"; + } +}; + +// Ref(variable) matches any argument that is a reference to +// 'variable'. This matcher is polymorphic as it can match any +// super type of the type of 'variable'. +// +// The RefMatcher template class implements Ref(variable). It can +// only be instantiated with a reference type. This prevents a user +// from mistakenly using Ref(x) to match a non-reference function +// argument. For example, the following will righteously cause a +// compiler error: +// +// int n; +// Matcher m1 = Ref(n); // This won't compile. +// Matcher m2 = Ref(n); // This will compile. +template +class RefMatcher; + +template +class RefMatcher { + // Google Mock is a generic framework and thus needs to support + // mocking any function types, including those that take non-const + // reference arguments. Therefore the template parameter T (and + // Super below) can be instantiated to either a const type or a + // non-const type. + public: + // RefMatcher() takes a T& instead of const T&, as we want the + // compiler to catch using Ref(const_value) as a matcher for a + // non-const reference. + explicit RefMatcher(T& x) : object_(x) {} // NOLINT + + template + operator Matcher() const { + // By passing object_ (type T&) to Impl(), which expects a Super&, + // we make sure that Super is a super type of T. In particular, + // this catches using Ref(const_value) as a matcher for a + // non-const reference, as you cannot implicitly convert a const + // reference to a non-const reference. + return MakeMatcher(new Impl(object_)); + } + + private: + template + class Impl : public MatcherInterface { + public: + explicit Impl(Super& x) : object_(x) {} // NOLINT + + // MatchAndExplain() takes a Super& (as opposed to const Super&) + // in order to match the interface MatcherInterface. + virtual bool MatchAndExplain( + Super& x, MatchResultListener* listener) const { + *listener << "which is located @" << static_cast(&x); + return &x == &object_; + } + + virtual void DescribeTo(::std::ostream* os) const { + *os << "references the variable "; + UniversalPrinter::Print(object_, os); + } + + virtual void DescribeNegationTo(::std::ostream* os) const { + *os << "does not reference the variable "; + UniversalPrinter::Print(object_, os); + } + + private: + const Super& object_; + + GTEST_DISALLOW_ASSIGN_(Impl); + }; + + T& object_; + + GTEST_DISALLOW_ASSIGN_(RefMatcher); +}; + +// Polymorphic helper functions for narrow and wide string matchers. +inline bool CaseInsensitiveCStringEquals(const char* lhs, const char* rhs) { + return String::CaseInsensitiveCStringEquals(lhs, rhs); +} + +inline bool CaseInsensitiveCStringEquals(const wchar_t* lhs, + const wchar_t* rhs) { + return String::CaseInsensitiveWideCStringEquals(lhs, rhs); +} + +// String comparison for narrow or wide strings that can have embedded NUL +// characters. +template +bool CaseInsensitiveStringEquals(const StringType& s1, + const StringType& s2) { + // Are the heads equal? + if (!CaseInsensitiveCStringEquals(s1.c_str(), s2.c_str())) { + return false; + } + + // Skip the equal heads. + const typename StringType::value_type nul = 0; + const size_t i1 = s1.find(nul), i2 = s2.find(nul); + + // Are we at the end of either s1 or s2? + if (i1 == StringType::npos || i2 == StringType::npos) { + return i1 == i2; + } + + // Are the tails equal? + return CaseInsensitiveStringEquals(s1.substr(i1 + 1), s2.substr(i2 + 1)); +} + +// String matchers. + +// Implements equality-based string matchers like StrEq, StrCaseNe, and etc. +template +class StrEqualityMatcher { + public: + StrEqualityMatcher(const StringType& str, bool expect_eq, + bool case_sensitive) + : string_(str), expect_eq_(expect_eq), case_sensitive_(case_sensitive) {} + + // Accepts pointer types, particularly: + // const char* + // char* + // const wchar_t* + // wchar_t* + template + bool MatchAndExplain(CharType* s, MatchResultListener* listener) const { + if (s == NULL) { + return !expect_eq_; + } + return MatchAndExplain(StringType(s), listener); + } + + // Matches anything that can convert to StringType. + // + // This is a template, not just a plain function with const StringType&, + // because StringPiece has some interfering non-explicit constructors. + template + bool MatchAndExplain(const MatcheeStringType& s, + MatchResultListener* /* listener */) const { + const StringType& s2(s); + const bool eq = case_sensitive_ ? s2 == string_ : + CaseInsensitiveStringEquals(s2, string_); + return expect_eq_ == eq; + } + + void DescribeTo(::std::ostream* os) const { + DescribeToHelper(expect_eq_, os); + } + + void DescribeNegationTo(::std::ostream* os) const { + DescribeToHelper(!expect_eq_, os); + } + + private: + void DescribeToHelper(bool expect_eq, ::std::ostream* os) const { + *os << (expect_eq ? "is " : "isn't "); + *os << "equal to "; + if (!case_sensitive_) { + *os << "(ignoring case) "; + } + UniversalPrint(string_, os); + } + + const StringType string_; + const bool expect_eq_; + const bool case_sensitive_; + + GTEST_DISALLOW_ASSIGN_(StrEqualityMatcher); +}; + +// Implements the polymorphic HasSubstr(substring) matcher, which +// can be used as a Matcher as long as T can be converted to a +// string. +template +class HasSubstrMatcher { + public: + explicit HasSubstrMatcher(const StringType& substring) + : substring_(substring) {} + + // Accepts pointer types, particularly: + // const char* + // char* + // const wchar_t* + // wchar_t* + template + bool MatchAndExplain(CharType* s, MatchResultListener* listener) const { + return s != NULL && MatchAndExplain(StringType(s), listener); + } + + // Matches anything that can convert to StringType. + // + // This is a template, not just a plain function with const StringType&, + // because StringPiece has some interfering non-explicit constructors. + template + bool MatchAndExplain(const MatcheeStringType& s, + MatchResultListener* /* listener */) const { + const StringType& s2(s); + return s2.find(substring_) != StringType::npos; + } + + // Describes what this matcher matches. + void DescribeTo(::std::ostream* os) const { + *os << "has substring "; + UniversalPrint(substring_, os); + } + + void DescribeNegationTo(::std::ostream* os) const { + *os << "has no substring "; + UniversalPrint(substring_, os); + } + + private: + const StringType substring_; + + GTEST_DISALLOW_ASSIGN_(HasSubstrMatcher); +}; + +// Implements the polymorphic StartsWith(substring) matcher, which +// can be used as a Matcher as long as T can be converted to a +// string. +template +class StartsWithMatcher { + public: + explicit StartsWithMatcher(const StringType& prefix) : prefix_(prefix) { + } + + // Accepts pointer types, particularly: + // const char* + // char* + // const wchar_t* + // wchar_t* + template + bool MatchAndExplain(CharType* s, MatchResultListener* listener) const { + return s != NULL && MatchAndExplain(StringType(s), listener); + } + + // Matches anything that can convert to StringType. + // + // This is a template, not just a plain function with const StringType&, + // because StringPiece has some interfering non-explicit constructors. + template + bool MatchAndExplain(const MatcheeStringType& s, + MatchResultListener* /* listener */) const { + const StringType& s2(s); + return s2.length() >= prefix_.length() && + s2.substr(0, prefix_.length()) == prefix_; + } + + void DescribeTo(::std::ostream* os) const { + *os << "starts with "; + UniversalPrint(prefix_, os); + } + + void DescribeNegationTo(::std::ostream* os) const { + *os << "doesn't start with "; + UniversalPrint(prefix_, os); + } + + private: + const StringType prefix_; + + GTEST_DISALLOW_ASSIGN_(StartsWithMatcher); +}; + +// Implements the polymorphic EndsWith(substring) matcher, which +// can be used as a Matcher as long as T can be converted to a +// string. +template +class EndsWithMatcher { + public: + explicit EndsWithMatcher(const StringType& suffix) : suffix_(suffix) {} + + // Accepts pointer types, particularly: + // const char* + // char* + // const wchar_t* + // wchar_t* + template + bool MatchAndExplain(CharType* s, MatchResultListener* listener) const { + return s != NULL && MatchAndExplain(StringType(s), listener); + } + + // Matches anything that can convert to StringType. + // + // This is a template, not just a plain function with const StringType&, + // because StringPiece has some interfering non-explicit constructors. + template + bool MatchAndExplain(const MatcheeStringType& s, + MatchResultListener* /* listener */) const { + const StringType& s2(s); + return s2.length() >= suffix_.length() && + s2.substr(s2.length() - suffix_.length()) == suffix_; + } + + void DescribeTo(::std::ostream* os) const { + *os << "ends with "; + UniversalPrint(suffix_, os); + } + + void DescribeNegationTo(::std::ostream* os) const { + *os << "doesn't end with "; + UniversalPrint(suffix_, os); + } + + private: + const StringType suffix_; + + GTEST_DISALLOW_ASSIGN_(EndsWithMatcher); +}; + +// Implements polymorphic matchers MatchesRegex(regex) and +// ContainsRegex(regex), which can be used as a Matcher as long as +// T can be converted to a string. +class MatchesRegexMatcher { + public: + MatchesRegexMatcher(const RE* regex, bool full_match) + : regex_(regex), full_match_(full_match) {} + + // Accepts pointer types, particularly: + // const char* + // char* + // const wchar_t* + // wchar_t* + template + bool MatchAndExplain(CharType* s, MatchResultListener* listener) const { + return s != NULL && MatchAndExplain(internal::string(s), listener); + } + + // Matches anything that can convert to internal::string. + // + // This is a template, not just a plain function with const internal::string&, + // because StringPiece has some interfering non-explicit constructors. + template + bool MatchAndExplain(const MatcheeStringType& s, + MatchResultListener* /* listener */) const { + const internal::string& s2(s); + return full_match_ ? RE::FullMatch(s2, *regex_) : + RE::PartialMatch(s2, *regex_); + } + + void DescribeTo(::std::ostream* os) const { + *os << (full_match_ ? "matches" : "contains") + << " regular expression "; + UniversalPrinter::Print(regex_->pattern(), os); + } + + void DescribeNegationTo(::std::ostream* os) const { + *os << "doesn't " << (full_match_ ? "match" : "contain") + << " regular expression "; + UniversalPrinter::Print(regex_->pattern(), os); + } + + private: + const internal::linked_ptr regex_; + const bool full_match_; + + GTEST_DISALLOW_ASSIGN_(MatchesRegexMatcher); +}; + +// Implements a matcher that compares the two fields of a 2-tuple +// using one of the ==, <=, <, etc, operators. The two fields being +// compared don't have to have the same type. +// +// The matcher defined here is polymorphic (for example, Eq() can be +// used to match a tuple, a tuple, +// etc). Therefore we use a template type conversion operator in the +// implementation. +// +// We define this as a macro in order to eliminate duplicated source +// code. +#define GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(name, op, relation) \ + class name##2Matcher { \ + public: \ + template \ + operator Matcher< ::std::tr1::tuple >() const { \ + return MakeMatcher(new Impl< ::std::tr1::tuple >); \ + } \ + template \ + operator Matcher&>() const { \ + return MakeMatcher(new Impl&>); \ + } \ + private: \ + template \ + class Impl : public MatcherInterface { \ + public: \ + virtual bool MatchAndExplain( \ + Tuple args, \ + MatchResultListener* /* listener */) const { \ + return ::std::tr1::get<0>(args) op ::std::tr1::get<1>(args); \ + } \ + virtual void DescribeTo(::std::ostream* os) const { \ + *os << "are " relation; \ + } \ + virtual void DescribeNegationTo(::std::ostream* os) const { \ + *os << "aren't " relation; \ + } \ + }; \ + } + +// Implements Eq(), Ge(), Gt(), Le(), Lt(), and Ne() respectively. +GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(Eq, ==, "an equal pair"); +GMOCK_IMPLEMENT_COMPARISON2_MATCHER_( + Ge, >=, "a pair where the first >= the second"); +GMOCK_IMPLEMENT_COMPARISON2_MATCHER_( + Gt, >, "a pair where the first > the second"); +GMOCK_IMPLEMENT_COMPARISON2_MATCHER_( + Le, <=, "a pair where the first <= the second"); +GMOCK_IMPLEMENT_COMPARISON2_MATCHER_( + Lt, <, "a pair where the first < the second"); +GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(Ne, !=, "an unequal pair"); + +#undef GMOCK_IMPLEMENT_COMPARISON2_MATCHER_ + +// Implements the Not(...) matcher for a particular argument type T. +// We do not nest it inside the NotMatcher class template, as that +// will prevent different instantiations of NotMatcher from sharing +// the same NotMatcherImpl class. +template +class NotMatcherImpl : public MatcherInterface { + public: + explicit NotMatcherImpl(const Matcher& matcher) + : matcher_(matcher) {} + + virtual bool MatchAndExplain(T x, MatchResultListener* listener) const { + return !matcher_.MatchAndExplain(x, listener); + } + + virtual void DescribeTo(::std::ostream* os) const { + matcher_.DescribeNegationTo(os); + } + + virtual void DescribeNegationTo(::std::ostream* os) const { + matcher_.DescribeTo(os); + } + + private: + const Matcher matcher_; + + GTEST_DISALLOW_ASSIGN_(NotMatcherImpl); +}; + +// Implements the Not(m) matcher, which matches a value that doesn't +// match matcher m. +template +class NotMatcher { + public: + explicit NotMatcher(InnerMatcher matcher) : matcher_(matcher) {} + + // This template type conversion operator allows Not(m) to be used + // to match any type m can match. + template + operator Matcher() const { + return Matcher(new NotMatcherImpl(SafeMatcherCast(matcher_))); + } + + private: + InnerMatcher matcher_; + + GTEST_DISALLOW_ASSIGN_(NotMatcher); +}; + +// Implements the AllOf(m1, m2) matcher for a particular argument type +// T. We do not nest it inside the BothOfMatcher class template, as +// that will prevent different instantiations of BothOfMatcher from +// sharing the same BothOfMatcherImpl class. +template +class BothOfMatcherImpl : public MatcherInterface { + public: + BothOfMatcherImpl(const Matcher& matcher1, const Matcher& matcher2) + : matcher1_(matcher1), matcher2_(matcher2) {} + + virtual void DescribeTo(::std::ostream* os) const { + *os << "("; + matcher1_.DescribeTo(os); + *os << ") and ("; + matcher2_.DescribeTo(os); + *os << ")"; + } + + virtual void DescribeNegationTo(::std::ostream* os) const { + *os << "("; + matcher1_.DescribeNegationTo(os); + *os << ") or ("; + matcher2_.DescribeNegationTo(os); + *os << ")"; + } + + virtual bool MatchAndExplain(T x, MatchResultListener* listener) const { + // If either matcher1_ or matcher2_ doesn't match x, we only need + // to explain why one of them fails. + StringMatchResultListener listener1; + if (!matcher1_.MatchAndExplain(x, &listener1)) { + *listener << listener1.str(); + return false; + } + + StringMatchResultListener listener2; + if (!matcher2_.MatchAndExplain(x, &listener2)) { + *listener << listener2.str(); + return false; + } + + // Otherwise we need to explain why *both* of them match. + const internal::string s1 = listener1.str(); + const internal::string s2 = listener2.str(); + + if (s1 == "") { + *listener << s2; + } else { + *listener << s1; + if (s2 != "") { + *listener << ", and " << s2; + } + } + return true; + } + + private: + const Matcher matcher1_; + const Matcher matcher2_; + + GTEST_DISALLOW_ASSIGN_(BothOfMatcherImpl); +}; + +#if GTEST_LANG_CXX11 +// MatcherList provides mechanisms for storing a variable number of matchers in +// a list structure (ListType) and creating a combining matcher from such a +// list. +// The template is defined recursively using the following template paramters: +// * kSize is the length of the MatcherList. +// * Head is the type of the first matcher of the list. +// * Tail denotes the types of the remaining matchers of the list. +template +struct MatcherList { + typedef MatcherList MatcherListTail; + typedef ::std::pair ListType; + + // BuildList stores variadic type values in a nested pair structure. + // Example: + // MatcherList<3, int, string, float>::BuildList(5, "foo", 2.0) will return + // the corresponding result of type pair>. + static ListType BuildList(const Head& matcher, const Tail&... tail) { + return ListType(matcher, MatcherListTail::BuildList(tail...)); + } + + // CreateMatcher creates a Matcher from a given list of matchers (built + // by BuildList()). CombiningMatcher is used to combine the matchers of the + // list. CombiningMatcher must implement MatcherInterface and have a + // constructor taking two Matchers as input. + template class CombiningMatcher> + static Matcher CreateMatcher(const ListType& matchers) { + return Matcher(new CombiningMatcher( + SafeMatcherCast(matchers.first), + MatcherListTail::template CreateMatcher( + matchers.second))); + } +}; + +// The following defines the base case for the recursive definition of +// MatcherList. +template +struct MatcherList<2, Matcher1, Matcher2> { + typedef ::std::pair ListType; + + static ListType BuildList(const Matcher1& matcher1, + const Matcher2& matcher2) { + return ::std::pair(matcher1, matcher2); + } + + template class CombiningMatcher> + static Matcher CreateMatcher(const ListType& matchers) { + return Matcher(new CombiningMatcher( + SafeMatcherCast(matchers.first), + SafeMatcherCast(matchers.second))); + } +}; + +// VariadicMatcher is used for the variadic implementation of +// AllOf(m_1, m_2, ...) and AnyOf(m_1, m_2, ...). +// CombiningMatcher is used to recursively combine the provided matchers +// (of type Args...). +template