[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: getpass: use of termios.h problematic
From: |
Simon Josefsson |
Subject: |
Re: getpass: use of termios.h problematic |
Date: |
Tue, 23 Aug 2005 22:13:46 +0200 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
Simon Josefsson <address@hidden> 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 <address@hidden>
* getpass.c (__fsetlocking): Define to nothing unless we have it.
2005-08-23 Simon Josefsson <address@hidden>
* 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])
- :
])
- getpass: use of termios.h problematic, Simon Josefsson, 2005/08/22
- Re: getpass: use of termios.h problematic,
Simon Josefsson <=
- Re: [bug-gnulib] Re: getpass: use of termios.h problematic, Bruno Haible, 2005/08/24
- Re: getpass: use of termios.h problematic, Simon Josefsson, 2005/08/24
- Re: getpass: use of termios.h problematic, Paul Eggert, 2005/08/24
- Re: getpass: use of termios.h problematic, Simon Josefsson, 2005/08/24
- Re: getpass: use of termios.h problematic, Paul Eggert, 2005/08/25
- Re: getpass: use of termios.h problematic, Simon Josefsson, 2005/08/25
- Re: getpass: use of termios.h problematic, Paul Eggert, 2005/08/25
- Re: getpass: use of termios.h problematic, Simon Josefsson, 2005/08/25
- Re: Woe32 conditionals (was: getpass: use of termios.h problematic), Bruno Haible, 2005/08/26
- Re: Woe32 conditionals, Simon Josefsson, 2005/08/26