Update mongodb to 2.4.3

Notable changes in 2.4.x:
- Text Search
- New Geospatial Indexes with GeoJSON and Improved Spherical Geometry
- New Hashed Index and Sharding with a Hashed Shard Key
- Role Based Access Control and New Privilege Documents
- Enhanced SSL Support
- Compatibility Change: User Uniqueness Enforced
- --setParameter Option Available on the mongos and mongod Command Line
- Changes to serverStatus Output Including Additional Metrics
- Increased Chunk Migration Write Concern
- BSON Document Validation Enabled by Default for mongod and mongorestore
- Support for Multiple Concurrent Index Builds
- db.killOp() Can Now Kill Foreground Index Builds
- Improved Validation of Index Types
- $setOnInsert - New Update Operator
- Limit Number of Elements in an Array
- JavaScript Engine Changed to V8
- Additional Limitations for Map-Reduce and $where Operations
- Improvements to the Aggregation Framework

See full release notes:

http://docs.mongodb.org/manual/release-notes/2.4/
This commit is contained in:
Filip Hajny 2013-06-03 13:58:34 +00:00 committed by Thomas Klausner
parent 8a018760cb
commit de95c8bf25
25 changed files with 390 additions and 339 deletions

View file

@ -1,6 +1,6 @@
# $NetBSD: Makefile,v 1.20 2013/03/04 21:58:38 thomasklausner Exp $
# $NetBSD: Makefile,v 1.21 2013/06/03 13:58:34 fhajny Exp $
DISTNAME= mongodb-src-r2.2.2
DISTNAME= mongodb-src-r2.4.3
PKGNAME= ${DISTNAME:S/src-r//}
CATEGORIES= databases
MASTER_SITES= http://downloads.mongodb.org/src/
@ -17,8 +17,6 @@ BUILD_DEPENDS+= scons-[0-9]*:../../devel/scons
SCONS_BIN= ${PREFIX}/bin/scons
SCONS_ARGS= ${_MAKE_JOBS}
# Does not build with lang/spidermonkey yet
# SCONS_ARGS+= --use-system-all=USE-SYSTEM-ALL
SCONS_ARGS+= --use-system-tcmalloc=USE-SYSTEM-TCMALLOC
SCONS_ARGS+= --use-system-pcre=USE-SYSTEM-PCRE
SCONS_ARGS+= --use-system-boost=USE-SYSTEM-BOOST
@ -27,6 +25,14 @@ SCONS_ARGS+= --use-system-snappy=USE-SYSTEM-SNAPPY
SCONS_ARGS+= --cc=${WRAPPER_BINDIR}/${CC}
SCONS_ARGS+= --cxx=${WRAPPER_BINDIR}/${CXX}
.include "../../mk/bsd.fast.prefs.mk"
.if ${MACHINE_ARCH} == "x86_64"
SCONS_ARGS+= --64
.else
SCONS_ARGS+= --32
.endif
.include "options.mk"
BUILD_DEFS+= VARBASE
@ -108,7 +114,5 @@ post-install:
.include "../../devel/boost-python/buildlink3.mk"
.include "../../devel/pcre/buildlink3.mk"
.include "../../devel/snappy/buildlink3.mk"
# Disabling until this can be made to work
# .include "../../lang/spidermonkey/buildlink3.mk"
.include "../../net/libpcap/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

View file

@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.7 2012/10/02 08:48:46 fhajny Exp $
@comment $NetBSD: PLIST,v 1.8 2013/06/03 13:58:34 fhajny Exp $
bin/bsondump
bin/mongo
bin/mongod
@ -13,10 +13,30 @@ bin/mongos
bin/mongosniff
bin/mongostat
bin/mongotop
include/base/configuration_variable_manager.h
include/base/counter.h
include/base/disallow_copying.h
include/base/error_codes.h
include/base/global_initializer.h
include/base/global_initializer_registerer.h
include/base/init.h
include/base/initializer.h
include/base/initializer_context.h
include/base/initializer_dependency_graph.h
include/base/initializer_function.h
include/base/make_string_vector.h
include/base/owned_pointer_map.h
include/base/owned_pointer_vector.h
include/base/parse_number.h
include/base/status.h
include/base/string_data-inl.h
include/base/string_data.h
include/bson/bson-inl.h
include/bson/bson.h
include/bson/bson_builder_base.h
include/bson/bson_db.h
include/bson/bson_field.h
include/bson/bson_validate.h
include/bson/bsonelement.h
include/bson/bsonmisc.h
include/bson/bsonobj.h
@ -26,11 +46,10 @@ include/bson/bsontypes.h
include/bson/inline_decls.h
include/bson/oid.h
include/bson/ordering.h
include/bson/stringdata.h
include/bson/util/atomic_int.h
include/bson/util/bson_extract.h
include/bson/util/builder.h
include/bson/util/misc.h
include/client/authentication_table.h
include/client/authlevel.h
include/client/clientOnly-private.h
include/client/connpool.h
@ -45,19 +64,23 @@ include/client/gridfs.h
include/client/model.h
include/client/parallel.h
include/client/redef_macros.h
include/client/sasl_client_authenticate.h
include/client/syncclusterconnection.h
include/client/undef_macros.h
include/db/background.h
include/db/btree.h
include/db/btree_stats.h
include/db/btreebuilder.h
include/db/btreecursor.h
include/db/btreeposition.h
include/db/cc_by_loc.h
include/db/client.h
include/db/client_common.h
include/db/client_basic.h
include/db/clientcursor.h
include/db/cloner.h
include/db/cmdline.h
include/db/collection.h
include/db/commands.h
include/db/compact.h
include/db/curop-inl.h
include/db/curop.h
include/db/cursor.h
@ -80,22 +103,28 @@ include/db/dur_stats.h
include/db/durop.h
include/db/explain.h
include/db/extsort.h
include/db/field_ref.h
include/db/filever.h
include/db/globals.h
include/db/hasher.h
include/db/hashindex.h
include/db/index.h
include/db/index_insertion_continuation.h
include/db/index_rebuilder.h
include/db/index_set.h
include/db/index_update.h
include/db/indexkey.h
include/db/initialize_server_global_state.h
include/db/instance.h
include/db/interrupt_status.h
include/db/interrupt_status_mongod.h
include/db/intervalbtreecursor.h
include/db/introspect.h
include/db/jsobj.h
include/db/jsobjmanipulator.h
include/db/json.h
include/db/key.h
include/db/keypattern.h
include/db/kill_current_op.h
include/db/lasterror.h
include/db/lockstat.h
include/db/lockstate.h
@ -109,17 +138,18 @@ include/db/namespace.h
include/db/namespace_details-inl.h
include/db/namespace_details.h
include/db/namespacestring.h
include/db/nonce.h
include/db/oplog.h
include/db/oplogreader.h
include/db/ops/count.h
include/db/ops/delete.h
include/db/ops/modifier_base.h
include/db/ops/query.h
include/db/ops/update.h
include/db/ops/update_internal.h
include/db/pagefault.h
include/db/pdfile.h
include/db/pdfile_private.h
include/db/pdfile_version.h
include/db/prefetch.h
include/db/projection.h
include/db/queryoptimizer.h
@ -145,19 +175,41 @@ include/db/replutil.h
include/db/resource.h
include/db/restapi.h
include/db/scanandorder.h
include/db/security.h
include/db/security_common.h
include/db/server_parameters.h
include/db/server_parameters_inline.h
include/db/sort_phase_one.h
include/db/stats/counters.h
include/db/stats/fine_clock.h
include/db/stats/service_stats.h
include/db/stats/snapshots.h
include/db/stats/timer_stats.h
include/db/stats/top.h
include/db/taskqueue.h
include/db/ttl.h
include/mongo/base/configuration_variable_manager.h
include/mongo/base/counter.h
include/mongo/base/disallow_copying.h
include/mongo/base/error_codes.h
include/mongo/base/global_initializer.h
include/mongo/base/global_initializer_registerer.h
include/mongo/base/init.h
include/mongo/base/initializer.h
include/mongo/base/initializer_context.h
include/mongo/base/initializer_dependency_graph.h
include/mongo/base/initializer_function.h
include/mongo/base/make_string_vector.h
include/mongo/base/owned_pointer_map.h
include/mongo/base/owned_pointer_vector.h
include/mongo/base/parse_number.h
include/mongo/base/status.h
include/mongo/base/string_data-inl.h
include/mongo/base/string_data.h
include/mongo/bson/bson-inl.h
include/mongo/bson/bson.h
include/mongo/bson/bson_builder_base.h
include/mongo/bson/bson_db.h
include/mongo/bson/bson_field.h
include/mongo/bson/bson_validate.h
include/mongo/bson/bsonelement.h
include/mongo/bson/bsonmisc.h
include/mongo/bson/bsonobj.h
@ -167,11 +219,10 @@ include/mongo/bson/bsontypes.h
include/mongo/bson/inline_decls.h
include/mongo/bson/oid.h
include/mongo/bson/ordering.h
include/mongo/bson/stringdata.h
include/mongo/bson/util/atomic_int.h
include/mongo/bson/util/bson_extract.h
include/mongo/bson/util/builder.h
include/mongo/bson/util/misc.h
include/mongo/client/authentication_table.h
include/mongo/client/authlevel.h
include/mongo/client/clientOnly-private.h
include/mongo/client/connpool.h
@ -186,19 +237,40 @@ include/mongo/client/gridfs.h
include/mongo/client/model.h
include/mongo/client/parallel.h
include/mongo/client/redef_macros.h
include/mongo/client/sasl_client_authenticate.h
include/mongo/client/syncclusterconnection.h
include/mongo/client/undef_macros.h
include/mongo/db/auth/action_set.h
include/mongo/db/auth/action_type.h
include/mongo/db/auth/auth_external_state.h
include/mongo/db/auth/auth_external_state_d.h
include/mongo/db/auth/auth_external_state_mock.h
include/mongo/db/auth/auth_external_state_s.h
include/mongo/db/auth/auth_external_state_server_common.h
include/mongo/db/auth/auth_index_d.h
include/mongo/db/auth/authentication_session.h
include/mongo/db/auth/authorization_manager.h
include/mongo/db/auth/mongo_authentication_session.h
include/mongo/db/auth/principal.h
include/mongo/db/auth/principal_name.h
include/mongo/db/auth/principal_set.h
include/mongo/db/auth/privilege.h
include/mongo/db/auth/privilege_set.h
include/mongo/db/auth/security_key.h
include/mongo/db/background.h
include/mongo/db/btree.h
include/mongo/db/btree_stats.h
include/mongo/db/btreebuilder.h
include/mongo/db/btreecursor.h
include/mongo/db/btreeposition.h
include/mongo/db/cc_by_loc.h
include/mongo/db/client.h
include/mongo/db/client_common.h
include/mongo/db/client_basic.h
include/mongo/db/clientcursor.h
include/mongo/db/cloner.h
include/mongo/db/cmdline.h
include/mongo/db/collection.h
include/mongo/db/commands.h
include/mongo/db/compact.h
include/mongo/db/curop-inl.h
include/mongo/db/curop.h
include/mongo/db/cursor.h
@ -221,22 +293,28 @@ include/mongo/db/dur_stats.h
include/mongo/db/durop.h
include/mongo/db/explain.h
include/mongo/db/extsort.h
include/mongo/db/field_ref.h
include/mongo/db/filever.h
include/mongo/db/globals.h
include/mongo/db/hasher.h
include/mongo/db/hashindex.h
include/mongo/db/index.h
include/mongo/db/index_insertion_continuation.h
include/mongo/db/index_rebuilder.h
include/mongo/db/index_set.h
include/mongo/db/index_update.h
include/mongo/db/indexkey.h
include/mongo/db/initialize_server_global_state.h
include/mongo/db/instance.h
include/mongo/db/interrupt_status.h
include/mongo/db/interrupt_status_mongod.h
include/mongo/db/intervalbtreecursor.h
include/mongo/db/introspect.h
include/mongo/db/jsobj.h
include/mongo/db/jsobjmanipulator.h
include/mongo/db/json.h
include/mongo/db/key.h
include/mongo/db/keypattern.h
include/mongo/db/kill_current_op.h
include/mongo/db/lasterror.h
include/mongo/db/lockstat.h
include/mongo/db/lockstate.h
@ -250,17 +328,18 @@ include/mongo/db/namespace.h
include/mongo/db/namespace_details-inl.h
include/mongo/db/namespace_details.h
include/mongo/db/namespacestring.h
include/mongo/db/nonce.h
include/mongo/db/oplog.h
include/mongo/db/oplogreader.h
include/mongo/db/ops/count.h
include/mongo/db/ops/delete.h
include/mongo/db/ops/modifier_base.h
include/mongo/db/ops/query.h
include/mongo/db/ops/update.h
include/mongo/db/ops/update_internal.h
include/mongo/db/pagefault.h
include/mongo/db/pdfile.h
include/mongo/db/pdfile_private.h
include/mongo/db/pdfile_version.h
include/mongo/db/prefetch.h
include/mongo/db/projection.h
include/mongo/db/queryoptimizer.h
@ -286,12 +365,14 @@ include/mongo/db/replutil.h
include/mongo/db/resource.h
include/mongo/db/restapi.h
include/mongo/db/scanandorder.h
include/mongo/db/security.h
include/mongo/db/security_common.h
include/mongo/db/server_parameters.h
include/mongo/db/server_parameters_inline.h
include/mongo/db/sort_phase_one.h
include/mongo/db/stats/counters.h
include/mongo/db/stats/fine_clock.h
include/mongo/db/stats/service_stats.h
include/mongo/db/stats/snapshots.h
include/mongo/db/stats/timer_stats.h
include/mongo/db/stats/top.h
include/mongo/db/taskqueue.h
include/mongo/db/ttl.h
@ -305,38 +386,64 @@ include/mongo/platform/bits.h
include/mongo/platform/compiler.h
include/mongo/platform/compiler_gcc.h
include/mongo/platform/compiler_msvc.h
include/mongo/platform/cstdint.h
include/mongo/platform/float_utils.h
include/mongo/platform/random.h
include/mongo/platform/strtoll.h
include/mongo/platform/unordered_map.h
include/mongo/platform/unordered_set.h
include/mongo/platform/windows_basic.h
include/mongo/s/balance.h
include/mongo/s/balancer_policy.h
include/mongo/s/chunk.h
include/mongo/s/chunk_diff.h
include/mongo/s/chunk_diff.hpp
include/mongo/s/chunk_version.h
include/mongo/s/client_info.h
include/mongo/s/cluster_client_internal.h
include/mongo/s/collection_manager.h
include/mongo/s/config.h
include/mongo/s/config_upgrade.h
include/mongo/s/config_upgrade_helpers.h
include/mongo/s/cursors.h
include/mongo/s/d_chunk_manager.h
include/mongo/s/d_logic.h
include/mongo/s/d_writeback.h
include/mongo/s/field_parser-inl.h
include/mongo/s/field_parser.h
include/mongo/s/grid.h
include/mongo/s/interrupt_status_mongos.h
include/mongo/s/metadata_loader.h
include/mongo/s/mongo_version_range.h
include/mongo/s/request.h
include/mongo/s/server.h
include/mongo/s/shard.h
include/mongo/s/shard_version.h
include/mongo/s/shardkey.h
include/mongo/s/stats.h
include/mongo/s/stale_exception.h
include/mongo/s/strategy.h
include/mongo/s/util.h
include/mongo/s/type_changelog.h
include/mongo/s/type_chunk.h
include/mongo/s/type_collection.h
include/mongo/s/type_config_version.h
include/mongo/s/type_database.h
include/mongo/s/type_lockpings.h
include/mongo/s/type_locks.h
include/mongo/s/type_mongos.h
include/mongo/s/type_settings.h
include/mongo/s/type_shard.h
include/mongo/s/type_tags.h
include/mongo/s/version_manager.h
include/mongo/s/writeback_listener.h
include/mongo/scripting/bench.h
include/mongo/scripting/bson_template_evaluator.h
include/mongo/scripting/engine.h
include/mongo/scripting/engine_spidermonkey.h
include/mongo/scripting/engine_spidermonkey_internal.h
include/mongo/scripting/engine_v8.h
include/mongo/scripting/v8_db.h
include/mongo/scripting/v8_deadline_monitor.h
include/mongo/scripting/v8_profiler.h
include/mongo/scripting/v8_utils.h
include/mongo/scripting/v8_wrapper.h
include/mongo/server.h
include/mongo/shell/linenoise.h
include/mongo/shell/linenoise_utf8.h
@ -376,11 +483,19 @@ include/mongo/util/concurrency/threadlocal.h
include/mongo/util/concurrency/ticketholder.h
include/mongo/util/concurrency/value.h
include/mongo/util/debug_util.h
include/mongo/util/descriptive_stats-inl.h
include/mongo/util/descriptive_stats.h
include/mongo/util/elapsed_tracker.h
include/mongo/util/embedded_builder.h
include/mongo/util/exception_filter_win32.h
include/mongo/util/exit_code.h
include/mongo/util/fail_point.h
include/mongo/util/fail_point_registry.h
include/mongo/util/fail_point_service.h
include/mongo/util/file.h
include/mongo/util/file_allocator.h
include/mongo/util/goodies.h
include/mongo/util/gsasl_session.h
include/mongo/util/hashtab.h
include/mongo/util/heapcheck.h
include/mongo/util/hex.h
@ -406,6 +521,7 @@ include/mongo/util/net/message_port.h
include/mongo/util/net/message_server.h
include/mongo/util/net/miniwebserver.h
include/mongo/util/net/sock.h
include/mongo/util/net/ssl_manager.h
include/mongo/util/ntservice.h
include/mongo/util/optime.h
include/mongo/util/password.h
@ -414,11 +530,14 @@ include/mongo/util/processinfo.h
include/mongo/util/progress_meter.h
include/mongo/util/queue.h
include/mongo/util/ramlog.h
include/mongo/util/safe_num.h
include/mongo/util/scopeguard.h
include/mongo/util/signal_handlers.h
include/mongo/util/stack_introspect.h
include/mongo/util/stacktrace.h
include/mongo/util/startup_test.h
include/mongo/util/string_map.h
include/mongo/util/string_map_internal.h
include/mongo/util/string_writer.h
include/mongo/util/stringutils.h
include/mongo/util/systeminfo.h
@ -431,39 +550,78 @@ include/mongo/util/timer-win32-inl.h
include/mongo/util/timer.h
include/mongo/util/touch_pages.h
include/mongo/util/trace.h
include/mongo/util/unordered_fast_key_table.h
include/mongo/util/unordered_fast_key_table_internal.h
include/mongo/util/version.h
include/mongo/util/winutil.h
include/pch.h
include/platform/atomic_intrinsics.h
include/platform/atomic_intrinsics_gcc.h
include/platform/atomic_intrinsics_win32.h
include/platform/atomic_word.h
include/platform/basic.h
include/platform/bits.h
include/platform/compiler.h
include/platform/compiler_gcc.h
include/platform/compiler_msvc.h
include/platform/cstdint.h
include/platform/float_utils.h
include/platform/random.h
include/platform/strtoll.h
include/platform/unordered_map.h
include/platform/unordered_set.h
include/platform/windows_basic.h
include/s/balance.h
include/s/balancer_policy.h
include/s/chunk.h
include/s/chunk_diff.h
include/s/chunk_diff.hpp
include/s/chunk_version.h
include/s/client_info.h
include/s/cluster_client_internal.h
include/s/collection_manager.h
include/s/config.h
include/s/config_upgrade.h
include/s/config_upgrade_helpers.h
include/s/cursors.h
include/s/d_chunk_manager.h
include/s/d_logic.h
include/s/d_writeback.h
include/s/field_parser-inl.h
include/s/field_parser.h
include/s/grid.h
include/s/interrupt_status_mongos.h
include/s/metadata_loader.h
include/s/mongo_version_range.h
include/s/request.h
include/s/server.h
include/s/shard.h
include/s/shard_version.h
include/s/shardkey.h
include/s/stats.h
include/s/stale_exception.h
include/s/strategy.h
include/s/util.h
include/s/type_changelog.h
include/s/type_chunk.h
include/s/type_collection.h
include/s/type_config_version.h
include/s/type_database.h
include/s/type_lockpings.h
include/s/type_locks.h
include/s/type_mongos.h
include/s/type_settings.h
include/s/type_shard.h
include/s/type_tags.h
include/s/version_manager.h
include/s/writeback_listener.h
include/scripting/bench.h
include/scripting/bson_template_evaluator.h
include/scripting/engine.h
include/scripting/engine_spidermonkey.h
include/scripting/engine_spidermonkey_internal.h
include/scripting/engine_v8.h
include/scripting/v8_db.h
include/scripting/v8_deadline_monitor.h
include/scripting/v8_profiler.h
include/scripting/v8_utils.h
include/scripting/v8_wrapper.h
include/server.h
include/targetver.h
include/util/admin_access.h
@ -497,11 +655,19 @@ include/util/concurrency/threadlocal.h
include/util/concurrency/ticketholder.h
include/util/concurrency/value.h
include/util/debug_util.h
include/util/descriptive_stats-inl.h
include/util/descriptive_stats.h
include/util/elapsed_tracker.h
include/util/embedded_builder.h
include/util/exception_filter_win32.h
include/util/exit_code.h
include/util/fail_point.h
include/util/fail_point_registry.h
include/util/fail_point_service.h
include/util/file.h
include/util/file_allocator.h
include/util/goodies.h
include/util/gsasl_session.h
include/util/hashtab.h
include/util/heapcheck.h
include/util/hex.h
@ -527,6 +693,7 @@ include/util/net/message_port.h
include/util/net/message_server.h
include/util/net/miniwebserver.h
include/util/net/sock.h
include/util/net/ssl_manager.h
include/util/ntservice.h
include/util/optime.h
include/util/password.h
@ -535,11 +702,14 @@ include/util/processinfo.h
include/util/progress_meter.h
include/util/queue.h
include/util/ramlog.h
include/util/safe_num.h
include/util/scopeguard.h
include/util/signal_handlers.h
include/util/stack_introspect.h
include/util/stacktrace.h
include/util/startup_test.h
include/util/string_map.h
include/util/string_map_internal.h
include/util/string_writer.h
include/util/stringutils.h
include/util/systeminfo.h
@ -552,6 +722,8 @@ include/util/timer-win32-inl.h
include/util/timer.h
include/util/touch_pages.h
include/util/trace.h
include/util/unordered_fast_key_table.h
include/util/unordered_fast_key_table_internal.h
include/util/version.h
include/util/winutil.h
lib/libmongoclient.a

View file

@ -1,2 +1,2 @@
- Please take a look at http://secunia.com/advisories/52721 when updating this
package.
Proper support for system v8 should be implemented,
as soon as wip/v8 stops being a total mess.

View file

@ -1,23 +1,17 @@
$NetBSD: distinfo,v 1.11 2012/11/29 14:52:38 fhajny Exp $
$NetBSD: distinfo,v 1.12 2013/06/03 13:58:34 fhajny Exp $
SHA1 (mongodb-src-r2.2.2.tar.gz) = 64f96c4149cb79fbbad62c9b374f659cb46575b2
RMD160 (mongodb-src-r2.2.2.tar.gz) = 189519fa17dd2c4119ae15cf6c79cd6d61cb3c26
Size (mongodb-src-r2.2.2.tar.gz) = 10171793 bytes
SHA1 (mongodb-src-r2.4.3.tar.gz) = 6ceed642547cacda0de8dffd692cedc1fc100814
RMD160 (mongodb-src-r2.4.3.tar.gz) = 439905f87c1f40101da5dd47381f6bae183ebd00
Size (mongodb-src-r2.4.3.tar.gz) = 14108398 bytes
SHA1 (patch-SConstruct) = 60d86492d4222276951aaae6c1b78f7c8defc1ba
SHA1 (patch-db__nonce.cpp) = 93fdb0a71ac4865fbd1052f0df96fb30ba6f743e
SHA1 (patch-debian_mongodb.conf) = d52115eadf871ee1d68073f26ceb7ed90aeeb9ef
SHA1 (patch-shell__dbshell.cpp) = 799b292bb21637c64682a8b4fbd54d78783165c9
SHA1 (patch-src_SConscript.client) = 18ce1c8641359ce8e5624c9658fd8851ec182e2f
SHA1 (patch-src__mongo__db__db.cpp) = 792767dd1a29f77a105d544bf661202bce37e355
SHA1 (patch-src__mongo__db__dur.cpp) = 2c6eaba383dc71eef9d26e22edd0274f4508baec
SHA1 (patch-src__mongo__db__dur_journal.cpp) = 522dd6fcfa6df2bcb4adff42ca152e7d59bced4f
SHA1 (patch-src__mongo__db__dur_recover.cpp) = 5608504cf59a0b835278bd84b9fac400f0c745df
SHA1 (patch-src__mongo__db__instance.cpp) = 3bae566305148e266d14867341d16e6fafce8dbf
SHA1 (patch-src__mongo__db__pdfile.cpp) = 184d745fd38265ae21bd3fc1cdbf3bba9d533cbc
SHA1 (patch-src__mongo__dbtests__framework.cpp) = 793fa30bd14456304de40612257c3513f5972bab
SHA1 (patch-src__mongo__pch.h) = 99820beca4fa6416ab01dafd827489fdcdd992d9
SHA1 (patch-src__mongo__shell__shell_utils_launcher.cpp) = fc6421bed0629ee7b8da7466f786d2c5864a1102
SHA1 (patch-src__mongo__tools__restore.cpp) = 25f5d348aca2adb34f298c65f7ea869a4ad74025
SHA1 (patch-src__mongo__tools__tool.cpp) = bc5d7cd9ca57e92bc13d0e4c24bd619d8f03e68f
SHA1 (patch-src__mongo__util__time_support.h) = 724ad7008f059ecfb30f264b2cc62648bcaa7967
SHA1 (patch-src_SConscript.client) = db092746557aec197f5ff84808a17896acbbc338
SHA1 (patch-src_mongo_base_initializer.h) = 408aae3c53c5db843218c7938ca83589ee9971fd
SHA1 (patch-src_mongo_db_db.cpp) = 2164aa92e3c33952a9da9d6018a2a806ff3fc1bf
SHA1 (patch-src_mongo_platform_random.cpp) = 51aaf952664cb9be63c41198606e0c38cdad5546
SHA1 (patch-src_mongo_shell_shell__utils__launcher.h) = 9402bce2d5ec0671953c89a76bc21a5fe99152f5
SHA1 (patch-src_mongo_util_time__support.h) = d42c4f22a980b77166f6a22616b7cbc7ac7d8e0b
SHA1 (patch-src_third__party_s2_s2.cc) = 59079e2841ff0156ce7283917be3b85f10a9f41f
SHA1 (patch-src_third__party_s2_s2polygonbuilder.cc) = f88bfabb69685412948ecd5c04dcf0a52520e134
SHA1 (patch-util__file_allocator.cpp) = c5ffa5c65ef02fd5afc5a672d2f2695af48140aa

View file

@ -1,14 +0,0 @@
$NetBSD: patch-db__nonce.cpp,v 1.2 2012/10/02 08:48:46 fhajny Exp $
Add support for NetBSD.
--- src/mongo/db/nonce.cpp.orig 2012-08-28 05:28:11.000000000 +0000
+++ src/mongo/db/nonce.cpp
@@ -38,7 +38,7 @@ namespace mongo {
if( _initialized ) return;
_initialized = true;
-#if defined(__linux__) || defined(__sunos__) || defined(__APPLE__)
+#if defined(__linux__) || defined(__sunos__) || defined(__APPLE__) || defined(__netbsd__)
_devrandom = new ifstream("/dev/urandom", ios::binary|ios::in);
if ( !_devrandom->is_open() )
massert( 10353 , std::string("can't open dev/urandom: ") + strerror(errno), 0 );

View file

@ -1,10 +1,9 @@
$NetBSD: patch-src_SConscript.client,v 1.1 2012/10/02 08:48:46 fhajny Exp $
$NetBSD: patch-src_SConscript.client,v 1.2 2013/06/03 13:58:35 fhajny Exp $
Fix installation as per
https://bugs.gentoo.org/show_bug.cgi?id=433507.
--- src/SConscript.client.orig 2012-08-28 05:28:11.000000000 +0000
+++ src/SConscript.client
@@ -134,7 +134,7 @@ env.Install(
Installation fix as per https://jira.mongodb.org/browse/SERVER-5575.
--- src/SConscript.client.orig 2013-04-22 14:48:39.000000000 +0000
+++ src/SConscript.client 2013-06-03 12:34:55.407594501 +0000
@@ -177,7 +177,7 @@ env.Install(
# install
prefix = GetOption("prefix")
@ -12,4 +11,4 @@ https://bugs.gentoo.org/show_bug.cgi?id=433507.
+env.InstallAs(prefix + "/lib", '${LIBPREFIX}mongoclient${LIBSUFFIX}')
for x in clientHeaderDirectories:
env.Install(prefix + "/include/mongo/" + x,
inst = env.Install(prefix + "/include/mongo/" + x,

View file

@ -1,36 +0,0 @@
$NetBSD: patch-src__mongo__db__db.cpp,v 1.1 2012/11/29 14:52:38 fhajny Exp $
Backport Boost 1.50.x support based on
https://github.com/mongodb/mongo/commit/b3b1949de30b5dc1bde3d91aa197a8587d17d193
--- src/mongo/db/db.cpp.orig 2012-08-28 05:28:11.000000000 +0000
+++ src/mongo/db/db.cpp
@@ -348,7 +348,7 @@ namespace mongo {
boost::filesystem::path path( dbpath );
for ( boost::filesystem::directory_iterator i( path );
i != boost::filesystem::directory_iterator(); ++i ) {
- string fileName = boost::filesystem::path(*i).leaf();
+ string fileName = boost::filesystem::path(*i).leaf().string();
if ( boost::filesystem::is_directory( *i ) &&
fileName.length() && fileName[ 0 ] == '$' )
boost::filesystem::remove_all( *i );
@@ -748,11 +748,6 @@ static int mongoDbMain(int argc, char* a
dbExecCommand = argv[0];
srand(curTimeMicros());
-#if( BOOST_VERSION >= 104500 )
- boost::filesystem::path::default_name_check( boost::filesystem2::no_check );
-#else
- boost::filesystem::path::default_name_check( boost::filesystem::no_check );
-#endif
{
unsigned x = 0x12345678;
@@ -1083,7 +1078,7 @@ static int mongoDbMain(int argc, char* a
if (params.count("shutdown")){
bool failed = false;
- string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native_file_string();
+ string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).string();
if ( !boost::filesystem::exists( name ) || boost::filesystem::file_size( name ) == 0 )
failed = true;

View file

@ -1,15 +0,0 @@
$NetBSD: patch-src__mongo__db__dur.cpp,v 1.1 2012/11/29 14:52:38 fhajny Exp $
Backport Boost 1.50.x support based on
https://github.com/mongodb/mongo/commit/b3b1949de30b5dc1bde3d91aa197a8587d17d193
--- src/mongo/db/dur.cpp.orig 2012-08-28 05:28:11.000000000 +0000
+++ src/mongo/db/dur.cpp
@@ -770,7 +770,7 @@ namespace mongo {
bool samePartition = true;
try {
- const string dbpathDir = boost::filesystem::path(dbpath).native_directory_string();
+ const string dbpathDir = boost::filesystem::path(dbpath).string();
samePartition = onSamePartition(getJournalDir().string(), dbpathDir);
}
catch(...) {

View file

@ -1,24 +0,0 @@
$NetBSD: patch-src__mongo__db__dur_journal.cpp,v 1.1 2012/11/29 14:52:38 fhajny Exp $
Backport Boost 1.50.x support based on
https://github.com/mongodb/mongo/commit/b3b1949de30b5dc1bde3d91aa197a8587d17d193
--- src/mongo/db/dur_journal.cpp.orig 2012-08-28 05:28:11.000000000 +0000
+++ src/mongo/db/dur_journal.cpp
@@ -176,7 +176,7 @@ namespace mongo {
for ( boost::filesystem::directory_iterator i( getJournalDir() );
i != boost::filesystem::directory_iterator();
++i ) {
- string fileName = boost::filesystem::path(*i).leaf();
+ string fileName = boost::filesystem::path(*i).leaf().string();
if( anyFiles || str::startsWith(fileName, "j._") )
return true;
}
@@ -194,7 +194,7 @@ namespace mongo {
for ( boost::filesystem::directory_iterator i( getJournalDir() );
i != boost::filesystem::directory_iterator();
++i ) {
- string fileName = boost::filesystem::path(*i).leaf();
+ string fileName = boost::filesystem::path(*i).leaf().string();
if( str::startsWith(fileName, "j._") ) {
try {
removeOldJournalFile(*i);

View file

@ -1,24 +0,0 @@
$NetBSD: patch-src__mongo__db__dur_recover.cpp,v 1.1 2012/11/29 14:52:38 fhajny Exp $
Backport Boost 1.50.x support based on
https://github.com/mongodb/mongo/commit/b3b1949de30b5dc1bde3d91aa197a8587d17d193
--- src/mongo/db/dur_recover.cpp.orig 2012-08-28 05:28:11.000000000 +0000
+++ src/mongo/db/dur_recover.cpp
@@ -72,7 +72,7 @@ namespace mongo {
i != boost::filesystem::directory_iterator();
++i ) {
boost::filesystem::path filepath = *i;
- string fileName = boost::filesystem::path(*i).leaf();
+ string fileName = boost::filesystem::path(*i).leaf().string();
if( str::startsWith(fileName, "j._") ) {
unsigned u = str::toUnsigned( str::after(fileName, '_') );
if( m.count(u) ) {
@@ -85,7 +85,7 @@ namespace mongo {
if( i != m.begin() && m.count(i->first - 1) == 0 ) {
uasserted(13532,
str::stream() << "unexpected file in journal directory " << dir.string()
- << " : " << boost::filesystem::path(i->second).leaf() << " : can't find its preceeding file");
+ << " : " << boost::filesystem::path(i->second).leaf().string() << " : can't find its preceeding file");
}
files.push_back(i->second);
}

View file

@ -1,31 +0,0 @@
$NetBSD: patch-src__mongo__db__instance.cpp,v 1.1 2012/11/29 14:52:38 fhajny Exp $
Backport Boost 1.50.x support based on
https://github.com/mongodb/mongo/commit/b3b1949de30b5dc1bde3d91aa197a8587d17d193
--- src/mongo/db/instance.cpp.orig 2012-08-28 05:28:11.000000000 +0000
+++ src/mongo/db/instance.cpp
@@ -833,13 +833,13 @@ namespace mongo {
i != boost::filesystem::directory_iterator(); ++i ) {
if ( directoryperdb ) {
boost::filesystem::path p = *i;
- string dbName = p.leaf();
+ string dbName = p.leaf().string();
p /= ( dbName + ".ns" );
if ( exists( p ) )
names.push_back( dbName );
}
else {
- string fileName = boost::filesystem::path(*i).leaf();
+ string fileName = boost::filesystem::path(*i).leaf().string();
if ( fileName.length() > 3 && fileName.substr( fileName.length() - 3, 3 ) == ".ns" )
names.push_back( fileName.substr( 0, fileName.length() - 3 ) );
}
@@ -1102,7 +1102,7 @@ namespace mongo {
}
void acquirePathLock(bool doingRepair) {
- string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native_file_string();
+ string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).string();
bool oldFile = false;

View file

@ -1,24 +0,0 @@
$NetBSD: patch-src__mongo__db__pdfile.cpp,v 1.1 2012/11/29 14:52:38 fhajny Exp $
Backport Boost 1.50.x support based on
https://github.com/mongodb/mongo/commit/b3b1949de30b5dc1bde3d91aa197a8587d17d193
--- src/mongo/db/pdfile.cpp.orig 2012-08-28 05:28:11.000000000 +0000
+++ src/mongo/db/pdfile.cpp
@@ -1675,7 +1675,7 @@ namespace mongo {
virtual bool apply( const Path &p ) {
if ( !boost::filesystem::exists( p ) )
return false;
- boostRenameWrapper( p, newPath_ / ( p.leaf() + ".bak" ) );
+ boostRenameWrapper( p, newPath_ / ( p.leaf().string() + ".bak" ) );
return true;
}
virtual const char * op() const {
@@ -1783,7 +1783,7 @@ namespace mongo {
uniqueReservedPath( ( preserveClonedFilesOnFailure || backupOriginalFiles ) ?
"backup" : "_tmp" );
MONGO_ASSERT_ON_EXCEPTION( boost::filesystem::create_directory( reservedPath ) );
- string reservedPathString = reservedPath.native_directory_string();
+ string reservedPathString = reservedPath.string();
bool res;
{

View file

@ -1,15 +0,0 @@
$NetBSD: patch-src__mongo__dbtests__framework.cpp,v 1.1 2012/11/29 14:52:38 fhajny Exp $
Backport Boost 1.50.x support based on
https://github.com/mongodb/mongo/commit/b3b1949de30b5dc1bde3d91aa197a8587d17d193
--- src/mongo/dbtests/framework.cpp.orig 2012-08-28 05:28:11.000000000 +0000
+++ src/mongo/dbtests/framework.cpp
@@ -199,7 +199,7 @@ namespace mongo {
boost::filesystem::create_directory(p);
}
- string dbpathString = p.native_directory_string();
+ string dbpathString = p.string();
dbpath = dbpathString.c_str();
cmdLine.prealloc = false;

View file

@ -1,15 +0,0 @@
$NetBSD: patch-src__mongo__pch.h,v 1.1 2012/11/29 14:52:38 fhajny Exp $
Backport Boost 1.50.x support based on
https://github.com/mongodb/mongo/commit/b3b1949de30b5dc1bde3d91aa197a8587d17d193
--- src/mongo/pch.h.orig 2012-08-28 05:28:11.000000000 +0000
+++ src/mongo/pch.h
@@ -44,7 +44,7 @@
#include "string.h"
#include "limits.h"
-#define BOOST_FILESYSTEM_VERSION 2
+#define BOOST_FILESYSTEM_VERSION 3
#include <boost/shared_ptr.hpp>
#include <boost/smart_ptr.hpp>
#include <boost/function.hpp>

View file

@ -1,15 +0,0 @@
$NetBSD: patch-src__mongo__shell__shell_utils_launcher.cpp,v 1.1 2012/11/29 14:52:39 fhajny Exp $
Backport Boost 1.50.x support based on
https://github.com/mongodb/mongo/commit/b3b1949de30b5dc1bde3d91aa197a8587d17d193
--- src/mongo/shell/shell_utils_launcher.cpp.orig 2012-08-28 05:28:11.000000000 +0000
+++ src/mongo/shell/shell_utils_launcher.cpp
@@ -184,7 +184,7 @@ namespace mongo {
}
#endif
- _argv.push_back( programPath.native_file_string() );
+ _argv.push_back( programPath.string() );
_port = -1;

View file

@ -1,33 +0,0 @@
$NetBSD: patch-src__mongo__tools__restore.cpp,v 1.1 2012/11/29 14:52:39 fhajny Exp $
Backport Boost 1.50.x support based on
https://github.com/mongodb/mongo/commit/b3b1949de30b5dc1bde3d91aa197a8587d17d193
--- src/mongo/tools/restore.cpp.orig 2012-08-28 05:28:11.000000000 +0000
+++ src/mongo/tools/restore.cpp
@@ -174,7 +174,7 @@ public:
log(2) << "drillDown: " << root.string() << endl;
// skip hidden files and directories
- if (root.leaf()[0] == '.' && root.leaf() != ".")
+ if (root.leaf().string()[0] == '.' && root.leaf().string() != ".")
return;
if ( is_directory( root ) ) {
@@ -255,7 +255,7 @@ public:
verify( ns.size() );
- string oldCollName = root.leaf(); // Name of the collection that was dumped from
+ string oldCollName = root.leaf().string(); // Name of the collection that was dumped from
oldCollName = oldCollName.substr( 0 , oldCollName.find_last_of( "." ) );
if (use_coll) {
ns += "." + _coll;
@@ -287,7 +287,7 @@ public:
if (!boost::filesystem::exists(metadataFile.string())) {
// This is fine because dumps from before 2.1 won't have a metadata file, just print a warning.
// System collections shouldn't have metadata so don't warn if that file is missing.
- if (!startsWith(metadataFile.leaf(), "system.")) {
+ if (!startsWith(metadataFile.leaf().string(), "system.")) {
log() << metadataFile.string() << " not found. Skipping." << endl;
}
} else {

View file

@ -1,19 +0,0 @@
$NetBSD: patch-src__mongo__tools__tool.cpp,v 1.1 2012/11/29 14:52:39 fhajny Exp $
Backport Boost 1.50.x support based on
https://github.com/mongodb/mongo/commit/b3b1949de30b5dc1bde3d91aa197a8587d17d193
--- src/mongo/tools/tool.cpp.orig 2012-08-28 05:28:11.000000000 +0000
+++ src/mongo/tools/tool.cpp
@@ -118,12 +118,6 @@ namespace mongo {
// we want durability to be disabled.
cmdLine.dur = false;
-#if( BOOST_VERSION >= 104500 )
- boost::filesystem::path::default_name_check( boost::filesystem2::no_check );
-#else
- boost::filesystem::path::default_name_check( boost::filesystem::no_check );
-#endif
-
_name = argv[0];
/* using the same style as db.cpp */

View file

@ -1,16 +0,0 @@
$NetBSD: patch-src__mongo__util__time_support.h,v 1.1 2012/11/29 14:52:39 fhajny Exp $
Make sure we stay compatible with Boost 1.50.x
--- src/mongo/util/time_support.h.orig 2012-08-28 05:28:11.000000000 +0000
+++ src/mongo/util/time_support.h
@@ -86,10 +86,6 @@ namespace mongo {
struct tm *gmtime(const time_t *timep);
struct tm *localtime(const time_t *timep);
-#if defined(MONGO_BOOST_TIME_UTC_HACK) || (BOOST_VERSION >= 105000)
#define MONGO_BOOST_TIME_UTC boost::TIME_UTC_
-#else
-#define MONGO_BOOST_TIME_UTC boost::TIME_UTC
-#endif
} // namespace mongo

View file

@ -0,0 +1,13 @@
$NetBSD: patch-src_mongo_base_initializer.h,v 1.1 2013/06/03 13:58:35 fhajny Exp $
Fixes at least SunOS.
--- src/mongo/base/initializer.h.orig 2013-05-30 12:52:25.408767013 +0000
+++ src/mongo/base/initializer.h 2013-05-30 12:50:56.078895696 +0000
@@ -17,6 +17,7 @@
#include <string>
#include <vector>
+#include <unistd.h>
#include "mongo/base/configuration_variable_manager.h"
#include "mongo/base/disallow_copying.h"

View file

@ -0,0 +1,14 @@
$NetBSD: patch-src_mongo_db_db.cpp,v 1.1 2013/06/03 13:58:35 fhajny Exp $
Avoid ambiguous overload.
--- src/mongo/db/db.cpp.orig 2013-04-22 14:48:39.000000000 +0000
+++ src/mongo/db/db.cpp 2013-06-03 10:53:01.722318315 +0000
@@ -250,7 +250,7 @@ namespace mongo {
toLog.append( "startTimeLocal", buf );
toLog.append( "cmdLine", CmdLine::getParsedOpts() );
- toLog.append( "pid", getpid() );
+ toLog.append( "pid", (int)getpid() );
BSONObjBuilder buildinfo( toLog.subobjStart("buildinfo"));

View file

@ -0,0 +1,14 @@
$NetBSD: patch-src_mongo_platform_random.cpp,v 1.1 2013/06/03 13:58:35 fhajny Exp $
Add NetBSD support.
--- src/mongo/platform/random.cpp.orig 2013-04-22 14:48:39.000000000 +0000
+++ src/mongo/platform/random.cpp 2013-05-30 11:08:13.504585844 +0000
@@ -105,7 +105,7 @@ namespace mongo {
return new WinSecureRandom();
}
-#elif defined(__linux__) || defined(__sunos__) || defined(__APPLE__)
+#elif defined(__linux__) || defined(__sunos__) || defined(__APPLE__) || defined(__netbsd__)
class InputStreamSecureRandom : public SecureRandom {
public:

View file

@ -0,0 +1,14 @@
$NetBSD: patch-src_mongo_shell_shell__utils__launcher.h,v 1.1 2013/06/03 13:58:35 fhajny Exp $
Fix as per https://jira.mongodb.org/browse/SERVER-9753
--- src/mongo/shell/shell_utils_launcher.h.orig 2013-04-22 14:48:39.000000000 +0000
+++ src/mongo/shell/shell_utils_launcher.h 2013-05-30 12:43:17.108737513 +0000
@@ -73,7 +73,7 @@ namespace mongo {
/** @return pid for a registered port. */
pid_t pidForPort( int port ) const;
/** @return port (-1 if doesn't exist) for a registered pid. */
- int portForPid( int port ) const;
+ int portForPid( pid_t pid ) const;
/** Register an unregistered port. */
void registerPort( int port, pid_t pid, int output );
void deletePort( int port );

View file

@ -0,0 +1,18 @@
$NetBSD: patch-src_mongo_util_time__support.h,v 1.1 2013/06/03 13:58:35 fhajny Exp $
This file gets included at two places, and the condition only works
properly the first time.
--- src/mongo/util/time_support.h.orig 2013-04-22 14:48:39.000000000 +0000
+++ src/mongo/util/time_support.h 2013-05-30 14:18:35.026376057 +0000
@@ -96,10 +96,6 @@ namespace mongo {
struct tm *gmtime(const time_t *timep);
struct tm *localtime(const time_t *timep);
-#if defined(MONGO_BOOST_TIME_UTC_HACK) || (BOOST_VERSION >= 105000)
#define MONGO_BOOST_TIME_UTC boost::TIME_UTC_
-#else
-#define MONGO_BOOST_TIME_UTC boost::TIME_UTC
-#endif
} // namespace mongo

View file

@ -0,0 +1,76 @@
$NetBSD: patch-src_third__party_s2_s2.cc,v 1.1 2013/06/03 13:58:35 fhajny Exp $
Avoid ambiguous overload.
--- src/third_party/s2/s2.cc.orig 2013-04-23 12:55:09.000000000 +0000
+++ src/third_party/s2/s2.cc
@@ -699,8 +699,8 @@ S2::LengthMetric const S2::kAvgAngleSpan
S2::LengthMetric const S2::kMinWidth(
S2_PROJECTION == S2_LINEAR_PROJECTION ? sqrt(2. / 3) : // 0.816
- S2_PROJECTION == S2_TAN_PROJECTION ? M_PI / (2 * sqrt(2)) : // 1.111
- S2_PROJECTION == S2_QUADRATIC_PROJECTION ? 2 * sqrt(2) / 3 : // 0.943
+ S2_PROJECTION == S2_TAN_PROJECTION ? M_PI / (2 * sqrt((double)2)) : // 1.111
+ S2_PROJECTION == S2_QUADRATIC_PROJECTION ? 2 * sqrt((double)2) / 3 : // 0.943
0);
S2::LengthMetric const S2::kMaxWidth(S2::kMaxAngleSpan.deriv());
@@ -713,9 +713,9 @@ S2::LengthMetric const S2::kAvgWidth(
0);
S2::LengthMetric const S2::kMinEdge(
- S2_PROJECTION == S2_LINEAR_PROJECTION ? 2 * sqrt(2) / 3 : // 0.943
- S2_PROJECTION == S2_TAN_PROJECTION ? M_PI / (2 * sqrt(2)) : // 1.111
- S2_PROJECTION == S2_QUADRATIC_PROJECTION ? 2 * sqrt(2) / 3 : // 0.943
+ S2_PROJECTION == S2_LINEAR_PROJECTION ? 2 * sqrt((double)2) / 3 : // 0.943
+ S2_PROJECTION == S2_TAN_PROJECTION ? M_PI / (2 * sqrt((double)2)) : // 1.111
+ S2_PROJECTION == S2_QUADRATIC_PROJECTION ? 2 * sqrt((double)2) / 3 : // 0.943
0);
S2::LengthMetric const S2::kMaxEdge(S2::kMaxAngleSpan.deriv());
@@ -728,14 +728,14 @@ S2::LengthMetric const S2::kAvgEdge(
0);
S2::LengthMetric const S2::kMinDiag(
- S2_PROJECTION == S2_LINEAR_PROJECTION ? 2 * sqrt(2) / 3 : // 0.943
- S2_PROJECTION == S2_TAN_PROJECTION ? M_PI * sqrt(2) / 3 : // 1.481
- S2_PROJECTION == S2_QUADRATIC_PROJECTION ? 8 * sqrt(2) / 9 : // 1.257
+ S2_PROJECTION == S2_LINEAR_PROJECTION ? 2 * sqrt((double)2) / 3 : // 0.943
+ S2_PROJECTION == S2_TAN_PROJECTION ? M_PI * sqrt((double)2) / 3 : // 1.481
+ S2_PROJECTION == S2_QUADRATIC_PROJECTION ? 8 * sqrt((double)2) / 9 : // 1.257
0);
S2::LengthMetric const S2::kMaxDiag(
- S2_PROJECTION == S2_LINEAR_PROJECTION ? 2 * sqrt(2) : // 2.828
- S2_PROJECTION == S2_TAN_PROJECTION ? M_PI * sqrt(2. / 3) : // 2.565
+ S2_PROJECTION == S2_LINEAR_PROJECTION ? 2 * sqrt((double)2) : // 2.828
+ S2_PROJECTION == S2_TAN_PROJECTION ? M_PI * sqrt((double)2. / 3) : // 2.565
S2_PROJECTION == S2_QUADRATIC_PROJECTION ? 2.438654594434021032 : // 2.439
0);
@@ -746,9 +746,9 @@ S2::LengthMetric const S2::kAvgDiag(
0);
S2::AreaMetric const S2::kMinArea(
- S2_PROJECTION == S2_LINEAR_PROJECTION ? 4 / (3 * sqrt(3)) : // 0.770
- S2_PROJECTION == S2_TAN_PROJECTION ? (M_PI*M_PI) / (4*sqrt(2)) : // 1.745
- S2_PROJECTION == S2_QUADRATIC_PROJECTION ? 8 * sqrt(2) / 9 : // 1.257
+ S2_PROJECTION == S2_LINEAR_PROJECTION ? 4 / (3 * sqrt((double)3)) : // 0.770
+ S2_PROJECTION == S2_TAN_PROJECTION ? (M_PI*M_PI) / (4*sqrt((double)2)) : // 1.745
+ S2_PROJECTION == S2_QUADRATIC_PROJECTION ? 8 * sqrt((double)2) / 9 : // 1.257
0);
S2::AreaMetric const S2::kMaxArea(
@@ -761,10 +761,10 @@ S2::AreaMetric const S2::kAvgArea(4 * M_
// This is true for all projections.
double const S2::kMaxEdgeAspect = (
- S2_PROJECTION == S2_LINEAR_PROJECTION ? sqrt(2) : // 1.414
- S2_PROJECTION == S2_TAN_PROJECTION ? sqrt(2) : // 1.414
+ S2_PROJECTION == S2_LINEAR_PROJECTION ? sqrt((double)2) : // 1.414
+ S2_PROJECTION == S2_TAN_PROJECTION ? sqrt((double)2) : // 1.414
S2_PROJECTION == S2_QUADRATIC_PROJECTION ? 1.442615274452682920 : // 1.443
0);
-double const S2::kMaxDiagAspect = sqrt(3); // 1.732
+double const S2::kMaxDiagAspect = sqrt((double)3); // 1.732
// This is true for all projections.

View file

@ -0,0 +1,14 @@
$NetBSD: patch-src_third__party_s2_s2polygonbuilder.cc,v 1.1 2013/06/03 13:58:35 fhajny Exp $
Avoid ambiguous overload.
--- src/third_party/s2/s2polygonbuilder.cc.orig 2013-04-23 12:55:09.000000000 +0000
+++ src/third_party/s2/s2polygonbuilder.cc
@@ -55,7 +55,7 @@ void S2PolygonBuilderOptions::set_vertex
}
void S2PolygonBuilderOptions::set_edge_splice_fraction(double fraction) {
- CHECK(fraction < sqrt(3) / 2);
+ CHECK(fraction < sqrt((double)3) / 2);
edge_splice_fraction_ = fraction;
}