-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes related to external-json-parser #165
Conversation
Would it be possible to merge this? It would be helpful for Gentoo package. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please take a look at the failing tests?
json-parser needs to be appended to Requires section of pkg-config file when bitlbee is configured to use external-json-parser. This change is needed for external plugins like bitlbee-steam.
install-dev target should not install bundled json.h when bitlbee is configured to use external-json-parser.
…alue The preprocessor must include correct json.h header file with respect to external_json_parser value, otherwise function prototypes and other definitions do not need to correspond with object used for linking. The state before this commit is that local version lib/json.h is used always for compilation and external_json_parser variable controls if local lib/json.o or global libjsonparser.so will be linked. In order to fix this problem, #include directives in lib/json_util.h and lib/oauth2.c were changed from "json.h" to <json.h> and preprocessor -I flags were moved after conditional json-parser flags, which is enough for solving the issue. Additionally, USE_EXTERNAL_JSON_PARSER macro is exported when external-json-parser is used and it is used in lib/json.h to trigger an error message, which should prevent similar mistakes in future.
f97b4f8
to
ca74f4d
Compare
Merge conflict was incorrectly resolved. I have rebased the branch on top of master. |
Thanks! |
Unfortunatelly, those changes leads to build failures here, as json.h somewhy gets included from |
changes from this PR are ok, I tested them in live ebuild. The failure is most probably caused by improper revert in commit 59c9fa4. The problem is that Which does not happen right now in commit 92a03a0
See duplicated I added the |
I'm not sure how this shall work: |
the system json-parser is meant to be included as <json.h>, its pkg-config adds -I/usr/include/json-parser The best way to ensure it gets included before the bitlbee json.h is probably to add its cflags to the front of the cflags. |
Thank you for the pointer! |
This PR fixes multiple issues for those who wish to use system
libjsonparser
. First two commits are related to external plugins, the last commit corrects whichjson.h
should be used whenexternal-json-parser
is set. See commit messages for more info.