printf icon indicating copy to clipboard operation
printf copied to clipboard

printf.h should also(only?) import printf_config.h

Open MrJake222 opened this issue 1 year ago • 2 comments

For me, config file should be imported by printf.h in addition to or instead of printf.c.

For example, printf.h uses PRINTF_ALIAS_STANDARD_FUNCTION_NAMES_SOFT which can't be set by the config file currently.

MrJake222 avatar Oct 17 '24 12:10 MrJake222

PRINTF_ALIAS_STANDARD_FUNCTION_NAMES_SOFT ... can't be set by the config file currently.

It can be set using the config file.

But regardless of that - please argue why you believe this should be the case.

eyalroz avatar Oct 17 '24 17:10 eyalroz

It's set to 0 in config here if not defined. And it won't be defined if not included.

MrJake222 avatar Dec 11 '24 08:12 MrJake222

Hmm. We're not currently installing printf_config.h. On the other hand... I suppose some users might be interested to rely, in their code, on how printf is configured.

Sorry for not attending to this bug report and the PR for so long, I've been super-busy. I hope I can find the time to give it serious consideration over the next few days.

eyalroz avatar Jun 11 '25 12:06 eyalroz

I am wary of installing a generated header file. I don't believe other (compiled) libraries typically offer a header describing the set of configured features like that.

But - I suppose it can't hurt to conditionally include that config file if it's magically somehow there.

eyalroz avatar Jul 16 '25 18:07 eyalroz

is this issue still relevant?

ritesh006 avatar Aug 26 '25 15:08 ritesh006

It seems it is actually rather important to include printf_config.h, due to issue #208 - aliasing.

eyalroz avatar Dec 01 '25 09:12 eyalroz