Hash :
42d1eda5
Author :
Date :
2009-01-13T08:48:48
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>.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
# serial 7
# Copyright (C) 2001, 2003-2004, 2006, 2008-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.
# On some systems, mkdir ("foo/", 0700) fails because of the trailing slash.
# On such systems, arrange to use a wrapper function that removes any
# trailing slashes.
AC_DEFUN([gl_FUNC_MKDIR_TRAILING_SLASH],
[dnl
AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
AC_CHECK_HEADERS_ONCE([unistd.h])
AC_CACHE_CHECK([whether mkdir fails due to a trailing slash],
gl_cv_func_mkdir_trailing_slash_bug,
[
# Arrange for deletion of the temporary directory this test might create.
ac_clean_files="$ac_clean_files confdir-slash"
AC_TRY_RUN([
# include <sys/types.h>
# include <sys/stat.h>
# include <stdlib.h>
# ifdef HAVE_UNISTD_H
# include <unistd.h>
# endif
int main ()
{
rmdir ("confdir-slash");
exit (mkdir ("confdir-slash/", 0700));
}
],
gl_cv_func_mkdir_trailing_slash_bug=no,
gl_cv_func_mkdir_trailing_slash_bug=yes,
gl_cv_func_mkdir_trailing_slash_bug=yes
)
]
)
if test $gl_cv_func_mkdir_trailing_slash_bug = yes; then
REPLACE_MKDIR=1
AC_LIBOBJ([mkdir])
gl_PREREQ_MKDIR
fi
])
# Prerequisites of lib/mkdir.c.
AC_DEFUN([gl_PREREQ_MKDIR], [:])