Skip to content
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

OS_* defines not always set correctly #715

Closed
chausner opened this issue Sep 27, 2021 · 0 comments · Fixed by #716
Closed

OS_* defines not always set correctly #715

chausner opened this issue Sep 27, 2021 · 0 comments · Fixed by #716
Assignees
Labels

Comments

@chausner
Copy link

logging.h.in depends on OS_* defines:

#elif defined(OS_WINDOWS)
. These defines are set in utilities.h:
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)

utilities.h includes logging.h but not the other way round. Thus, if someone includes logging.h without having included utilities.h first, these defines are not set, and compilation will fail on e.g. Windows because it tries to compile gcc-specific code.

A fix could be to move out the OS_* defines into a separate header file which could get included by both logging.h.in and utilities.h.

@sergiud sergiud added the bug label Sep 28, 2021
sergiud added a commit that referenced this issue Oct 1, 2021
sergiud added a commit that referenced this issue Oct 1, 2021
sergiud added a commit that referenced this issue Oct 1, 2021
sergiud added a commit that referenced this issue Oct 1, 2021
@sergiud sergiud self-assigned this Oct 1, 2021
@sergiud sergiud linked a pull request Oct 1, 2021 that will close this issue
sergiud added a commit that referenced this issue Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants