[SCM] GNU Autoconf source repository branch, master, updated. v2.64-46-gc8c7589

"Ralf Wildenhues" <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.cvs
Message-ID <[email protected]>
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=c8c7589040843eaaa52c6d3ff6e3b7fddd663cd9

The branch, master has been updated
       via  c8c7589040843eaaa52c6d3ff6e3b7fddd663cd9 (commit)
       via  22ac64cd53d5491f095192c3bdeeb45a80bfcdd0 (commit)
      from  6b22fb3155ac0d04daa57951f1a1fe4c36162e9b (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 c8c7589040843eaaa52c6d3ff6e3b7fddd663cd9
Author: Ralf Wildenhues <[email protected]>
Date:   Sun Sep 13 21:18:37 2009 +0200

    Work around DJGPP shell function return bug with command substitutions.
    
    DJGPP bash 2.04 has a bug in that `return $ac_retval' done in a
    shell function which also contains a command substitution causes
    the shell to barf.  For more details and a fix see:
    <http://www.delorie.com/djgpp/mail-archives/browse.cgi?p=djgpp-workers/2009/09/09/03:35:08>
    Possible workaround include putting the `return' in a subshell
    or calling another function to set the status.
    
    * lib/autoconf/general.m4 (_AC_PREPROC_IFELSE_BODY)
    (_AC_COMPILE_IFELSE_BODY, _AC_LINK_IFELSE_BODY)
    (_AC_RUN_IFELSE_BODY, _AC_COMPUTE_INT_BODY): Use AS_SET_STATUS
    instead of `return'.
    * doc/autoconf.texi (Common Shell Constructs, Shell Functions):
    Document the issue.
    * THANKS: Update.
    Report by Rugxulo and Reuben Thomas.
    
    Signed-off-by: Ralf Wildenhues <[email protected]>

commit 22ac64cd53d5491f095192c3bdeeb45a80bfcdd0
Author: Ralf Wildenhues <[email protected]>
Date:   Sun Sep 13 21:14:27 2009 +0200

    DJGPP fix: Do not redirect standard input in configure scripts.
    
    * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): If $DJGPP is
    nonempty, do not dup fd 0 to AS_ORIGINAL_STDIN_FD, do not close
    fd 0.
    
    Signed-off-by: Ralf Wildenhues <[email protected]>

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

Summary of changes:
 ChangeLog               |   23 +++++++++++++++++++++++
 THANKS                  |    1 +
 doc/autoconf.texi       |   10 +++++++++-
 lib/autoconf/general.m4 |   13 +++++++------
 4 files changed, 40 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d128e2a..f797543 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2009-09-15  Ralf Wildenhues  <[email protected]>
+
+	Work around DJGPP shell function return bug with command substitutions.
+	DJGPP bash 2.04 has a bug in that `return $ac_retval' done in a
+	shell function which also contains a command substitution causes
+	the shell to barf.  For more details and a fix see:
+	<http://www.delorie.com/djgpp/mail-archives/browse.cgi?p=djgpp-workers/2009/09/09/03:35:08>
+	Possible workaround include putting the `return' in a subshell
+	or calling another function to set the status.
+	* lib/autoconf/general.m4 (_AC_PREPROC_IFELSE_BODY)
+	(_AC_COMPILE_IFELSE_BODY, _AC_LINK_IFELSE_BODY)
+	(_AC_RUN_IFELSE_BODY, _AC_COMPUTE_INT_BODY): Use AS_SET_STATUS
+	instead of `return'.
+	* doc/autoconf.texi (Common Shell Constructs, Shell Functions):
+	Document the issue.
+	* THANKS: Update.
+	Report by Rugxulo and Reuben Thomas.
+
+	DJGPP fix: Do not redirect standard input in configure scripts.
+	* lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): If $DJGPP is
+	nonempty, do not dup fd 0 to AS_ORIGINAL_STDIN_FD, do not close
+	fd 0.
+
 2009-09-14  Eric Blake  <[email protected]>
 
 	Quote result of m4_toupper and m4_tolower.
diff --git a/THANKS b/THANKS
index 28312f7..ba239ca 100644
--- a/THANKS
+++ b/THANKS
@@ -319,6 +319,7 @@ Rolf Ebert                  [email protected]
 Rolf Vandevaart             [email protected]
 Romain Lenglet              [email protected]
 Ruediger Kuhlmann           [email protected]
+Rugxulo                     [email protected]
 Ruslan Babayev              [email protected]
 Russ Allbery                [email protected]
 Russ Boylan                 [email protected]
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 72ebde0..a38db00 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -12691,7 +12691,9 @@ Also see the @code{AC_PROG_MKDIR_P} macro (@pxref{Particular Programs}).
 Emit shell code to set the value of @samp{$?} to @var{status}, as
 efficiently as possible.  However, this is not guaranteed to abort a
 shell running with @code{set -e} (@pxref{set, , Limitations of Shell
-Builtins}).
+Builtins}).  This should also be used at the end of a complex shell
+function instead of @samp{return} (@pxref{Shell Functions}) to avoid
+a @acronym{DJGPP} shell bug.
 @end defmac
 
 @defmac AS_TR_CPP (@var{expression})
@@ -15502,6 +15504,12 @@ $ @kbd{ash -c 'foo()@{ echo $?; @}; trap foo 0; (exit 2); exit 2'; echo $?}
 2
 @end example
 
+@acronym{DJGPP} bash 2.04 has a bug in that @command{return} from a
+shell function which also used a command substitution causes a
+segmentation fault.  To work around the issue, you can use
+@command{return} from a subshell, or @samp{AS_SET_STATUS} as last command
+in the execution flow of the function (@pxref{Common Shell Constructs}).
+
 Not all shells treat shell functions as simple commands impacted by
 @samp{set -e}, for example with Solaris 10 @command{bin/sh}:
 
diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4
index 43b5e23..c119088 100644
--- a/lib/autoconf/general.m4
+++ b/lib/autoconf/general.m4
@@ -385,7 +385,8 @@ AU_ALIAS([AC_FD_MSG], [AS_MESSAGE_FD])
 m4_define([_AC_INIT_DEFAULTS],
 [m4_divert_push([DEFAULTS])dnl
 
-exec AS_ORIGINAL_STDIN_FD<&0 </dev/null AS_MESSAGE_FD>&1
+test -n "$DJDIR" || exec AS_ORIGINAL_STDIN_FD<&0 </dev/null
+exec AS_MESSAGE_FD>&1
 
 # Name of the host.
 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
@@ -2456,7 +2457,7 @@ m4_define([_AC_PREPROC_IFELSE_BODY],
     [_AC_MSG_LOG_CONFTEST
     ac_retval=1])
   AS_LINENO_POP
-  return $ac_retval
+  AS_SET_STATUS([$ac_retval])
 ])# _AC_PREPROC_IFELSE_BODY
 
 
@@ -2545,7 +2546,7 @@ m4_define([_AC_COMPILE_IFELSE_BODY],
       [_AC_MSG_LOG_CONFTEST
 	ac_retval=1])
   AS_LINENO_POP
-  return $ac_retval
+  AS_SET_STATUS([$ac_retval])
 ])# _AC_COMPILE_IFELSE_BODY
 
 
@@ -2609,7 +2610,7 @@ m4_define([_AC_LINK_IFELSE_BODY],
   # left behind by Apple's compiler.  We do this before executing the actions.
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
   AS_LINENO_POP
-  return $ac_retval
+  AS_SET_STATUS([$ac_retval])
 ])# _AC_LINK_IFELSE_BODY
 
 
@@ -2681,7 +2682,7 @@ m4_define([_AC_RUN_IFELSE_BODY],
        ac_retval=$ac_status])
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
   AS_LINENO_POP
-  return $ac_retval
+  AS_SET_STATUS([$ac_retval])
 ])# _AC_RUN_IFELSE_BODY
 
 
@@ -3003,7 +3004,7 @@ m4_define([_AC_COMPUTE_INT_BODY],
 			[ac_retval=0], [ac_retval=1])
   fi
   AS_LINENO_POP
-  return $ac_retval
+  AS_SET_STATUS([$ac_retval])
 ])# _AC_COMPUTE_INT_BODY
 
 # AC_COMPUTE_INT(VARIABLE, EXPRESSION, PROLOGUE, [IF-FAILS])


hooks/post-receive
-- 
GNU Autoconf source repository
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.