]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Quote result of m4_toupper and m4_tolower.
authorEric Blake <ebb9@byu.net>
Mon, 14 Sep 2009 12:58:51 +0000 (06:58 -0600)
committerEric Blake <ebb9@byu.net>
Mon, 14 Sep 2009 19:05:46 +0000 (13:05 -0600)
* lib/m4sugar/m4sugar.m4 (m4_tolower, m4_toupper): Quote result.
* lib/autotest/general.m4 (AT_KEYWORDS): Adjust caller.
* tests/m4sugar.at (m4@&t@_toupper and m4@&t@_tolower): New test.
* NEWS: Document this.
* THANKS: Update.
Reported by Sam Steingold.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
NEWS
THANKS
lib/autotest/general.m4
lib/m4sugar/m4sugar.m4
tests/m4sugar.at

index 93a5bc8933e730483d573badbbe3813de1d0c4fb..d128e2ad5a65ad637234052944ac746bfff52b0a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-09-14  Eric Blake  <ebb9@byu.net>
+
+       Quote result of m4_toupper and m4_tolower.
+       * lib/m4sugar/m4sugar.m4 (m4_tolower, m4_toupper): Quote result.
+       * lib/autotest/general.m4 (AT_KEYWORDS): Adjust caller.
+       * tests/m4sugar.at (m4@&t@_toupper and m4@&t@_tolower): New test.
+       * NEWS: Document this.
+       * THANKS: Update.
+       Reported by Sam Steingold.
+
 2009-09-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        DJGPP fix: remove both conftest and conftest.exe.
diff --git a/NEWS b/NEWS
index 262be0c18c31aa33280ec43bede5a9de40a14f89..01bc094174c575e95148c10dbbf836c15c4169cd 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,9 @@ GNU Autoconf NEWS - User visible changes.
 ** The following documented autotest macros are new:
    AT_CHECK_EUNIT
 
+** The following m4sugar macros now quote their expansion:
+   m4_toupper  m4_tolower
+
 ** The `$tmp' temporary directory used in config.status is documented for
    public use now.
 
diff --git a/THANKS b/THANKS
index 4a96e347043366c69797ec7b20f922dc0257d83d..28312f76a9f3bd392ead7f5b64fa93c181212fc7 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -325,6 +325,7 @@ Russ Boylan                 ross@biostat.ucsf.edu
 Ryuji Abe                   raeva@t3.rim.or.jp
 Sam Sexton                  Sam.Sexton@reuters.com
 Sam Sirlin                  sam@kalessin.jpl.nasa.gov
+Sam Steingold               sds@gnu.org
 Sam Varshavchik             mrsam@courier-mta.com
 Sander Niemeijer            niemeijer@science-and-technology.nl
 santilĂ­n                    listas@gestiong.org
index 2c164b55ab65d82952d6b6e9fe435bac6015ada5..33218fd8afad913fb06141ba4ad2e1ee6e099718 100644 (file)
@@ -1814,8 +1814,8 @@ m4_case([$1],
 # Since the -k option is case-insensitive, the list is stored in lower case
 # to avoid duplicates that differ only by case.
 _AT_DEFINE_SETUP([AT_KEYWORDS],
-[m4_append_uniq_w([AT_keywords], m4_tolower(m4_dquote(_m4_expand([$1
-]))))])
+[m4_append_uniq_w([AT_keywords], m4_tolower(_m4_expand([$1
+])))])
 
 
 # AT_CAPTURE_FILE(FILE)
index 7bc72b6e0349c455bb12c868726fdc04797c2a4f..2e53ea3729622169b47c0356ccf54932d373e378 100644 (file)
@@ -2266,11 +2266,11 @@ m4_defn([m4_re_string])dnl
 #
 # Rather than expand the m4_defn each time, we inline them up front.
 m4_define([m4_tolower],
-[m4_translit([$1], ]m4_dquote(m4_defn([m4_cr_LETTERS]))[,
-                  ]m4_dquote(m4_defn([m4_cr_letters]))[)])
+[m4_translit([[$1]], ]m4_dquote(m4_defn([m4_cr_LETTERS]))[,
+                    ]m4_dquote(m4_defn([m4_cr_letters]))[)])
 m4_define([m4_toupper],
-[m4_translit([$1], ]m4_dquote(m4_defn([m4_cr_letters]))[,
-                  ]m4_dquote(m4_defn([m4_cr_LETTERS]))[)])
+[m4_translit([[$1]], ]m4_dquote(m4_defn([m4_cr_letters]))[,
+                    ]m4_dquote(m4_defn([m4_cr_LETTERS]))[)])
 
 
 # m4_split(STRING, [REGEXP])
index 87c303f67dae926e73f2cedf8eabd710d78e83a0..d37681b234d1e175c87262caa9ea336c68ce5729 100644 (file)
@@ -1292,6 +1292,43 @@ AB
 
 AT_CLEANUP
 
+## ------------------------ ##
+## m4_toupper, m4_tolower.  ##
+## ------------------------ ##
+
+AT_SETUP([m4@&t@_toupper and m4@&t@_tolower])
+
+AT_CHECK_M4SUGAR_TEXT(
+[[m4_define([abc], [hI])m4_define([ABC], [Hi])
+m4_toupper(abc aBc ABC)
+m4_tolower(abc aBc ABC)
+m4_toupper([abc aBc ABC])
+m4_tolower([abc aBc ABC])
+m4_echo(m4_toupper(abc aBc ABC))
+m4_echo(m4_tolower(abc aBc ABC))
+m4_echo(m4_toupper([abc aBc ABC]))
+m4_echo(m4_tolower([abc aBc ABC]))
+m4_do(m4_toupper(abc aBc ABC))
+m4_do(m4_tolower(abc aBc ABC))
+m4_do(m4_toupper([abc aBc ABC]))
+m4_do(m4_tolower([abc aBc ABC]))
+]], [[
+HI ABC HI
+hi abc hi
+ABC ABC ABC
+abc abc abc
+HI ABC HI
+hi abc hi
+ABC ABC ABC
+abc abc abc
+HI Hi HI
+hi hI hi
+Hi Hi Hi
+hI hI hI
+]])
+
+AT_CLEANUP
+
 ## --------------- ##
 ## m4_bpatsubsts.  ##
 ## --------------- ##