aboutsummaryrefslogtreecommitdiff
path: root/kernel/write_uint63.ml
diff options
context:
space:
mode:
authorGaëtan Gilbert2019-07-05 15:01:26 +0200
committerGaëtan Gilbert2019-08-24 12:11:54 +0200
commit3083b2dcd9da8108df8118be2bc87f955311d2bd (patch)
tree1a0d3fce208d87aff0c7e160d301aa4386f1a099 /kernel/write_uint63.ml
parent07c4c8cac353883a2c6ae493556b9b544f3f38c0 (diff)
Simplify picking between uint63_63.ml and uint63_31.ml
- remove the architecture component (we don't do anything arch-specific so it was just a rewording of int_size) - have configure tell the make build system about int_size instead of reimplementing cp As a bonus, add the copyright header to uint63.mli.
Diffstat (limited to 'kernel/write_uint63.ml')
-rw-r--r--kernel/write_uint63.ml38
1 files changed, 0 insertions, 38 deletions
diff --git a/kernel/write_uint63.ml b/kernel/write_uint63.ml
deleted file mode 100644
index 57a170c8f5..0000000000
--- a/kernel/write_uint63.ml
+++ /dev/null
@@ -1,38 +0,0 @@
-(************************************************************************)
-(* * The Coq Proof Assistant / The Coq Development Team *)
-(* v * INRIA, CNRS and contributors - Copyright 1999-2019 *)
-(* <O___,, * (see CREDITS file for the list of authors) *)
-(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(* * (see LICENSE file for the text of the license) *)
-(************************************************************************)
-
-(** Equivalent of rm -f *)
-let safe_remove f =
- try Unix.chmod f 0o644; Sys.remove f with _ -> ()
-
-(** * Generate an implementation of 63-bit arithmetic *)
-let ml_file_copy input output =
- safe_remove output;
- let i = open_in input in
- let o = open_out output in
- let pr s = Printf.fprintf o s in
- pr "(* DO NOT EDIT THIS FILE: automatically generated by ./write_uint63.ml *)\n";
- pr "(* see uint63_amd64.ml and uint63_x86.ml *)\n";
- try
- while true do
- output_string o (input_line i); output_char o '\n'
- done
- with End_of_file ->
- close_in i;
- close_out o;
- Unix.chmod output 0o444
-
-let write_uint63 () =
- ml_file_copy
- (if max_int = 1073741823 (* 32-bits *) then "uint63_i386_31.ml"
- else (* 64 bits *) "uint63_amd64_63.ml")
- "uint63.ml"
-
-let () = write_uint63 ()