harec

[hare] Hare compiler, written in C11 for POSIX OSs
Log | Files | Refs | README | LICENSE

commit 72b8a8dc244cdd244c47237808fc6a32096436c7
parent 7badb20cf090c6977a393b615eef79aa8fd6a0b1
Author: Jason Lenz <Jason@Lenzplace.org>
Date:   Mon, 30 May 2022 21:20:58 -0500

Use C99 format specifiers in fprintf for OpenBSD compatibility

Diffstat:
Msrc/typedef.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/typedef.c b/src/typedef.c @@ -132,11 +132,11 @@ emit_const(const struct expression *expr, FILE *out) if (ev->type->alias.type->storage == STORAGE_CHAR || !type_is_signed(ev->type->alias.type)) { if (ev->value->constant.uval == val->uval) { - fprintf(out, "%ld", val->uval); + fprintf(out, "%" PRIuMAX, val->uval); break; } } else if (ev->value->constant.ival == val->ival) { - fprintf(out, "%ld", val->ival); + fprintf(out, "%" PRIiMAX, val->ival); break; } }