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

Preprocessor #if code incorrect #678

Closed
WilliamKF opened this issue Nov 9, 2015 · 4 comments · Fixed by #692
Closed

Preprocessor #if code incorrect #678

WilliamKF opened this issue Nov 9, 2015 · 4 comments · Fixed by #692
Assignees
Labels
Milestone

Comments

@WilliamKF
Copy link

The C preprocessor is not correctly processing complex rules. The following example is processed incorrectly:

#define SDS_ARCH_darwin_15_i86

#ifdef SDS_ARCH_freebsd_61_i86
#include <sys/endian.h>
#elif defined(SDS_ARCH_darwin_15_i86)
#include <libkern/OSByteOrder.h> // Incorrectly not taken.
#elif defined(SDS_ARCH_winxp) || defined(SDS_ARCH_Interix)
#else
#include <byteswap.h>  // Incorrectly taken
#endif
@guwirth
Copy link
Collaborator

guwirth commented Nov 9, 2015

Could you do some more testing please:
is this working: #define SDS_ARCH_darwin_15_i86 1

@WilliamKF
Copy link
Author

Yeah, I had already tried that, doesn't help.

@guwirth guwirth added bug and removed question labels Nov 10, 2015
@guwirth guwirth added this to the M 0.9.5 milestone Nov 10, 2015
@guwirth guwirth self-assigned this Nov 10, 2015
@guwirth
Copy link
Collaborator

guwirth commented Nov 29, 2015

@WilliamKF Solution #692

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

3 participants