diff options
author | Jim Meyering <meyering@redhat.com> | 2009-01-13 08:48:48 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-01-14 11:24:37 +0100 |
commit | 42d1eda5dcce2d68deab7a642e7f29bcd7144a0d (patch) | |
tree | b98321c6a2033a0906b3f1244890450465d321e2 /m4/calloc.m4 | |
parent | 951fba5cd13092b41e4085878ffeee1145cb572d (diff) | |
download | gnulib-42d1eda5dcce2d68deab7a642e7f29bcd7144a0d.tar.gz |
many *.m4 files: improve m4 quoting
99% of this change was performed by running the following commands:
git ls-files | grep '\.m4$' | xargs perl -pi \
-e 's/(AC_\w+\()([^[()]+?)([,)])/$1\[$2]$3/g;' \
-e 's/(AC_\w+\((?:\[[^,]+?\], ){1})([^,[()]+?)([,)])/$1\[$2]$3/g;' \
-e 's/(AC_\w+\((?:\[[^,]+?\], ){2})([^,[()]+?)([,)])/$1\[$2]$3/g;' \
-e 's/(AC_\w+\((?:\[[^,]+?\], ){3})([^,[()]+?)([,)])/$1\[$2]$3/g'
perl -pi -e 's/\[\.\.\.\]/.../' m4/onceonly.m4
The remainder were to add Copyright dates, increment serial numbers,
undo some changes in comments, exclude m4/intl.m4, and add quotes
around the "1" in ",1" where the unusual spacing prohibited the
above regexps from doing the job. For more details, see
<http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/16175>.
Diffstat (limited to 'm4/calloc.m4')
-rw-r--r-- | m4/calloc.m4 | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/m4/calloc.m4 b/m4/calloc.m4 index b282067bbd..b0637b44ad 100644 --- a/m4/calloc.m4 +++ b/m4/calloc.m4 @@ -1,6 +1,6 @@ -# calloc.m4 serial 8 +# calloc.m4 serial 9 -# Copyright (C) 2004-2008 Free Software Foundation, Inc. +# Copyright (C) 2004-2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -12,12 +12,12 @@ # If so, define HAVE_CALLOC. Otherwise, define calloc to rpl_calloc # and arrange to use a calloc wrapper function that does work in that case. -# _AC_FUNC_CALLOC_IF(IF-WORKS, IF-NOT) +# _AC_FUNC_CALLOC_IF([IF-WORKS], [IF-NOT]) # ------------------------------------- # If `calloc (0, 0)' is properly handled, run IF-WORKS, otherwise, IF-NOT. AC_DEFUN([_AC_FUNC_CALLOC_IF], [AC_REQUIRE([AC_TYPE_SIZE_T])dnl -AC_CACHE_CHECK([for GNU libc compatible calloc], ac_cv_func_calloc_0_nonnull, +AC_CACHE_CHECK([for GNU libc compatible calloc], [ac_cv_func_calloc_0_nonnull], [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [[exit (!calloc (0, 0) || calloc ((size_t) -1 / 8 + 1, 8));]])], [ac_cv_func_calloc_0_nonnull=yes], @@ -33,10 +33,10 @@ AS_IF([test $ac_cv_func_calloc_0_nonnull = yes], [$1], [$2]) # needed. AC_DEFUN([AC_FUNC_CALLOC], [_AC_FUNC_CALLOC_IF( - [AC_DEFINE([HAVE_CALLOC], 1, + [AC_DEFINE([HAVE_CALLOC], [1], [Define to 1 if your system has a GNU libc compatible `calloc' function, and to 0 otherwise.])], - [AC_DEFINE([HAVE_CALLOC], 0) + [AC_DEFINE([HAVE_CALLOC], [0]) AC_LIBOBJ([calloc]) AC_DEFINE([calloc], [rpl_calloc], [Define to rpl_calloc if the replacement function should be used.])]) @@ -52,7 +52,7 @@ AC_DEFUN([gl_FUNC_CALLOC_POSIX], AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) if test $gl_cv_func_malloc_posix = yes; then HAVE_CALLOC_POSIX=1 - AC_DEFINE([HAVE_CALLOC_POSIX], 1, + AC_DEFINE([HAVE_CALLOC_POSIX], [1], [Define if the 'calloc' function is POSIX compliant.]) else AC_LIBOBJ([calloc]) |