aboutsummaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace
diff options
context:
space:
mode:
authorGustav Simonsson <gustav.simonsson@gmail.com>2015-05-06 23:38:28 +0800
committerGustav Simonsson <gustav.simonsson@gmail.com>2015-05-06 23:38:28 +0800
commit054947def77bc2352f90f79206146c93dd5422d0 (patch)
tree6fa28557d97fea99960a4b18e6ac74776e921cda /Godeps/_workspace
parentf4341c7b7f5dc037542d48efd74dc4691a9814a0 (diff)
downloadgo-tangerine-054947def77bc2352f90f79206146c93dd5422d0.tar
go-tangerine-054947def77bc2352f90f79206146c93dd5422d0.tar.gz
go-tangerine-054947def77bc2352f90f79206146c93dd5422d0.tar.bz2
go-tangerine-054947def77bc2352f90f79206146c93dd5422d0.tar.lz
go-tangerine-054947def77bc2352f90f79206146c93dd5422d0.tar.xz
go-tangerine-054947def77bc2352f90f79206146c93dd5422d0.tar.zst
go-tangerine-054947def77bc2352f90f79206146c93dd5422d0.zip
Add ethash linux & windows build fixes
Diffstat (limited to 'Godeps/_workspace')
-rw-r--r--Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go6
-rw-r--r--Godeps/_workspace/src/github.com/ethereum/ethash/ethashc.go1
-rw-r--r--Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io.h2
-rw-r--r--Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/util.h8
4 files changed, 9 insertions, 8 deletions
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go
index 1ee980765..5b94711c4 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go
+++ b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go
@@ -127,12 +127,12 @@ func (l *Light) Verify(block pow.Block) bool {
return h256ToHash(ret.result).Big().Cmp(target) <= 0
}
-func h256ToHash(in C.struct_ethash_h256) common.Hash {
+func h256ToHash(in C.ethash_h256_t) common.Hash {
return *(*common.Hash)(unsafe.Pointer(&in.b))
}
-func hashToH256(in common.Hash) C.struct_ethash_h256 {
- return C.struct_ethash_h256{b: *(*[32]C.uint8_t)(unsafe.Pointer(&in[0]))}
+func hashToH256(in common.Hash) C.ethash_h256_t {
+ return C.ethash_h256_t{b: *(*[32]C.uint8_t)(unsafe.Pointer(&in[0]))}
}
func (l *Light) getCache(blockNum uint64) *cache {
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/ethashc.go b/Godeps/_workspace/src/github.com/ethereum/ethash/ethashc.go
index 9c208b3f2..25863828f 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/ethashc.go
+++ b/Godeps/_workspace/src/github.com/ethereum/ethash/ethashc.go
@@ -2,6 +2,7 @@ package ethash
/*
#cgo CFLAGS: -std=gnu99 -Wall
+#cgo windows CFLAGS: -mno-stack-arg-probe
#cgo LDFLAGS: -lm
#include "src/libethash/internal.c"
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io.h b/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io.h
index 26c82f111..4fe46d756 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io.h
+++ b/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io.h
@@ -49,7 +49,7 @@ enum ethash_io_rc {
// small hack for windows. I don't feel I should use va_args and forward just
// to have this one function properly cross-platform abstracted
-#if defined(_WIN32)
+#if defined(_WIN32) && !defined(__GNUC__)
#define snprintf(...) sprintf_s(__VA_ARGS__)
#endif
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/util.h b/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/util.h
index c5fc6e55b..0d2307f3d 100644
--- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/util.h
+++ b/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/util.h
@@ -26,11 +26,11 @@
extern "C" {
#endif
-#ifdef _MSC_VER
+//#ifdef _MSC_VER
void debugf(char const* str, ...);
-#else
-#define debugf printf
-#endif
+//#else
+//#define debugf printf
+//#endif
static inline uint32_t min_u32(uint32_t a, uint32_t b)
{