autoconf-commit
[Top][All Lists]
Advanced

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

[SCM] GNU Autoconf source repository branch, master, updated. v2.63b-92-


From: Eric Blake
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.63b-92-g3171783
Date: Sat, 25 Jul 2009 01:02:51 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=3171783adb625c3d6bae7870d6b6c5abbc933f87

The branch, master has been updated
       via  3171783adb625c3d6bae7870d6b6c5abbc933f87 (commit)
      from  331729f7a83c2104aab39ae336be124775ea604f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3171783adb625c3d6bae7870d6b6c5abbc933f87
Author: Eric Blake <address@hidden>
Date:   Fri Jul 24 19:00:49 2009 -0600

    Fix AS_EXIT for FreeBSD sh.
    
    * lib/m4sugar/m4sh.m4 (AS_EXIT): Always supply an argument to the
    shell function, since $? is not reliable on function entry.
    (_AS_EXIT_PREPARE): Simplify to assume argument.
    Reported by Ralf Wildenhues.
    
    Signed-off-by: Eric Blake <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog           |    8 ++++++++
 lib/m4sugar/m4sh.m4 |   13 +++++++------
 2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 19527f0..7ed46e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-07-24  Eric Blake  <address@hidden>
+
+       Fix AS_EXIT for FreeBSD sh.
+       * lib/m4sugar/m4sh.m4 (AS_EXIT): Always supply an argument to the
+       shell function, since $? is not reliable on function entry.
+       (_AS_EXIT_PREPARE): Simplify to assume argument.
+       Reported by Ralf Wildenhues.
+
 2009-07-23  Eric Blake  <address@hidden>
 
        Run more tests under Solaris.
diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4
index b2cabd7..cc4c32f 100644
--- a/lib/m4sugar/m4sh.m4
+++ b/lib/m4sugar/m4sh.m4
@@ -542,6 +542,8 @@ esac])# AS_CASE
 # will not set $? to N while running the code set by "trap 0"
 # Some shells fork even for (exit N), so we use a helper function
 # to set $? prior to the exit.
+# Then there are shells that don't inherit $? correctly into the start of
+# a shell function, so we must always be given an argument.
 # Other shells don't use `$?' as default for `exit', hence just repeating
 # the exit value can only help improving portability.
 m4_defun([_AS_EXIT_PREPARE],
@@ -549,12 +551,11 @@ m4_defun([_AS_EXIT_PREPARE],
   [AS_FUNCTION_DESCRIBE([as_fn_set_status], [STATUS],
     [Set $? to STATUS, without forking.])], [  return $[]1])]dnl
 [AS_REQUIRE_SHELL_FN([as_fn_exit],
-  [AS_FUNCTION_DESCRIBE([as_fn_exit], [[[STATUS=$?]]],
+  [AS_FUNCTION_DESCRIBE([as_fn_exit], [STATUS],
     [Exit the shell with STATUS, even in a "trap 0" or "set -e" context.])],
-[  as_status=$?
-  set +e
-  as_fn_set_status ${1-$as_status}
-  exit ${1-$as_status}])])#_AS_EXIT_PREPARE
+[  set +e
+  as_fn_set_status $[1]
+  exit $[1]])])#_AS_EXIT_PREPARE
 
 
 # AS_EXIT([EXIT-CODE = $?])
@@ -563,7 +564,7 @@ m4_defun([_AS_EXIT_PREPARE],
 # within "trap 0", and without interference from "set -e".  If
 # EXIT-CODE is omitted, then use $?.
 m4_defun([AS_EXIT],
-[AS_REQUIRE([_AS_EXIT_PREPARE])[]as_fn_exit[]m4_ifval([$1], [ $1])])
+[AS_REQUIRE([_AS_EXIT_PREPARE])[]as_fn_exit m4_ifval([$1], [$1], [$][?])])
 
 
 # AS_FOR(MACRO, SHELL-VAR, [LIST = "$@"], [BODY = :])


hooks/post-receive
-- 
GNU Autoconf source repository




reply via email to

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