Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nanopb/nanopb.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/pb.h
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2019-12-18 09:54:46 +0300
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2019-12-18 09:55:08 +0300
commit96062ccc1fd6e437b1e31a1f38d241e20d425aee (patch)
tree109e2e6a1081520988c8465956dcdf4c938c38c4 /pb.h
parent2b09fdc421eeeb9ab198bc57bf063e2bca8b8d88 (diff)
Windows and AVR build fixes
Diffstat (limited to 'pb.h')
-rw-r--r--pb.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/pb.h b/pb.h
index 9ef8019..32046a2 100644
--- a/pb.h
+++ b/pb.h
@@ -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.