Simon Josefsson <[EMAIL PROTECTED]> writes: > Further, lib/getpass.c look quite unreadable. Even the code in glibc > look much friendlier. > > I propose to adopt the current glibc code, and #if HAVE_TERMIOS_H and > #if TCGETATTR protect it. If there are no objections, I'll propose a > patch within a few days.
Meanwhile, I discovered that getpass.c doesn't build with uClibc, it has stdio_ext.h but not __fsetlocking. getpass.c test like this: #if HAVE_STDIO_EXT_H # include <stdio_ext.h> #else # define __fsetlocking(stream, type) /* empty */ #endif How about this patch? I'll work on the termios.h related problem later. 2005-08-23 Simon Josefsson <[EMAIL PROTECTED]> * getpass.c (__fsetlocking): Define to nothing unless we have it. 2005-08-23 Simon Josefsson <[EMAIL PROTECTED]> * getpass.m4: Check for __fsetlocking. --- getpass.c 23 May 2005 13:04:55 +0200 1.11 +++ getpass.c 23 Aug 2005 22:09:19 +0200 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2001, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1992-2001, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software; you can redistribute it and/or modify @@ -32,7 +32,8 @@ #include <stdio.h> #if HAVE_STDIO_EXT_H # include <stdio_ext.h> -#else +#endif +#if !HAVE___FSETLOCKING # define __fsetlocking(stream, type) /* empty */ #endif #if !_LIBC --- getpass.m4 15 Apr 2005 00:22:03 +0200 1.10 +++ getpass.m4 23 Aug 2005 22:10:23 +0200 @@ -36,6 +36,6 @@ # Prerequisites of lib/getpass.c. AC_DEFUN([gl_PREREQ_GETPASS], [ AC_CHECK_HEADERS_ONCE(stdio_ext.h) + AC_CHECK_FUNCS(__fsetlocking) AC_CHECK_DECLS_ONCE([fflush_unlocked flockfile fputs_unlocked funlockfile putc_unlocked]) - : ]) _______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib