aakash-sahai / nanopb

Automatically exported from code.google.com/p/nanopb
zlib License
0 stars 0 forks source link

Add PB_SYSTEM_HEADER compile-time option #62

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Some systems don't have the standard stdint.h, stdbool.h, stddef.h, string.h 
headers.

Add preprocessor option PB_SYSTEM_HEADER like this:

> #ifdef PB_SYSTEM_HEADER
> #include PB_SYSTEM_HEADER
> #else
> #include <stdint.h>
> #include <stdbool.h>
> #include <stddef.h>
> #include <string.h>
> #endif

Document the requirements for the header:

- Defining bool, uint8_t, (u)int32_t, (u)int64_t, size_t
- Provide memcpy() and memset()
- Provide offsetof() macro
- Maybe something else?

Add a test with a header that provides just these.

Original issue reported on code.google.com by Petteri.Aimonen on 2 Mar 2013 at 1:31

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 03e53930723d.

Original comment by Petteri.Aimonen on 9 Mar 2013 at 12:58

GoogleCodeExporter commented 9 years ago
Fix released in 0.2.1

Original comment by Petteri.Aimonen on 14 Apr 2013 at 7:19