Closed Wertzui123 closed 1 year ago
The #undef I part works, but redefining it like that won't work properly. Before that #undef sequence, I expands to (__extension__ 1.0iF)
; afterwards, it's just TLS_I_MACRO
, which isn't likely to do anything useful.
Instead, consider doing this. https://gcc.gnu.org/onlinedocs/gcc/Push_002fPop-Macro-Pragmas.html
Alternatively, rename it in libtomcrypt.
Ah, you're right.
Instead, consider doing this. https://gcc.gnu.org/onlinedocs/gcc/Push_002fPop-Macro-Pragmas.html
I think this might cause trouble with some C compilers like TCC (which I'm currently trying to get to work with TLSe).
Alternatively, rename it in libtomcrypt
That worked, but the #undef
solution seemed cleaner to me at first sight.
@eduardsui Do you think we should go with #pragma push_macro
or editing libtomcrypt.c
?
It looks like TCC supports #pragma push_macro
too - I guess I will push that approach now (we can still change it before merging though if anyone might spot a problem).
https://github.com/eduardsui/tlse/issues/68#issuecomment-1206583489
Can you check whether an updated ltc would help? I've fixed those duplicate symbols problems already in the branch mentioned in the comment. But I'm not sure whether the version you bundled is still 100% compatible, so maybe it also breaks somewhere else ...
should go with
#pragma push_macro
or editinglibtomcrypt.c
?
Hello, and thanks for the fix. I think it's ok, but I would test for the compiler (I'm not sure that #pragma pop/push_macro
is standard).
Thanks again, Eduard
complex.h
defines anI
macro, which conflicts withlibtomcrypt.c
.Thanks for this awesome library, by the way!