build: build C sources using OCaml API with CAML_NAME_SPACE

This way no non-namespaced OCaml C symbols are used, reducing the risk
of clashes with other code.

The only exception is ocaml-augeas, which does not build with
CAML_NAME_SPACE; it will be fixed upstream, and it affects only
ocaml-augeas itself.
This commit is contained in:
Pino Toscano
2019-05-28 10:17:46 +02:00
parent c2918b8b74
commit 0cafcc0e88
12 changed files with 15 additions and 0 deletions

View File

@@ -78,6 +78,7 @@ endif
touch $@
libguestfsocaml_a_CPPFLAGS = \
-DCAML_NAME_SPACE \
-DGUESTFS_PRIVATE=1 \
-I$(top_builddir) -I$(OCAMLLIB) -I$(top_srcdir)/ocaml \
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \