Skip to content

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

Merged
kazuho merged 2 commits into
masterfrom
kazuho/no-auto-include
May 9, 2015
Merged

kazuho merged 2 commits into
masterfrom
kazuho/no-auto-include

Conversation

@kazuho

@kazuho kazuho commented May 9, 2015

Copy link
Copy Markdown
Member

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
add preprocessor flag to disable automatic inclusion of qrintf.h and some standard headers
@kazuho
kazuho merged commit b8ca552 into master May 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant