From 67b40401cfa723b43961e2571a01785df7a6969d Mon Sep 17 00:00:00 2001 From: piotreklc60 Date: Mon, 17 Apr 2023 08:47:01 +0200 Subject: [PATCH] Added possibility to include external config file. Recently I was working on a project where I had to define CBOR_PARSER_ADVANCE_BYTES_FUNCTION and CBOR_PARSER_TRANSFER_STRING_FUNCTION macros. Unfortunately the library doesn't include any external config file and building system I am using provides only possibility to add simple preprocessor definitions (like definition = value) on building script level. Adding macros is not possible. For this reason I am asking if we can add above change - if I add simple definition CBOR_EXTERNAL_CFG by build system then cbor will require cbor_cfg.h file where I can add needed macros. --- src/cbor.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cbor.h b/src/cbor.h index be5bbc77..31b1036e 100644 --- a/src/cbor.h +++ b/src/cbor.h @@ -34,6 +34,10 @@ #include #include +#ifdef CBOR_EXTERNAL_CFG +#include "cbor_cfg.h" +#endif + #include "tinycbor-version.h" #define TINYCBOR_VERSION ((TINYCBOR_VERSION_MAJOR << 16) | (TINYCBOR_VERSION_MINOR << 8) | TINYCBOR_VERSION_PATCH)