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.63-174-


From: Eric Blake
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.63-174-g3b78b1a
Date: Mon, 10 Nov 2008 16:12:38 +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=3b78b1ae088255de3108bf7497857ea133aa604b

The branch, master has been updated
       via  3b78b1ae088255de3108bf7497857ea133aa604b (commit)
      from  3063ce9fd4abf81682ea97eafd0ae5b487fa62fb (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 3b78b1ae088255de3108bf7497857ea133aa604b
Author: Eric Blake <address@hidden>
Date:   Mon Nov 10 08:28:48 2008 -0700

    Try 'print -r --' as a non-forking variant of 'printf %s\\n'.
    
    * lib/m4sugar/m4sh.m4 (_AS_ECHO_PREPARE): Cater to Solaris ksh.
    * doc/autoconf.texi (Limitations of Builtins) <printf>: Document
    the print workaround.
    Idea by Paolo Bonzini.
    
    Signed-off-by: Eric Blake <address@hidden>

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

Summary of changes:
 ChangeLog           |    8 ++++++++
 doc/autoconf.texi   |    6 ++++++
 lib/m4sugar/m4sh.m4 |   10 ++++++++--
 3 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5ddd2f7..6dd25c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2008-11-10  Eric Blake  <address@hidden>
 
+       Try 'print -r --' as a non-forking variant of 'printf %s\\n'.
+       * lib/m4sugar/m4sh.m4 (_AS_ECHO_PREPARE): Cater to Solaris ksh.
+       * doc/autoconf.texi (Limitations of Builtins) <printf>: Document
+       the print workaround.
+       Idea by Paolo Bonzini.
+
+2008-11-10  Eric Blake  <address@hidden>
+
        Provide a section on all tools allowed in GNU Coding Standards.
        * doc/autoconf.texi (Limitations of Builtins) <read>: Sort.
        <wait>: Add section.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index f59be60..86bed7f 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -15291,6 +15291,12 @@ example, @file{/usr/bin/printf} is buggy, so when using
 @command{/bin/sh} the command @samp{printf %010000x 123} normally dumps
 core.
 
+Since @command{printf} is not always a shell builtin, there is a
+potential speed penalty for using @code{printf %s\\n} as a replacement
+for an @command{echo} that does not interpret @samp{\} or leading
address@hidden With Solaris @command{ksh}, it is possible to use @code{print
+-r --} for this role instead.
+
 
 @item @command{pwd}
 @c ----------------
diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4
index a506ef0..e0b7c55 100644
--- a/lib/m4sugar/m4sh.m4
+++ b/lib/m4sugar/m4sh.m4
@@ -875,7 +875,7 @@ m4_defun_init([AS_ECHO_N],
 # _AS_ECHO_PREPARE
 # -----------------
 # Arrange for $as_echo 'FOO' to echo FOO without escape-interpretation;
-# and similarly for $as_echo_foo, which omits the trailing newline.
+# and similarly for $as_echo_n, which omits the trailing newline.
 # 'FOO' is an optional single argument; a missing FOO is treated as empty.
 m4_defun([_AS_ECHO_PREPARE],
 [[as_nl='
@@ -885,7 +885,13 @@ export as_nl
 
as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
   as_echo='printf %s\n'
   as_echo_n='printf %s'
 else


hooks/post-receive
--
GNU Autoconf source repository




reply via email to

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