Add posix port headers for ib build tool support #60
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The problem
I love ib build tool. It help keeps my code sane and easy to integrate with other projects. When building one of the examples, I ran into a lot of errors with undefined references. The references were undefined because
ib
could not find the implementation of some functions. I believe this is becauseib
works by running the preprocessor on the target, then follows all headers files in the evaluated source code and repeats for all found implementations. The problem is the source code for modest is unable to be compiled this way. So I decided to change some things to allowib
to compile one of the examples. I hope this is ok :)The solution
In order for the build tool to work on Modest source code, I need to at least add missing headers for posix port implementation and any other implementations lacking a include-able header. I definitely missed some in this pr, but I didn't want to continue in case this pr is not welcome. I hope these changes are ok.
What worked for me
The following build tool specific code was not added to this pr because I thought it would be redundant when a
Makefile
is already used. I do not care to add build tool specific code to the project unless the project decided to replacemake
withib
. I gotib
working in a few steps after this code change.Create file to tell
ib
where project root issource/__ib__
Create file to specify simple compiler and make options. More info here
source/debug.cfg
Create a new target that can be compiled using
ib
, it's a modified version ofexamples/modest/css_property_to_node.c
. I needed to include myport/posix headers and any others to fix undefined reference errors.source/css_property_to_node.c
Build target using ib and run
Will any changes in this pr negatively impact other users of
Modest
?No impact at all, assuming I did not make any mistakes. The implementation is unchanged left intact.