Skip to content

Commit

Permalink
[ext] Update eyalroz/printf to v6.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
salkinium committed Oct 5, 2024
1 parent 655b2a6 commit b7cec10
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
6 changes: 5 additions & 1 deletion ext/eyalroz/module.lb
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@ def build(env):

env.copy("printf/src/printf/printf.h", "printf.h")
files = env.copy("printf/src/printf/printf.c", "printf.c")
env.collect(":build:ccflags", "-Wno-double-promotion", "-Wno-overflow", operations=files)
env.collect(":build:ccflags", "-Wno-overflow", operations=files)

with_long_long = "avr" not in env[":target"].identifier.platform
with_double = "fd" in env[":target"].get_driver("core")["type"]
if not with_double:
env.collect(":build:ccflags", "-Wno-double-promotion", operations=files)
env.substitutions = {
"with_double": with_double,
"with_long_long": env.get(":io:with_long_long", with_long_long),
"is_hosted": env[":target"].identifier.platform == "hosted",
}
Expand Down
2 changes: 1 addition & 1 deletion ext/eyalroz/printf
10 changes: 4 additions & 6 deletions ext/eyalroz/printf_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,17 @@
#endif

#ifndef PRINTF_DEFAULT_FLOAT_PRECISION
#define PRINTF_DEFAULT_FLOAT_PRECISION 5
#define PRINTF_DEFAULT_FLOAT_PRECISION 5
#endif

#ifndef PRINTF_ALIAS_STANDARD_FUNCTION_NAMES
#define PRINTF_ALIAS_STANDARD_FUNCTION_NAMES {{ 0 if is_hosted else 1 }}
#ifndef PRINTF_USE_DOUBLE_INTERNALLY
#define PRINTF_USE_DOUBLE_INTERNALLY {{ 1 if with_double else 0 }}
#endif

#ifndef PRINTF_ALIAS_STANDARD_FUNCTION_NAMES_HARD
#define PRINTF_ALIAS_STANDARD_FUNCTION_NAMES_HARD 0
#define PRINTF_ALIAS_STANDARD_FUNCTION_NAMES_HARD {{ 0 if is_hosted else 1 }}
#endif

#ifndef PRINTF_ALIAS_STANDARD_FUNCTION_NAMES_SOFT
#define PRINTF_ALIAS_STANDARD_FUNCTION_NAMES_SOFT 0
#endif


0 comments on commit b7cec10

Please sign in to comment.