printf-c: restore length modifiers

These were accidentally removed when semi-automatically removing length
modifiers from Rust code and shell scripts.

In C, the length modifiers are required.

Closes #11898
This commit is contained in:
Daniel Rainer
2025-10-06 18:50:28 +02:00
committed by Johannes Altmanninger
parent e1f6ab8916
commit 6829c9d678

View File

@@ -102,12 +102,12 @@ static void print_stdout_stderr() {
static void print_pid_then_sleep() {
// On some systems getpid is a long, on others it's an int, let's just cast it.
fprintf(stdout, "%d\n", (long)getpid());
fprintf(stdout, "%ld\n", (long)getpid());
fflush(NULL);
usleep(1000000 / 2); //.5 secs
}
static void print_pgrp() { fprintf(stdout, "%d\n", (long)getpgrp()); }
static void print_pgrp() { fprintf(stdout, "%ld\n", (long)getpgrp()); }
static void print_fds() {
bool needs_space = false;