[lib/ChangeLog]
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 27 Sep 2006 17:59:19 +0000 (17:59 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 27 Sep 2006 17:59:19 +0000 (17:59 +0000)
* __fpending.h: Don't include <stdio_ext.h> unless
HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
it causes <stdio_ext.h> to cause a compile-time error.
Problem reported by Nelson H. F. Beebe.
* getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
of HAVE_DECL___PENDING.
[m4/ChangeLog]
* fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
* getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's declaration.

lib/ChangeLog
lib/__fpending.h
lib/getpass.c
m4/ChangeLog
m4/fpending.m4
m4/getpass.m4

index 63114ee..4393e2b 100644 (file)
@@ -1,3 +1,12 @@
+2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * __fpending.h: Don't include <stdio_ext.h> unless
+       HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
+       it causes <stdio_ext.h> to cause a compile-time error.
+       Problem reported by Nelson H. F. Beebe.
+       * getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
+       of HAVE_DECL___PENDING.
+
 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
 
        * savewd.c: Include <signal.h>, for 'raise'.
index 3c9be1e..8a8aabc 100644 (file)
@@ -1,6 +1,6 @@
 /* Declare __fpending.
 
-   Copyright (C) 2000, 2003, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2003, 2005, 2006 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #include <stddef.h>
 #include <stdio.h>
 
-#if HAVE_STDIO_EXT_H
-# include <stdio_ext.h>
-#endif
-
 #ifndef HAVE_DECL___FPENDING
 "this configure-time declaration test was not run"
 #endif
-#if !HAVE_DECL___FPENDING
+
+#if HAVE_DECL___FPENDING
+# if HAVE_STDIO_EXT_H
+#  include <stdio_ext.h>
+# endif
+#else
 size_t __fpending (FILE *);
 #endif
index 70851b3..5b39b6d 100644 (file)
 
 #include <stdbool.h>
 
-#if HAVE_STDIO_EXT_H
-# include <stdio_ext.h>
-#endif
-#if !HAVE___FSETLOCKING
+#if HAVE_DECL___FSETLOCKING && HAVE___FSETLOCKING
+# if HAVE_STDIO_EXT_H
+#  include <stdio_ext.h>
+# endif
+#else
 # define __fsetlocking(stream, type)   /* empty */
 #endif
 
index 0c09734..c50eb3d 100644 (file)
@@ -1,3 +1,8 @@
+2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
+       * getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's declaration.
+
 2006-09-26  Jim Meyering  <jim@meyering.net>
 
        * acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
index e5917c5..a073483 100644 (file)
@@ -1,4 +1,4 @@
-#serial 9
+#serial 10
 
 # Copyright (C) 2000, 2001, 2004, 2005, 2006 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -15,7 +15,7 @@ dnl we have to grub around in the FILE struct.
 
 AC_DEFUN([gl_FUNC_FPENDING],
 [
-  AC_CHECK_HEADERS(stdio_ext.h)
+  AC_CHECK_HEADERS_ONCE(stdio_ext.h)
   AC_REPLACE_FUNCS([__fpending])
   fp_headers='
 #     include <stdio.h>
index 014c52d..54348ce 100644 (file)
@@ -1,4 +1,4 @@
-# getpass.m4 serial 9
+# getpass.m4 serial 10
 dnl Copyright (C) 2002-2003, 2005-2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -33,6 +33,11 @@ AC_DEFUN([gl_FUNC_GETPASS_GNU],
 AC_DEFUN([gl_PREREQ_GETPASS], [
   AC_CHECK_HEADERS_ONCE(stdio_ext.h termios.h)
   AC_CHECK_FUNCS_ONCE(__fsetlocking tcgetattr tcsetattr)
+  AC_CHECK_DECLS([__fsetlocking],,,
+    [#include <stdio.h>
+     #if HAVE_STDIO_EXT_H
+      #include <stdio_ext.h>
+     #endif])
   AC_CHECK_DECLS_ONCE([fflush_unlocked])
   AC_CHECK_DECLS_ONCE([flockfile])
   AC_CHECK_DECLS_ONCE([fputs_unlocked])