From 939e8574a21846d21dcb57c553db15c967ea4d44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Tue, 23 Feb 2016 11:49:35 +0200 Subject: [PATCH] ethdb/rocksdb: disable rocksdb on Windows --- ethdb/rocksdb/rocksdb.go | 4 +++- ethdb/rocksdb/rocksdb_windows.go | 28 ++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 ethdb/rocksdb/rocksdb_windows.go diff --git a/ethdb/rocksdb/rocksdb.go b/ethdb/rocksdb/rocksdb.go index fd4074a21d..d5bdebe2bc 100644 --- a/ethdb/rocksdb/rocksdb.go +++ b/ethdb/rocksdb/rocksdb.go @@ -14,6 +14,8 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see . +// +build !windows + // Package rocksdb contains the RocksDB based database storage engine. package rocksdb @@ -23,7 +25,7 @@ import ( "runtime" "unsafe" - _ "github.com/cockroachdb/c-rocksdb" + _ "github.com/cockroachdb/c-rocksdb" // Placeholder package for CGO wrapper "github.com/ethereum/go-ethereum/ethdb" ) diff --git a/ethdb/rocksdb/rocksdb_windows.go b/ethdb/rocksdb/rocksdb_windows.go new file mode 100644 index 0000000000..27d6bebc96 --- /dev/null +++ b/ethdb/rocksdb/rocksdb_windows.go @@ -0,0 +1,28 @@ +// Copyright 2016 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library 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 Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package rocksdb + +import ( + "errors" + + "github.com/ethereum/go-ethereum/ethdb" +) + +// New errors out as the dependent libraries don't build currently. +func New(dir string, cache uint64, handles int) (ethdb.Database, error) { + return nil, errors.New("windows not supported") +}