summaryrefslogtreecommitdiff
path: root/mbld/deps.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-08-21 18:54:53 -0700
committerOri Bernstein <ori@eigenstate.org>2015-08-21 19:08:40 -0700
commit14aeadb41737f1765b6f3489f3b8da330aeccf39 (patch)
tree58eeceec013d79b26e024f47a065896e5a44a21d /mbld/deps.myr
parent0bd2678722f5f70a063190d54d12e62420f02b05 (diff)
downloadmc-14aeadb41737f1765b6f3489f3b8da330aeccf39.tar.gz
Get closer to the C ABI
Diffstat (limited to 'mbld/deps.myr')
-rw-r--r--mbld/deps.myr14
1 files changed, 8 insertions, 6 deletions
diff --git a/mbld/deps.myr b/mbld/deps.myr
index f8fd661..ca01175 100644
--- a/mbld/deps.myr
+++ b/mbld/deps.myr
@@ -14,6 +14,7 @@ pkg bld =
var usepat : regex.regex#
;;
+const Abiversion = 5
var usepat : regex.regex#
type dep = union
@@ -234,12 +235,13 @@ const scrapelibs = {dg, lib, incs
| `std.None: std.fatal("library {}: could not read usefile\n", lib)
;;
match bio.getbe32(f)
- | `std.Some 4: /* nothing: version matches. */
- | `std.Some 3: std.fput(1, "library {}: warning: old usefile version\n", lib)
- | `std.Some 2: std.fput(1, "library {}: warning: old usefile version\n", lib)
- | `std.Some 1: std.fput(1, "library {}: warning: old usefile version\n", lib)
- | `std.Some 0: std.fput(1, "library {}: warning: old usefile version\n", lib)
- | `std.Some _: std.fatal("library {}: usefile version unknown\n", lib)
+ | `std.Some Abiversion: /* nothing: version matches. */
+ | `std.Some v:
+ if v < Abiversion
+ std.fput(1, "library {}: warning: old abi version\n", lib)
+ else
+ std.fatal("library {}: usefile version unknown\n", lib)
+ ;;
| `std.None: std.fatal("library {}: corrutpt or invalid usefile\n", lib)
;;
std.slfree(rdstr(f))