From 62b812b7dbd8dd6dfcc7fa757c7eee22ba9e692f Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Tue, 27 Oct 2009 23:10:22 +0000 Subject: [PATCH] Compilation fix for systems without get_unlocked(). --- test/zzcat.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/zzcat.c b/test/zzcat.c index bf39cda..98e7a20 100644 --- a/test/zzcat.c +++ b/test/zzcat.c @@ -114,13 +114,19 @@ int main(int argc, char *argv[]) break; #if defined HAVE_GETLINE case 23: /* getline() and getc() calls */ +#if defined HAVE_GETC_UNLOCKED case 24: /* getline() and getc_unlocked() calls */ +#endif stream = fopen(name, "r"); if(!stream) return EXIT_FAILURE; i = 0; +#if defined HAVE_GETC_UNLOCKED while ((c = (atoi(argv[1]) == 23) ? getc(stream) : getc_unlocked(stream)) != EOF) +#else + while ((c = getc(stream)) != EOF) +#endif { char *line; ssize_t ret;