From e4e4c9dc2ca1719784a4e4647cae9cc657e53231 Mon Sep 17 00:00:00 2001 From: Nick Owens Date: Sat, 14 May 2016 15:46:35 -0700 Subject: [PATCH] mvcc: set bolt options to nil for non-linux systems --- mvcc/backend/boltoption_darwin.go | 19 ----------------- ...ption_solaris.go => boltoption_default.go} | 2 ++ mvcc/backend/boltoption_freebsd.go | 19 ----------------- ...boltoption_unix.go => boltoption_linux.go} | 2 -- mvcc/backend/boltoption_windows.go | 21 ------------------- 5 files changed, 2 insertions(+), 61 deletions(-) delete mode 100644 mvcc/backend/boltoption_darwin.go rename mvcc/backend/{boltoption_solaris.go => boltoption_default.go} (97%) delete mode 100644 mvcc/backend/boltoption_freebsd.go rename mvcc/backend/{boltoption_unix.go => boltoption_linux.go} (98%) delete mode 100644 mvcc/backend/boltoption_windows.go diff --git a/mvcc/backend/boltoption_darwin.go b/mvcc/backend/boltoption_darwin.go deleted file mode 100644 index 6094bd70e..000000000 --- a/mvcc/backend/boltoption_darwin.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2015 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package backend - -import "github.com/boltdb/bolt" - -var boltOpenOptions *bolt.Options = nil diff --git a/mvcc/backend/boltoption_solaris.go b/mvcc/backend/boltoption_default.go similarity index 97% rename from mvcc/backend/boltoption_solaris.go rename to mvcc/backend/boltoption_default.go index 3d3344762..92019c184 100644 --- a/mvcc/backend/boltoption_solaris.go +++ b/mvcc/backend/boltoption_default.go @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// +build !linux + package backend import "github.com/boltdb/bolt" diff --git a/mvcc/backend/boltoption_freebsd.go b/mvcc/backend/boltoption_freebsd.go deleted file mode 100644 index 6094bd70e..000000000 --- a/mvcc/backend/boltoption_freebsd.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2015 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package backend - -import "github.com/boltdb/bolt" - -var boltOpenOptions *bolt.Options = nil diff --git a/mvcc/backend/boltoption_unix.go b/mvcc/backend/boltoption_linux.go similarity index 98% rename from mvcc/backend/boltoption_unix.go rename to mvcc/backend/boltoption_linux.go index 87087b5e8..4ee9b05a7 100644 --- a/mvcc/backend/boltoption_unix.go +++ b/mvcc/backend/boltoption_linux.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// +build linux - package backend import ( diff --git a/mvcc/backend/boltoption_windows.go b/mvcc/backend/boltoption_windows.go deleted file mode 100644 index c22111d8a..000000000 --- a/mvcc/backend/boltoption_windows.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2015 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package backend - -import "github.com/boltdb/bolt" - -// TODO: support syscall.MAP_POPULATE in windows. -// Need upstream patch from boltdb/bolt. -var boltOpenOptions *bolt.Options = nil