Dec. 18, 2025
6:37 p.m.
does anyone implement the ungetc() part or am i misunderstanding what that's trying to say? #include <stdio.h> int main() { FILE* fp = fopen("/tmp/x.c", "r"); ungetc('x', fp); printf("%c\n", fgetc(fp)); fclose(fp); fp = fopen("/tmp/x.c", "r"); ungetc('x', fp); fflush(fp); printf("%c\n", fgetc(fp)); fclose(fp); return 0; } where this file is /tmp/x.c gives me x and # whether or not the flush is there, for both glibc and macOS. On Thu, Dec 18, 2025 at 12:24 PM Paul Eggert via tz <tz@iana.org> wrote:
Thanks for reporting the bug and the POSIX versions. zic should work even on POSIX.1-2001 platforms, so I installed the attached. This should let zic work even on unmodified NetBSD.