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

add preprocessor flag to disable automatic inclusion of qrintf.h and some standard headers #14

Merged
merged 2 commits into from May 9, 2015

Conversation

Projects
None yet
1 participant
@kazuho
Member

kazuho commented May 9, 2015

As discussed in #11 (comment) this PR adjusts qrintf.h so that if the compiler is invoked with -DQRINTF_NO_AUTO_INCLUDE then the automatic inclusion of qrinf.h would not have any effect. In the case, the contents of qrintf.h will take effect the second time the file is included (i.e. first time by using #include).

The PR also moves qrintf.h from share/qrintf to include/ so that it could easily be included via #include.

In short, with the changes you can define certain macros that need to be defined before including any header files (e.g. _GNU_SOURCE) in the source files and yet use qrintf, with the premise that qrintf.h is included manually.

kazuho added a commit that referenced this pull request May 9, 2015

Merge pull request #14 from h2o/kazuho/no-auto-include
add preprocessor flag to disable automatic inclusion of qrintf.h and some standard headers

@kazuho kazuho merged commit b8ca552 into master May 9, 2015

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment