]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* doc/autoconf.texi: Move AC_FUNC_WAIT3 and
authorAkim Demaille <akim@epita.fr>
Fri, 15 Jun 2001 17:44:17 +0000 (17:44 +0000)
committerAkim Demaille <akim@epita.fr>
Fri, 15 Jun 2001 17:44:17 +0000 (17:44 +0000)
AC_SYS_RESTARTABLE_SYSCALLS to the obsolete section,
and explain why and how to replace them.
* acfunctions.m4 (AC_FUNC_WAIT3): Warn as obsolete.
* acspecific.m4 (AC_SYS_RESTARTABLE_SYSCALLS): Likewise.

ChangeLog
NEWS
acfunctions.m4
acspecific.m4
doc/autoconf.texi
lib/autoconf/functions.m4
lib/autoconf/specific.m4

index 2cd1541d4f7128840d01aebf78eb57033dfbd09e..f82c3b6964c990c005e07b493057f2edff24420c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2001-06-15  Paul Eggert  <eggert@twinsun.com>
+
+       * doc/autoconf.texi: Move AC_FUNC_WAIT3 and
+       AC_SYS_RESTARTABLE_SYSCALLS to the obsolete section,
+       and explain why and how to replace them.
+       * acfunctions.m4 (AC_FUNC_WAIT3): Warn as obsolete.
+       * acspecific.m4 (AC_SYS_RESTARTABLE_SYSCALLS): Likewise.
+
 2001-06-15  Akim Demaille  <akim@epita.fr>
 
        `build_alias' and so on are not AC_SUBST'd.
diff --git a/NEWS b/NEWS
index 7eebad22576d95f962d8aed6c581b85384b3d918..8c3fd92c6d69f43dc731924398bb73cb60208c60 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,7 @@
 
 ** Specific Macros
 - AC_PATH_XTRA only adds -ldnet to $LIBS if it's needed to link.
+- AC_FUNC_WAIT3 and AC_SYS_RESTARTABLE_SYSCALLS are obsoleted.
 \f
 * Major changes in Autoconf 2.50
 
index c953750832c5bfd159d3be7ef68cb39fb5936481..6ef1462bd235313bc966f27899ea891082bbc275 100644 (file)
@@ -1578,7 +1578,10 @@ AU_ALIAS([AC_VPRINTF], [AC_FUNC_VPRINTF])
 # AC_FUNC_WAIT3
 # -------------
 AC_DEFUN([AC_FUNC_WAIT3],
-[AC_CACHE_CHECK(for wait3 that fills in rusage, ac_cv_func_wait3_rusage,
+[AC_DIAGNOSE([obsolete],
+[$0: `wait3' is being removed from the Open Group standards.
+Remove this `AC_FUNC_WAIT3' and adjust your code to use `waitpid' instead.])dnl
+AC_CACHE_CHECK(for wait3 that fills in rusage, ac_cv_func_wait3_rusage,
 [AC_TRY_RUN(
 [#include <sys/types.h>
 #include <sys/time.h>
index 1c62362af94e8678cbb2865c57885be4a0f46bb6..0071304abed4cd77f98234a3909c39b08dcba82e 100644 (file)
@@ -494,7 +494,11 @@ fi
 # If the system automatically restarts a system call that is
 # interrupted by a signal, define `HAVE_RESTARTABLE_SYSCALLS'.
 AC_DEFUN([AC_SYS_RESTARTABLE_SYSCALLS],
-[AC_REQUIRE([AC_HEADER_SYS_WAIT])dnl
+[AC_DIAGNOSE([obsolete],
+[$0: System call restartability is now typically set at runtime.
+Remove this `AC_SYS_RESTARTABLE_SYSCALLS'
+and adjust your code to use `sigaction' with `SA_RESTART' instead.])dnl
+AC_REQUIRE([AC_HEADER_SYS_WAIT])dnl
 AC_CHECK_HEADERS(unistd.h)
 AC_CACHE_CHECK(for restartable system calls, ac_cv_sys_restartable_syscalls,
 [AC_RUN_IFELSE([AC_LANG_SOURCE(
index ca391b51e3aee6bc7d33da5cb235c3cc0d45a11e..84e8128e9312f2f415d791873fcf35cd13e74cce 100644 (file)
@@ -3486,14 +3486,6 @@ is available, you may assume that @code{vfprintf} and @code{vsprintf}
 are also available.)
 @end defmac
 
-@defmac AC_FUNC_WAIT3
-@maindex FUNC_WAIT3
-@cvindex HAVE_WAIT3
-If @code{wait3} is found and fills in the contents of its third argument
-(a @samp{struct rusage *}), which HP-UX does not do, define
-@code{HAVE_WAIT3}.
-@end defmac
-
 @node Generic Functions,  , Particular Functions, Library Functions
 @subsection Generic Function Checks
 
@@ -4773,17 +4765,6 @@ system.  If so, set the shell variable @code{am_cv_sys_posix_termios} to
 @samp{yes}.  If not, set the variable to @samp{no}.
 @end defmac
 
-@defmac AC_SYS_RESTARTABLE_SYSCALLS
-@maindex SYS_RESTARTABLE_SYSCALLS
-@cvindex HAVE_RESTARTABLE_SYSCALLS
-If the system automatically restarts a system call that is interrupted
-by a signal, define @code{HAVE_RESTARTABLE_SYSCALLS}. This macro does
-not check if system calls are restarted in general--it tests whether a
-signal handler installed with @code{signal} (but not @code{sigaction})
-causes system calls to be restarted. It does not test if system calls
-can be restarted when interrupted by signals that have no handler.
-@end defmac
-
 @node UNIX Variants,  , System Services, Existing Tests
 @section UNIX Variants
 
@@ -9553,6 +9534,18 @@ and sets @code{EMXOS2}.
 @code{AC_CHECK_FUNC}
 @end defmac
 
+@defmac AC_FUNC_WAIT3
+@maindex FUNC_WAIT3
+@cvindex HAVE_WAIT3
+If @code{wait3} is found and fills in the contents of its third argument
+(a @samp{struct rusage *}), which HP-UX does not do, define
+@code{HAVE_WAIT3}.
+
+These days portable programs should use @code{waitpid}, not
+@code{wait3}, as @code{wait3} is being removed from the Open Group
+standards, and will not appear in the next revision of POSIX.
+@end defmac
+
 @defmac AC_GCC_TRADITIONAL
 @maindex GCC_TRADITIONAL
 @code{AC_PROG_GCC_TRADITIONAL}
@@ -9958,6 +9951,23 @@ now it just calls @code{AC_FUNC_STRFTIME} instead.
 @code{AC_STRUCT_ST_RDEV}
 @end defmac
 
+@defmac AC_SYS_RESTARTABLE_SYSCALLS
+@maindex SYS_RESTARTABLE_SYSCALLS
+@cvindex HAVE_RESTARTABLE_SYSCALLS
+If the system automatically restarts a system call that is interrupted
+by a signal, define @code{HAVE_RESTARTABLE_SYSCALLS}. This macro does
+not check if system calls are restarted in general--it tests whether a
+signal handler installed with @code{signal} (but not @code{sigaction})
+causes system calls to be restarted. It does not test if system calls
+can be restarted when interrupted by signals that have no handler.
+
+These days portable programs should use @code{sigaction} with
+@code{SA_RESTART} if they want restartable system calls.  They should
+not rely on @code{HAVE_RESTARTABLE_SYSCALLS}, since nowadays whether a
+system call is restartable is a dynamic issue, not a configuration-time
+issue.
+@end defmac
+
 @defmac AC_SYS_SIGLIST_DECLARED
 @maindex SYS_SIGLIST_DECLARED
 @code{AC_DECL_SYS_SIGLIST}
index c953750832c5bfd159d3be7ef68cb39fb5936481..6ef1462bd235313bc966f27899ea891082bbc275 100644 (file)
@@ -1578,7 +1578,10 @@ AU_ALIAS([AC_VPRINTF], [AC_FUNC_VPRINTF])
 # AC_FUNC_WAIT3
 # -------------
 AC_DEFUN([AC_FUNC_WAIT3],
-[AC_CACHE_CHECK(for wait3 that fills in rusage, ac_cv_func_wait3_rusage,
+[AC_DIAGNOSE([obsolete],
+[$0: `wait3' is being removed from the Open Group standards.
+Remove this `AC_FUNC_WAIT3' and adjust your code to use `waitpid' instead.])dnl
+AC_CACHE_CHECK(for wait3 that fills in rusage, ac_cv_func_wait3_rusage,
 [AC_TRY_RUN(
 [#include <sys/types.h>
 #include <sys/time.h>
index 1c62362af94e8678cbb2865c57885be4a0f46bb6..0071304abed4cd77f98234a3909c39b08dcba82e 100644 (file)
@@ -494,7 +494,11 @@ fi
 # If the system automatically restarts a system call that is
 # interrupted by a signal, define `HAVE_RESTARTABLE_SYSCALLS'.
 AC_DEFUN([AC_SYS_RESTARTABLE_SYSCALLS],
-[AC_REQUIRE([AC_HEADER_SYS_WAIT])dnl
+[AC_DIAGNOSE([obsolete],
+[$0: System call restartability is now typically set at runtime.
+Remove this `AC_SYS_RESTARTABLE_SYSCALLS'
+and adjust your code to use `sigaction' with `SA_RESTART' instead.])dnl
+AC_REQUIRE([AC_HEADER_SYS_WAIT])dnl
 AC_CHECK_HEADERS(unistd.h)
 AC_CACHE_CHECK(for restartable system calls, ac_cv_sys_restartable_syscalls,
 [AC_RUN_IFELSE([AC_LANG_SOURCE(