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)
committerStéphane Glondu <glondu@debian.org>
Fri, 25 Jan 2019 13:59:28 +0000 (14:59 +0100)
commitb510096b63a6feaca745a5f2755b1984237fae06
treee807bf291ff4f6727ce56947fd19b2cfd6389558
parentc115b5e95d48609a9129b03dc84515f477d3e168
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