diff options
author | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2019-12-18 09:54:46 +0300 |
---|---|---|
committer | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2019-12-18 09:55:08 +0300 |
commit | 96062ccc1fd6e437b1e31a1f38d241e20d425aee (patch) | |
tree | 109e2e6a1081520988c8465956dcdf4c938c38c4 /pb.h | |
parent | 2b09fdc421eeeb9ab198bc57bf063e2bca8b8d88 (diff) |
Windows and AVR build fixes
Diffstat (limited to 'pb.h')
-rw-r--r-- | pb.h | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -30,9 +30,13 @@ /* Disable support for custom streams (support only memory buffers). */ /* #define PB_BUFFER_ONLY 1 */ +/* Disable support for 64-bit datatypes, for compilers without int64_t + or to save some code space. */ +/* #define PB_WITHOUT_64BIT 1 */ + /* Switch back to the old-style callback function signature. * This was the default until nanopb-0.2.1. */ -/* #define PB_OLD_CALLBACK_STYLE */ +/* #define PB_OLD_CALLBACK_STYLE 1 */ /* Set the fieldinfo width for all messages using automatic width * selection. Valid values are 2, 4 and 8. Usually even if you need @@ -162,6 +166,13 @@ extern "C" { #error You should not lower PB_MAX_REQUIRED_FIELDS from the default value (64). #endif +#ifdef PB_WITHOUT_64BIT +#ifdef PB_CONVERT_DOUBLE_FLOAT +/* Cannot use doubles without 64-bit types */ +#undef PB_CONVERT_DOUBLE_FLOAT +#endif +#endif + /* List of possible field types. These are used in the autogenerated code. * Least-significant 4 bits tell the scalar type * Most-significant 4 bits specify repeated/required/packed etc. |