summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-09-27 17:59:19 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-09-27 17:59:19 +0000
commit8e10ce2ac4853d26744a6ac45678dd78ee5b055a (patch)
tree28694600648c1eeb4d6de17ad84ecff7f0ffa69e /lib
parent95ab9c0f99bc4650dc004e5ba3640b63746f593c (diff)
downloadgnulib-8e10ce2ac4853d26744a6ac45678dd78ee5b055a.tar.gz
[lib/ChangeLog]
* __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.
Diffstat (limited to 'lib')
-rw-r--r--lib/ChangeLog9
-rw-r--r--lib/__fpending.h13
-rw-r--r--lib/getpass.c9
3 files changed, 21 insertions, 10 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog
index 63114eeef8..4393e2bbe2 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -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'.
diff --git a/lib/__fpending.h b/lib/__fpending.h
index 3c9be1e082..8a8aabcc22 100644
--- a/lib/__fpending.h
+++ b/lib/__fpending.h
@@ -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
@@ -21,13 +21,14 @@
#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
diff --git a/lib/getpass.c b/lib/getpass.c
index 70851b3e1a..5b39b6d813 100644
--- a/lib/getpass.c
+++ b/lib/getpass.c
@@ -29,10 +29,11 @@
#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