Skip to content

Commit 0b2e66d

Browse files
piotreklc60thiagomacieira
authored andcommitted
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.
1 parent 3cba6b1 commit 0b2e66d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/cbor.h

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434
#include <string.h>
3535
#include <stdio.h>
3636

37+
#ifdef CBOR_EXTERNAL_CFG
38+
#include "cbor_cfg.h"
39+
#endif
40+
3741
#include "tinycbor-version.h"
3842

3943
#define TINYCBOR_VERSION ((TINYCBOR_VERSION_MAJOR << 16) | (TINYCBOR_VERSION_MINOR << 8) | TINYCBOR_VERSION_PATCH)

0 commit comments

Comments
 (0)