aboutsummaryrefslogtreecommitdiffhomepage
path: root/parsing/q_coqast.ml4
diff options
context:
space:
mode:
authorGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2007-09-15 10:35:59 +0000
committerGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2007-09-15 10:35:59 +0000
commitda3edaa7eab2bed17cdfb2c455f2e6b5b0318c4d (patch)
tree14b6ae25300dc08c9ca5ff86ad88a78910df7b92 /parsing/q_coqast.ml4
parent4f39e160d05b0e5501a909b3041589303651670b (diff)
* Adding compability with ocaml 3.10 + camlp5 (rework of
the patch by S. Mimram) * for detecting architecture, also look for /bin/uname * restore the compatibility of kernel/byterun/coq_interp.c with ocaml 3.07 (caml_modify vs. modify). There is still an issue with this 3.07 and 64-bits architecture (see coqdev and a future bug report). git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10122 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'parsing/q_coqast.ml4')
-rw-r--r--parsing/q_coqast.ml413
1 files changed, 9 insertions, 4 deletions
diff --git a/parsing/q_coqast.ml4 b/parsing/q_coqast.ml4
index f5bab5d69..4b1dfd9e3 100644
--- a/parsing/q_coqast.ml4
+++ b/parsing/q_coqast.ml4
@@ -6,7 +6,7 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(*i camlp4use: "q_MLast.cmo pa_ifdef.cmo" i*)
+(*i camlp4use: "q_MLast.cmo pa_macro.cmo" i*)
(* $Id$ *)
@@ -21,13 +21,18 @@ let purge_str s =
if String.length s == 0 || s.[0] <> '$' then s
else String.sub s 1 (String.length s - 1)
+IFDEF OCAML308 THEN DEFINE NOP END
+IFDEF OCAML309 THEN DEFINE NOP END
+IFDEF CAMLP5 THEN DEFINE NOP END
+
let anti loc x =
let e =
let loc =
- ifdef OCAML_308 then
+ IFDEF NOP THEN
loc
- else
- (1, snd loc - fst loc)
+ ELSE
+ (1, snd loc - fst loc)
+ END
in <:expr< $lid:purge_str x$ >>
in
<:expr< $anti:e$ >>