From c1b37f932cdb0c31092babb0748819bfcbe75666 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Thu, 4 Nov 2004 18:06:54 +0000 Subject: Update. --- gl/getpass.c | 30 ++++++++++++++++++++---------- gl/m4/getpass.m4 | 1 + 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/gl/getpass.c b/gl/getpass.c index 78f21e0197..4f520aef3b 100644 --- a/gl/getpass.c +++ b/gl/getpass.c @@ -58,16 +58,26 @@ #elif USE_UNLOCKED_IO # include "unlocked-io.h" #else -# undef fflush_unlocked -# define fflush_unlocked(x) fflush (x) -# undef flockfile -# define flockfile(x) ((void) 0) -# undef funlockfile -# define funlockfile(x) ((void) 0) -# undef fputs_unlocked -# define fputs_unlocked(str,stream) fputs (str, stream) -# undef putc_unlocked -# define putc_unlocked(c,stream) putc (c, stream) +# if !HAVE_DECL_FFLUSH_UNLOCKED +# undef fflush_unlocked +# define fflush_unlocked(x) fflush (x) +# endif +# if !HAVE_DECL_FLOCKFILE +# undef flockfile +# define flockfile(x) ((void) 0) +# endif +# if !HAVE_DECL_FUNLOCKFILE +# undef funlockfile +# define funlockfile(x) ((void) 0) +# endif +# if !HAVE_DECL_FPUTS_UNLOCKED +# undef fputs_unlocked +# define fputs_unlocked(str,stream) fputs (str, stream) +# endif +# if !HAVE_DECL_PUTC_UNLOCKED +# undef putc_unlocked +# define putc_unlocked(c,stream) putc (c, stream) +# endif #endif #if _LIBC diff --git a/gl/m4/getpass.m4 b/gl/m4/getpass.m4 index 0c4d8050f2..8d682242c9 100644 --- a/gl/m4/getpass.m4 +++ b/gl/m4/getpass.m4 @@ -34,5 +34,6 @@ AC_DEFUN([gl_FUNC_GETPASS_GNU], # Prerequisites of lib/getpass.c. AC_DEFUN([gl_PREREQ_GETPASS], [ AC_CHECK_HEADERS_ONCE(stdio_ext.h) + AC_CHECK_DECLS_ONCE([fflush_unlocked flockfile fputs_unlocked funlockfile putc_unlocked]) : ]) -- cgit v1.2.1