-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
Macro conflict between sys/ioctl.h and hfsm2/machine.hpp #63
Comments
Thanks for reporting.
I'll rename the arguments to something more obscure.
…On Tue, Dec 14, 2021, 13:38 Charles Cross ***@***.***> wrote:
I discovered today that there appears to be a conflict between HFSM2 and
the Linux libc sys/ioctl.h header that causes a bizarre cascade of template
errors and syntax errors.
The conflict occurs when including sys/ioctl.h before hfsm2/machine.hpp,
due to HFSM2's use of the symbol NCC in various template arguments in
machine.hpp:
https://github.com/andrew-gresyk/HFSM2/blob/master/include/hfsm2/machine.hpp#L3562
NCC is defined as an integer literal in <bits/ioctl-types.h> which gets
included by <sys/ioctl.h>:
https://github.com/raspberrypi/tools/blob/master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/arm-linux-gnueabihf/libc/usr/include/arm-linux-gnueabihf/bits/ioctl-types.h#L36
It's a bit unfortunate that the ioctl.h header causes this macro
pollution. I'm not sure if there is any better fix than renaming the
template argument in HFSM2...
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#63>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB75T3CLXTDBNAQYDMINVILUQ4UETANCNFSM5KAU3YGA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
@spiderkeys |
Hi @andrew-gresyk. I just went to update our HFSM2 to the latest version and it looks like at some point this symbol name switched back from |
andrew-gresyk
added a commit
that referenced
this issue
Dec 9, 2022
andrew-gresyk
added a commit
that referenced
this issue
Dec 9, 2022
Thanks for reporting @spiderkeys |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I discovered today that there appears to be a conflict between HFSM2 and the Linux libc sys/ioctl.h header that causes a bizarre cascade of template errors and syntax errors.
The conflict occurs when including sys/ioctl.h before hfsm2/machine.hpp, due to HFSM2's use of the symbol
NCC
in various template arguments in machine.hpp:https://github.com/andrew-gresyk/HFSM2/blob/master/include/hfsm2/machine.hpp#L3562
NCC
is defined as an integer literal in <bits/ioctl-types.h> which gets included by <sys/ioctl.h>:https://github.com/raspberrypi/tools/blob/master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/arm-linux-gnueabihf/libc/usr/include/arm-linux-gnueabihf/bits/ioctl-types.h#L36
After renaming
NCC
to_NCC
in HFSM2, I can confirm that the errors are resolved.It's a bit unfortunate that the ioctl.h header causes this macro pollution. I'm not sure if there is any better fix than renaming the template argument in HFSM2 or maybe #undef'ing the symbol...
The text was updated successfully, but these errors were encountered: