Avoid multiple declarations in generated .c files in -output-obj
authorStephane Glondu <steph@glondu.net>
Thu, 21 Apr 2011 16:39:31 +0000 (18:39 +0200)
committerMehdi Dogguy <mehdi@debian.org>
Wed, 21 Dec 2016 23:48:59 +0000 (23:48 +0000)
commit427e717f1ca888274ad3f2910ac0e570b5d24fef
tree19150286db907ddf968c20d2183d9ab13798a4ef
parent39f5683b69a7b99021ea697ce2dbca56c7fd77b7
Avoid multiple declarations in generated .c files in -output-obj

In -output-obj mode, <caml/mlvalues.h> (which contains some
primitives) is included in the generated .c file, leading to errors
when compiling with g++ (multiple declarations).

There are probably better implementations (in particular, in this one,
care must be taken when changing the list of primitives available in
mlvalues.h), but this is a small and (not too) intrusive patch.

Bug: http://caml.inria.fr/mantis/view.php?id=5254
Signed-off-by: Stephane Glondu <steph@glondu.net>
Gbp-Pq: Name 0005-Avoid-multiple-declarations-in-generated-.c-files-in.patch
bytecomp/bytelink.ml
bytecomp/symtable.ml
bytecomp/symtable.mli