2006-11-27 Paul Eggert <eggert@cs.ucla.edu>
+ Turn AC_FUNC_SETVBUF_REVERSED into a noop. It's been obsolete for
+ years and is too hard to maintain now. The last straw was
+ reported by Jerker Baeck in
+ <http://lists.gnu.org/archive/html/autoconf/2006-11/msg00102.html>.
+ * NEWS: AC_FUNC_SETVBUF_REVERSED is now obsolete.
+ * doc/autoconf.texi (Particular Functions): Move
+ AC_FUNC_SETVBUF_REVERSED from here...
+ (Obsolete Macros): ... to here. Say that it does nothing now.
+ * lib/autoconf/functions.m4 (AC_FUNC_SETVBUF_REVERSED):
+ Turn into (almost) a no-op.
+
* lib/autoconf/c.m4 (AC_PROG_GCC_TRADITIONAL, AC_C_CONST):
(AC_C_VOLATILE):
Do not recommend via AN_FUNCTION, AN_IDENTIFIER, or AN_HEADER.
* Major changes in Autoconf 2.61a (??)
+** AC_FUNC_SETVBUF_REVERSED is now obsolete. It is still defined for backward
+ compatibility but it does nothing. The macro was already
+ obsolescent, as the last systems to have the problem were those
+ based on SVR2, which became obsolete in 1987. The macro had bugs
+ on some modern systems and could no longer be maintained reliably
+ due to lack of ancient systems to test it on.
+
** config.status now uses awk instead of sed for most substitutions, for speed.
It is now documented that Makefile.in should not contain
overlapping variable occurrences, e.g., @VAR1@VAR2@. Autoconf's
New programs need not use these macros.
@end defmac
-@defmac AC_FUNC_SETVBUF_REVERSED
-@acindex{FUNC_SETVBUF_REVERSED}
-@cvindex SETVBUF_REVERSED
-@c @fuindex setvbuf
-@prindex @code{setvbuf}
-If @code{setvbuf} takes the buffering type as its second argument and
-the buffer pointer as the third, instead of the other way around, define
-@code{SETVBUF_REVERSED}.
-
-This macro is obsolescent, as no current systems have the bug.
-New programs need not use this macro.
-@end defmac
-
@defmac AC_FUNC_STRCOLL
@acindex{FUNC_STRCOLL}
@cvindex HAVE_STRCOLL
@code{AC_CHECK_FUNC}
@end defmac
+@defmac AC_FUNC_SETVBUF_REVERSED
+@acindex{FUNC_SETVBUF_REVERSED}
+@cvindex SETVBUF_REVERSED
+@c @fuindex setvbuf
+@prindex @code{setvbuf}
+Do nothing. Formerly, this macro checked whether @code{setvbuf} takes
+the buffering type as its second argument and the buffer pointer as the
+third, instead of the other way around, and defined
+@code{SETVBUF_REVERSED}. However, the last systems to have the problem
+were those based on SVR2, which became obsolete in 1987, and the macro
+is no longer needed.
+@end defmac
+
@defmac AC_FUNC_WAIT3
@acindex{FUNC_WAIT3}
@cvindex HAVE_WAIT3
# AC_FUNC_SETVBUF_REVERSED
# ------------------------
AC_DEFUN([AC_FUNC_SETVBUF_REVERSED],
-[AC_REQUIRE([AC_C_PROTOTYPES])dnl
-AC_CACHE_CHECK(whether setvbuf arguments are reversed,
- ac_cv_func_setvbuf_reversed,
- [ac_cv_func_setvbuf_reversed=no
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <stdio.h>
-# ifdef PROTOTYPES
- int (setvbuf) (FILE *, int, char *, size_t);
-# endif]],
- [[char buf; return setvbuf (stdout, _IOLBF, &buf, 1);]])],
- [AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <stdio.h>
-# ifdef PROTOTYPES
- int (setvbuf) (FILE *, int, char *, size_t);
-# endif]],
- [[char buf; return setvbuf (stdout, &buf, _IOLBF, 1);]])],
- [# It compiles and links either way, so it must not be declared
- # with a prototype and most likely this is a K&R C compiler.
- # Try running it.
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(
- [AC_INCLUDES_DEFAULT],
- [[/* This call has the arguments reversed.
- A reversed system may check and see that the address of buf
- is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */
- char buf;
- if (setvbuf (stdout, _IOLBF, &buf, 1) != 0)
- return 1;
- putchar ('\r');
- return 0; /* Non-reversed systems SEGV here. */]])],
- [ac_cv_func_setvbuf_reversed=yes],
- [],
- [[: # Assume setvbuf is not reversed when cross-compiling.]])]
- ac_cv_func_setvbuf_reversed=yes)])])
-if test $ac_cv_func_setvbuf_reversed = yes; then
- AC_DEFINE(SETVBUF_REVERSED, 1,
- [Define to 1 if the `setvbuf' function takes the buffering type as
- its second argument and the buffer pointer as the third, as on
- System V before release 3.])
-fi
+[AC_DIAGNOSE([obsolete],
+[The macro `$0' is obsolete. Remove it and all references to SETVBUF_REVERSED.])dnl
+AC_CACHE_VAL([ac_cv_func_setvbuf_reversed], [ac_cv_func_setvbuf_reversed=no])
])# AC_FUNC_SETVBUF_REVERSED