autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AC_SYS_RESTARTABLE_SYSCALLS (was: fyi-ac-arg-var.patch)


From: Pavel Roskin
Subject: AC_SYS_RESTARTABLE_SYSCALLS (was: fyi-ac-arg-var.patch)
Date: Fri, 22 Jun 2001 15:46:15 -0400 (EDT)

Hi, Akim!

> Pavel> I believe that we should satisfy the following requirements:
>
> Pavel> 1) AC_SYS_RESTARTABLE_SYSCALLS should work as before, i.e. it
> Pavel> should expand to the same code in configure. As a consequence
> Pavel> ...
>
> The current implementation is OK, and AU it too.

Right, but autoupdate will put the definition of
AC_SYS_RESTARTABLE_SYSCALLS to configure.ac. This is not Ok. Not only will
the internal code go to configure.ac, but also AC_REQUIRE won't be valid
anymore.

> Pavel> 2) it should still be possible to use AC_REQUIRE from
> Pavel> AC_SYS_RESTARTABLE_SYSCALLS (it's used now).
>
> The current implementation is OK, and AU it too.

AU is not Ok. The result of running autoupdate will be invalid.

> Pavel> 3) Use of AC_SYS_RESTARTABLE_SYSCALLS in configure.in should
> Pavel> cause a warning displayed by autoconf (that was the idea of the
> Pavel> patch).
>
> Likewise.

Except that the testsuite is unhappy.

> Pavel> 4) The testsuite should test
> Pavel> AC_SYS_RESTARTABLE_SYSCALLS. Warnings from autoconf should be
> Pavel> either ignored or checked for being non-empty.
>
> If AU'd, that will be the case.

Right, but AT_CHECK_AU_MACRO checks that `configure.ac' is _updated_.
I don't feel good about autoupdate removing AC_SYS_RESTARTABLE_SYSCALLS or
replacing it with a comment.

> Pavel> 5) autoupdate should either leave AC_SYS_RESTARTABLE_SYSCALLS
> Pavel> unchanged or add a comment saying that it's obsolete (the later
> Pavel> would have ugly consequences if autoupdate is run more than
> Pavel> once). Maybe it should tell the user that there is no
> Pavel> replacement for AC_SYS_RESTARTABLE_SYSCALLS, and eliminating it
> Pavel> requires manual intervention.
>
> Hm...

That's why _adding_ a comment is not good.

> Pavel> The existing testsuite implies that either a macro causes no
> Pavel> warnings or it's updateable.
>
> Not exactly.  Either the macro is tested `stupidly', or it has
> dedicated code.  But what matters is that AC_DEFUN macros must not
> depend upon obsolete macros.

But is it Ok for you that some macros defined with AC_DEFUN are obsolete
themselves? Or you don't want AC_DEFUN to be used on them?

> Pavel> The simpleast solution would be to introduce AC_DEFUN_WARNING
> Pavel> that would act like like AC_DEFUN except that mktests.sh would
> Pavel> put it to a separate list of macros tested with, say
> Pavel> AT_CHECK_MACRO_WARN, that would make sure that a warning is
> Pavel> produced by autoconf.
>
> I'm not too happy with adding some more forms of AC_DEFUN, and just
> for the test suite :(  I'd rather have an exception for these macros,
> and have dedicated code somewhere, passing the right -W flags to have
> them silent.

Done.

ChangeLog:
        * tests/atspecific.m4 (AT_CHECK_MACRO): Accept one more
        argument, AUTOCONF-FLAGS.
        * tests/mktests.sh (update_exclude_list): Add
        AC_SYS_RESTARTABLE_SYSCALLS and AC_FUNC_WAIT3.
        * tests/semantics.at: Test AC_SYS_RESTARTABLE_SYSCALLS and
        AC_FUNC_WAIT3 with "-W no-obsolete".

-- 
Regards,
Pavel Roskin

-------------------------------------------------------------
--- tests/atspecific.m4
+++ tests/atspecific.m4
@@ -128,8 +128,8 @@
 ])# _AT_CHECK_AC_MACRO


-# AT_CHECK_MACRO(MACRO, [MACRO-USE], [ADDITIONAL-CMDS])
-# -----------------------------------------------------
+# AT_CHECK_MACRO(MACRO, [MACRO-USE], [ADDITIONAL-CMDS], [AUTOCONF-FLAGS])
+# -----------------------------------------------------------------------
 # Create a minimalist configure.ac running the macro named
 # NAME-OF-THE-MACRO, check that autoconf runs on that script,
 # and that the shell runs correctly the configure.
@@ -141,7 +141,7 @@
 [AT_SETUP([$1])
 AT_CONFIGURE_AC([m4_default([$2], [$1])])

-AT_CHECK_AUTOCONF([-W obsolete])
+AT_CHECK_AUTOCONF([m4_default([$4], [-W obsolete])])
 AT_CHECK_AUTOHEADER
 AT_CHECK_CONFIGURE
 AT_CHECK_ENV
--- tests/mktests.sh
+++ tests/mktests.sh
@@ -107,6 +107,8 @@
 #   AU defined to nothing.
 # - AC_PATH_XTRA
 #   Checked in semantics.
+# - AC_SYS_RESTARTABLE_SYSCALLS, AC_FUNC_WAIT3
+#   Obsolete, checked in semantics.
 #
 ac_exclude_list='^AC_ARG_VAR$
 ^AC_CANONICALIZE|AC_PREFIX_PROGRAM|AC_PREREQ$
@@ -128,6 +130,8 @@
 ^(AC_(PROG_CC|C_CONST|C_INLINE|C_VOLATILE))$
 ^AC_(CYGWIN|CYGWIN32|EMXOS2|MING32|EXEEXT|OBJEXT)$
 ^AC_PATH_XTRA$
+^AC_SYS_RESTARTABLE_SYSCALLS$
+^AC_FUNC_WAIT3$
 _AC_'


--- tests/semantics.at
+++ tests/semantics.at
@@ -369,3 +369,12 @@
 ])

 AT_CLEANUP
+
+
+## ------------------------------- ##
+## Obsolete non-updatable macros.  ##
+## ------------------------------- ##
+
+
+AT_CHECK_MACRO([AC_SYS_RESTARTABLE_SYSCALLS], , ,[-W no-obsolete])
+AT_CHECK_MACRO([AC_FUNC_WAIT3], , ,[-W no-obsolete])




reply via email to

[Prev in Thread] Current Thread [Next in Thread]