]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Turn AC_FUNC_SETVBUF_REVERSED into a noop. It's been obsolete for
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 28 Nov 2006 03:29:47 +0000 (03:29 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 28 Nov 2006 03:29:47 +0000 (03:29 +0000)
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.

ChangeLog
NEWS
doc/autoconf.texi
lib/autoconf/functions.m4

index 13ab60a778f09c2016b96a99e949b40dffb273a8..eccd234141a8f55dd23afc7dfe827c4d54b94ae2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 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.
diff --git a/NEWS b/NEWS
index adc5780c2c097898cc406344ee51b3c20472f176..4f2ded1e5422c0102e708a2d52b235dbe0c489d8 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,12 @@
 * 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
index a244000a626de9dcd5a0656a5b515950d26c3b04..4a0d8749a9d470995a14f41d418f55e6d522209f 100644 (file)
@@ -4782,19 +4782,6 @@ These macros are obsolescent, as no current systems have the bug.
 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
@@ -16607,6 +16594,19 @@ and sets @code{EMXOS2}.
 @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
index 256bbefa23a507f4d14da9021c94295e289bd5e5..440b886d18838e4f51230c842b45e4703058cc80 100644 (file)
@@ -1670,48 +1670,9 @@ test $ac_cv_func_strnlen_working = no && AC_LIBOBJ([strnlen])
 # 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