From 30f46c0cf40a5e1822acb19e5b1c79b442bbf316 Mon Sep 17 00:00:00 2001 From: ploc <ploc@garoche.net> Date: Thu, 13 Jul 2017 21:30:00 -0700 Subject: [PATCH] Renamed math lib into lustrec_math to avoid conflicting calls to <math.h> --- Makefile.in | 4 ++-- include/{math.lusi => lustrec_math.lusi} | 0 include/{math.smt2 => lustrec_math.smt2} | 0 src/backends/EMF/EMF_library_calls.ml | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename include/{math.lusi => lustrec_math.lusi} (100%) rename include/{math.smt2 => lustrec_math.smt2} (100%) diff --git a/Makefile.in b/Makefile.in index ee8d17f4..894f3c62 100644 --- a/Makefile.in +++ b/Makefile.in @@ -4,7 +4,7 @@ bindir=@bindir@ datarootdir = ${prefix}/share includedir = ${prefix}/include -LUSI_LIBS=include/math.lusi include/conv.lusi +LUSI_LIBS=include/lustrec_math.lusi include/simulink_math_fcn.lusi include/conv.lusi LUSI_MPFR_LIB=include/mpfr_lustre.lusi LOCAL_BINDIR=bin LOCAL_DOCDIR=doc/manual @@ -40,7 +40,7 @@ clean: clean-lusic @make -C src clean dist-src-clean: clean - @rm -f config.log config.status include/*.lusic include/math.h include/conv.h include/mpfr_lustre.h + @rm -f config.log config.status include/*.lusic include/lustrec_math.h include/simulink_math_fcn.h include/conv.h include/mpfr_lustre.h @rm -f Makefile ./src/Makefile ./src/pluginList.ml ./src/version.ml ./src/_tags DIST_ARCHIVE_NAME=lustrec-$(shell $(LOCAL_BINDIR)/lustrec -version | grep version | cut -d, -f 2 | sed -e "s/ version //" -e "s/ (/-/" -e "s/ /-/" -e "s/\//-/" -e "s/)//")-src.tar.gz diff --git a/include/math.lusi b/include/lustrec_math.lusi similarity index 100% rename from include/math.lusi rename to include/lustrec_math.lusi diff --git a/include/math.smt2 b/include/lustrec_math.smt2 similarity index 100% rename from include/math.smt2 rename to include/lustrec_math.smt2 diff --git a/src/backends/EMF/EMF_library_calls.ml b/src/backends/EMF/EMF_library_calls.ml index 1c877438..cad87763 100644 --- a/src/backends/EMF/EMF_library_calls.ml +++ b/src/backends/EMF/EMF_library_calls.ml @@ -13,7 +13,7 @@ let pp_call fmt m f outputs inputs = if Corelang.is_imported_node decl then let inode = Corelang.imported_node_of_top decl in match inode.nodei_id, Filename.basename decl.top_decl_owner with - | name, (("math" | "conv") as lib) -> ( + | name, (("lustrec_math" | "simulink_math_fcn" | "conv") as lib) -> ( fprintf fmt "\"kind\": \"functioncall\",@ \"name\": \"%s\",@ \"library\": \"%s\",@ " name lib; fprintf fmt "\"lhs\": [@[%a@]],@ \"args\": [@[%a@]]" -- GitLab