iondbproject / iondb

IonDB, a key-value datastore for resource constrained systems.
BSD 3-Clause "New" or "Revised" License
587 stars 48 forks source link

serial printf redirect not always included #17

Closed iondbproject closed 8 years ago

iondbproject commented 8 years ago

The serial_c_iface printf intercept must be included after the standard library definitions, otherwise it is overwritten. Currently, there are parts of our library that are effectively "dark" to the intercept, and any prints originating from such locations are not shown correctly.

To fix this issue, stdlib.h and stdio.h includes should be centralized to one location (probably kv_system) so we are aware of when it is being implicitly included. Then, serial_c_iface.h should be explicitly included in any file that utilizes printf.

Stickerpants commented 8 years ago

Now that there is a global entry point to IonDB (IonDB.h), this is no longer an issue.