From 48b14a8228baf34607b0cf3dab1b41bb5ae450b7 Mon Sep 17 00:00:00 2001 From: Michael Wetter Date: Mon, 4 Dec 2023 15:46:51 -0800 Subject: [PATCH] Added header files and ifdef statements For #1818 --- IBPSA/Resources/C-Sources/fileWriterFree.c | 6 ++++++ IBPSA/Resources/C-Sources/fileWriterStructure.c | 3 +++ IBPSA/Resources/C-Sources/jsonWriterInit.c | 8 ++++++++ 3 files changed, 17 insertions(+) diff --git a/IBPSA/Resources/C-Sources/fileWriterFree.c b/IBPSA/Resources/C-Sources/fileWriterFree.c index 4085c48ca1..0c4ac49c91 100644 --- a/IBPSA/Resources/C-Sources/fileWriterFree.c +++ b/IBPSA/Resources/C-Sources/fileWriterFree.c @@ -2,6 +2,10 @@ * * Michael Wetter, LBNL 2018-05-12 */ + +#ifndef IBPSA_FILEWRITERFree_c +#define IBPSA_FILEWRITERFree_c + #include #include #include "ModelicaUtilities.h" @@ -62,3 +66,5 @@ void fileWriterFree(void* ptrFileWriter){ return; } + +#endif diff --git a/IBPSA/Resources/C-Sources/fileWriterStructure.c b/IBPSA/Resources/C-Sources/fileWriterStructure.c index 15fa6f8e2a..fafbbc18b8 100644 --- a/IBPSA/Resources/C-Sources/fileWriterStructure.c +++ b/IBPSA/Resources/C-Sources/fileWriterStructure.c @@ -1,6 +1,9 @@ #ifndef IBPSA_FILEWRITERStructure_c #define IBPSA_FILEWRITERStructure_c +#include +#include + #include "ModelicaUtilities.h" #include "fileWriterStructure.h" diff --git a/IBPSA/Resources/C-Sources/jsonWriterInit.c b/IBPSA/Resources/C-Sources/jsonWriterInit.c index 9d8ffbe88b..5e19354b49 100644 --- a/IBPSA/Resources/C-Sources/jsonWriterInit.c +++ b/IBPSA/Resources/C-Sources/jsonWriterInit.c @@ -5,6 +5,12 @@ * Filip Jorissen, KU Leuven */ +#ifndef IBPSA_JSONWRITERINIT_c +#define IBPSA_JSONWRITERINIT_c + +#include +#include + #include "fileWriterStructure.c" #include "ModelicaUtilities.h" @@ -90,3 +96,5 @@ void writeJson(void *ptrFileWriter, const double* varVals, const int numVals){ if (fclose(fOut) == EOF) ModelicaFormatError("In writeJson.c: Returned an error when closing %s.", ID->fileWriterName); } + +#endif