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

Issue with HARD aliasing the standard function names #146

Closed
BenFreudbergKolmostar opened this issue Jan 18, 2023 · 5 comments
Closed

Issue with HARD aliasing the standard function names #146

BenFreudbergKolmostar opened this issue Jan 18, 2023 · 5 comments
Labels
bug Something isn't working resolved-on-develop A changeset fixing this issue has been commiutted to the development branch

Comments

@BenFreudbergKolmostar
Copy link

It looks like there is some inconsistency introduced with the addition of PRINTF_ALIAS_STANDARD_FUNCTION_NAMES_SOFT which means that if you want to do HARD replacement, you must include both PRINTF_ALIAS_STANDARD_FUNCTION_NAMES=1 and PRINTF_ALIAS_STANDARD_FUNCTION_NAMES_HARD=1. I fixed this on my local copy by getting rid of PRINTF_ALIAS_STANDARD_FUNCTION_NAMES altogether.

I deleted:

#ifndef PRINTF_ALIAS_STANDARD_FUNCTION_NAMES
#define PRINTF_ALIAS_STANDARD_FUNCTION_NAMES 0
#endif

and I changed:

#if PRINTF_ALIAS_STANDARD_FUNCTION_NAMES

to

#if PRINTF_ALIAS_STANDARD_FUNCTION_NAMES_HARD

The documentation could also use an update to clarify this new feature.

Thanks!

@eyalroz eyalroz added the bug Something isn't working label Jan 18, 2023
@eyalroz
Copy link
Owner

eyalroz commented Jan 18, 2023

Relates to #141 . Will look into this, hopefully within the next couple of days. Thanks for reporting the issue!

eyalroz added a commit that referenced this issue Jan 21, 2023
…definition mess:

With the introduction of three options for standard library function aliasing behavior (none, soft and hard), we now have two boolean preprocessor definitions, `PRINTF_ALIAS_STANDARD_FUNCTION_NAMES_SOFT` and `PRINTF_ALIAS_STANDARD_FUNCTION_NAMES_HARD` - but some of the code was still expecting `PRINTF_ALIAS_STANDARD_FUNCTION_NAMES`. Now making sure both of these are set and respected.

* Updated the README.md
@eyalroz
Copy link
Owner

eyalroz commented Jan 21, 2023

@BenFreudbergKolmostar : Please check whether my commit to the development branch resolves the issue to your satisfaction.

eyalroz added a commit that referenced this issue Jan 21, 2023
…definition mess:

With the introduction of three options for standard library function aliasing behavior (none, soft and hard), we now have two boolean preprocessor definitions, `PRINTF_ALIAS_STANDARD_FUNCTION_NAMES_SOFT` and `PRINTF_ALIAS_STANDARD_FUNCTION_NAMES_HARD` - but some of the code was still expecting `PRINTF_ALIAS_STANDARD_FUNCTION_NAMES`. Now making sure both of these are set and respected.

* Updated the README.md
@BenFreudbergKolmostar
Copy link
Author

@eyalroz Yes, I think it would. But shouldn't printf.c:line57 be "HARD", not "SOFT"? I tried to leave this comment over there directly but I'm not sure if it worked.

Also, unrelated, but line 101/102 looks like a typo with two "INTERNALLY"s.

eyalroz added a commit that referenced this issue Jan 24, 2023
…definition mess:

With the introduction of three options for standard library function aliasing behavior (none, soft and hard), we now have two boolean preprocessor definitions, `PRINTF_ALIAS_STANDARD_FUNCTION_NAMES_SOFT` and `PRINTF_ALIAS_STANDARD_FUNCTION_NAMES_HARD` - but some of the code was still expecting `PRINTF_ALIAS_STANDARD_FUNCTION_NAMES`. Now making sure both of these are set and respected.

* Updated the README.md
eyalroz added a commit that referenced this issue Jan 24, 2023
…definition mess:

With the introduction of three options for standard library function aliasing behavior (none, soft and hard), we now have two boolean preprocessor definitions, `PRINTF_ALIAS_STANDARD_FUNCTION_NAMES_SOFT` and `PRINTF_ALIAS_STANDARD_FUNCTION_NAMES_HARD` - but some of the code was still expecting `PRINTF_ALIAS_STANDARD_FUNCTION_NAMES`. Now making sure both of these are set and respected.

* Updated the README.md
@eyalroz
Copy link
Owner

eyalroz commented Jan 24, 2023

@BenFreudbergKolmostar : Did see the comment. Please pull again (and note that previous commits are overridden now.

@BenFreudbergKolmostar
Copy link
Author

@eyalroz Looks great, thanks!

@eyalroz eyalroz added resolved-on-develop A changeset fixing this issue has been commiutted to the development branch and removed resolved-on-develop A changeset fixing this issue has been commiutted to the development branch labels Jan 27, 2023
@eyalroz eyalroz added the resolved-on-develop A changeset fixing this issue has been commiutted to the development branch label Jul 9, 2023
eyalroz added a commit that referenced this issue Jul 19, 2024
…definition mess:

With the introduction of three options for standard library function aliasing behavior (none, soft and hard), we now have two boolean preprocessor definitions, `PRINTF_ALIAS_STANDARD_FUNCTION_NAMES_SOFT` and `PRINTF_ALIAS_STANDARD_FUNCTION_NAMES_HARD` - but some of the code was still expecting `PRINTF_ALIAS_STANDARD_FUNCTION_NAMES`. Now making sure both of these are set and respected.

* Updated the README.md
eyalroz added a commit that referenced this issue Jul 19, 2024
…definition mess:

With the introduction of three options for standard library function aliasing behavior (none, soft and hard), we now have two boolean preprocessor definitions, `PRINTF_ALIAS_STANDARD_FUNCTION_NAMES_SOFT` and `PRINTF_ALIAS_STANDARD_FUNCTION_NAMES_HARD` - but some of the code was still expecting `PRINTF_ALIAS_STANDARD_FUNCTION_NAMES`. Now making sure both of these are set and respected.

* Updated the README.md
@eyalroz eyalroz closed this as completed Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolved-on-develop A changeset fixing this issue has been commiutted to the development branch
Projects
None yet
Development

No branches or pull requests

2 participants