shithub: mc

Download patch

ref: f10d5dc7111a40d0daccee94eb263c8ee770ebad
parent: 5fcdb860c1c14604c276bc98a49f162d6fd367c2
author: Ori Bernstein <ori@eigenstate.org>
date: Sun Dec 28 20:32:35 EST 2014

Doing the api rename shuffle.

    libstd changed. Match it.

--- a/build.myr
+++ b/build.myr
@@ -304,11 +304,11 @@
 	So, we treat times where both secs and nsecs are equal as
 	up to date.
 	*/
-	match std.mtime(src)
+	match std.fmtime(src)
 	| `std.Some mt:	srcmt = mt
 	| `std.None:	std.fatal(1, "could not stat %s\n", src)
 	;;
-	match std.mtime(dst)
+	match std.fmtime(dst)
 	| `std.Some mt:	dstmt = mt
 	| `std.None:	-> false
 	;;
--- a/clean.myr
+++ b/clean.myr
@@ -51,7 +51,6 @@
 	var mchammer_files /* cant touch this */
 	var keys
 	var dg
-	var sb
 
 	if !myrdeps(&dg, out, leaves, islib)
 		std.fatal(1, "Could not load dependencies for %s\n", out)
@@ -63,9 +62,8 @@
 
 	keys = std.htkeys(dg.deps)
 	for k in keys
-		if !std.htgetv(mchammer_files, k, false) && sys.stat(k, &sb) == 0
+		if !std.htgetv(mchammer_files, k, false) && std.remove(k)
 			std.put("\tclean %s\n", k)
-			std.unlink(k)
 		;;
 	;;
 }
--- a/install.myr
+++ b/install.myr
@@ -52,12 +52,12 @@
 	path = std.pathjoin([destdir, instdir, prefix, file][:])
 	if delete
 		std.put("\t%s deleted\n", path)
-		if (std.unlink(path) < 0)
+		if !std.remove(path)
 			std.put("\t\tno such file %s\n", file)
 		;;
 	else
 		std.put("\t%s => %s\n", file, path)
-		std.unlink(path)
+		std.remove(path)
 		match std.slurp(file)
 		| `std.Fail m:	std.fatal(1, "Could not open %s for reading\n", file)
 		| `std.Ok buf: