Skip to content

Commit

Permalink
Implement go-gitea/gitea#1107 and go-gitea/gitea#815 fixes for buildi…
Browse files Browse the repository at this point in the history
…ng bolt on mips platforms.
  • Loading branch information
sapk committed Apr 12, 2017
1 parent e9cf4fa commit 606636e
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 0 deletions.
11 changes: 11 additions & 0 deletions bolt_mips.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// +build mips
package bolt

// maxMapSize represents the largest mmap size supported by Bolt.
const maxMapSize = 0x40000000 // 1GB

// maxAllocSize is the size used when creating array pointers.
const maxAllocSize = 0xFFFFFFF

// brokenUnaligned Are unaligned load/stores broken on this arch?
var brokenUnaligned = false
11 changes: 11 additions & 0 deletions bolt_mips64.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// +build mips64
package bolt

// maxMapSize represents the largest mmap size supported by Bolt.
const maxMapSize = 0xFFFFFFFFFFFF // 256TB

// maxAllocSize is the size used when creating array pointers.
const maxAllocSize = 0x7FFFFFFF

// brokenUnaligned Are unaligned load/stores broken on this arch?
var brokenUnaligned = false
11 changes: 11 additions & 0 deletions bolt_mips64le.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// +build mips64le
package bolt

// maxMapSize represents the largest mmap size supported by Bolt.
const maxMapSize = 0xFFFFFFFFFFFF // 256TB

// maxAllocSize is the size used when creating array pointers.
const maxAllocSize = 0x7FFFFFFF

// brokenUnaligned Are unaligned load/stores broken on this arch?
var brokenUnaligned = false
11 changes: 11 additions & 0 deletions bolt_mipsle.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// +build mipsle
package bolt

// maxMapSize represents the largest mmap size supported by Bolt.
const maxMapSize = 0x40000000 // 1GB

// maxAllocSize is the size used when creating array pointers.
const maxAllocSize = 0xFFFFFFF

// brokenUnaligned Are unaligned load/stores broken on this arch?
var brokenUnaligned = false

0 comments on commit 606636e

Please sign in to comment.