diff options
author | Jim Meyering <meyering@iou.iou> | 2008-12-30 19:16:08 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-01-01 02:15:07 +0100 |
commit | 7fc5292a291dab4a1b5bf5370de1e083003dd18b (patch) | |
tree | 419f9dc905fa4297761f0118520ca0a9e0cbc9e8 /m4 | |
parent | cf5616a0aaa6f357b5d74e495dddcc0d8dac100c (diff) | |
download | coreutils-7fc5292a291dab4a1b5bf5370de1e083003dd18b.tar.xz |
improve M4 quoting
* configure.ac: Add quotes.
* gl/m4/mgetgroups.m4 (gl_MGETGROUPS): Likewise.
* m4/boottime.m4 (GNULIB_BOOT_TIME): Likewise.
* m4/check-decl.m4 (gl_CHECK_DECLS): Likewise.
* m4/gmp.m4 (cu_GMP): Likewise.
* m4/jm-macros.m4 (coreutils_MACROS, gl_CHECK_ALL_HEADERS): Likewise.
(gl_CHECK_ALL_TYPES): Likewise.
* m4/lib-check.m4 (cu_LIB_CHECK): Likewise.
* m4/stat-prog.m4 (cu_PREREQ_STAT_PROG): Likewise.
FYI, I first ran this command:
git ls-files | grep -E '\.(m4|ac)$' | xargs perl -pi \
-e 's/(AC_[A-Z_]+\()([^[()]+?)([,)])/$1\[$2]$3/g;' \
-e 's/(AC_[A-Z_]+\(\[[^,]+?\], )([^,[()]+?)([,)])/$1\[$2]$3/g;' \
-e 's/(AC_[A-Z_]+\((?:\[[^,]+?\], ){2})([^,[()]+?)([,)])/$1\[$2]$3/g'
Then I updated serial numbers and copyright dates manually.
Also, I manually added two pairs of quotes in boottime.m4.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/boottime.m4 | 16 | ||||
-rw-r--r-- | m4/check-decl.m4 | 6 | ||||
-rw-r--r-- | m4/gmp.m4 | 2 | ||||
-rw-r--r-- | m4/jm-macros.m4 | 24 | ||||
-rw-r--r-- | m4/lib-check.m4 | 22 | ||||
-rw-r--r-- | m4/stat-prog.m4 | 8 |
6 files changed, 39 insertions, 39 deletions
diff --git a/m4/boottime.m4 b/m4/boottime.m4 index 863eb02c3..ca4b85e40 100644 --- a/m4/boottime.m4 +++ b/m4/boottime.m4 @@ -1,7 +1,7 @@ -# boottime.m4 serial 3 +# boottime.m4 serial 4 # Determine whether this system has infrastructure for obtaining the boot time. -# Copyright (C) 1996, 2000, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. +# Copyright (C) 1996, 2000, 2002-2004, 2006, 2008 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -20,14 +20,14 @@ * ---------------------------------------------------------- AC_DEFUN([GNULIB_BOOT_TIME], [ - AC_CHECK_FUNCS(sysctl) - AC_CHECK_HEADERS_ONCE(sys/param.h) - AC_CHECK_HEADERS(sys/sysctl.h, [], [], + AC_CHECK_FUNCS([sysctl]) + AC_CHECK_HEADERS_ONCE([sys/param.h]) + AC_CHECK_HEADERS([sys/sysctl.h], [], [], [AC_INCLUDES_DEFAULT [#if HAVE_SYS_PARAM_H #include <sys/param.h> #endif]]) - AC_CHECK_HEADERS_ONCE(utmp.h utmpx.h OS.h) + AC_CHECK_HEADERS_ONCE([utmp.h utmpx.h OS.h]) AC_CACHE_CHECK( [whether we can get the system boot time], [gnulib_cv_have_boot_time], @@ -57,8 +57,8 @@ AC_DEFUN([GNULIB_BOOT_TIME], please_tell_us_how_to_determine_boot_time_on_your_system #endif ]])], - gnulib_cv_have_boot_time=yes, - gnulib_cv_have_boot_time=no) + [gnulib_cv_have_boot_time=yes], + [gnulib_cv_have_boot_time=no]) ]) AS_IF([test $gnulib_cv_have_boot_time = yes], [$1], [$2]) ]) diff --git a/m4/check-decl.m4 b/m4/check-decl.m4 index d5203529d..e2d20f3f8 100644 --- a/m4/check-decl.m4 +++ b/m4/check-decl.m4 @@ -1,7 +1,7 @@ -#serial 23 +#serial 24 # Check declarations for this package. -dnl Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006 +dnl Copyright (C) 1997-2001, 2003-2006, 2008 dnl Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation @@ -16,7 +16,7 @@ AC_DEFUN([gl_CHECK_DECLS], [ AC_REQUIRE([AC_HEADER_TIME]) - AC_CHECK_HEADERS_ONCE(grp.h pwd.h) + AC_CHECK_HEADERS_ONCE([grp.h pwd.h]) headers=' #include <sys/types.h> @@ -28,7 +28,7 @@ AC_DEFUN([cu_GMP], [test "$ac_cv_search___gmpz_init" = "none required" || { LIB_GMP=$ac_cv_search___gmpz_init - AC_DEFINE([HAVE_GMP], 1, + AC_DEFINE([HAVE_GMP], [1], [Define if you have GNU libgmp (or replacement)]) }]) LIBS=$cu_saved_libs diff --git a/m4/jm-macros.m4 b/m4/jm-macros.m4 index 38e19fcb5..335ec242a 100644 --- a/m4/jm-macros.m4 +++ b/m4/jm-macros.m4 @@ -1,4 +1,4 @@ -#serial 107 -*- autoconf -*- +#serial 108 -*- autoconf -*- dnl Misc type-related macros for coreutils. @@ -22,7 +22,7 @@ dnl Misc type-related macros for coreutils. AC_DEFUN([coreutils_MACROS], [ AM_MISSING_PROG(HELP2MAN, help2man) - AC_SUBST(MAN) + AC_SUBST([MAN]) dnl This macro actually runs replacement code. See isc-posix.m4. AC_REQUIRE([AC_ISC_POSIX])dnl @@ -44,7 +44,7 @@ AC_DEFUN([coreutils_MACROS], # used by ls AC_REQUIRE([gl_CLOCK_TIME]) # used by shred - AC_CHECK_FUNCS_ONCE(directio) + AC_CHECK_FUNCS_ONCE([directio]) # Used by install.c. AC_CHECK_FUNCS_ONCE([matchpathcon_init_prefix]) @@ -79,7 +79,7 @@ AC_DEFUN([coreutils_MACROS], [test "$ac_cv_search_fdatasync" = "none required" || LIB_FDATASYNC=$ac_cv_search_fdatasync]) AC_SUBST([LIB_FDATASYNC]) - AC_CHECK_FUNCS(fdatasync) + AC_CHECK_FUNCS([fdatasync]) LIBS=$coreutils_saved_libs # Check whether libcap is usable -- for ls --color support @@ -89,7 +89,7 @@ AC_DEFUN([coreutils_MACROS], [AC_CHECK_LIB([cap], [cap_get_file], [AC_CHECK_HEADER([sys/capability.h], [LIB_CAP=-lcap - AC_DEFINE([HAVE_CAP], 1, [libcap usability])], + AC_DEFINE([HAVE_CAP], [1], [libcap usability])], [AC_MSG_WARN([header sys/capability.h was not found, support for libcap will not be built])] )], [AC_MSG_WARN([libcap library was not found or not usable, support for libcap will not be built])]) @@ -101,16 +101,16 @@ AC_DEFUN([coreutils_MACROS], # BeOS which has all the math functions in the normal runtime library # and doesn't have a separate math library. - AC_SUBST(SEQ_LIBM) + AC_SUBST([SEQ_LIBM]) ac_seq_body=' static double x, y; x = floor (x); x = rint (x); x = modf (x, &y);' - AC_TRY_LINK([#include <math.h>], $ac_seq_body, , + AC_TRY_LINK([#include <math.h>], [$ac_seq_body], , [ac_seq_save_LIBS="$LIBS" LIBS="$LIBS -lm" - AC_TRY_LINK([#include <math.h>], $ac_seq_body, SEQ_LIBM=-lm) + AC_TRY_LINK([#include <math.h>], [$ac_seq_body], [SEQ_LIBM=-lm]) LIBS="$ac_seq_save_LIBS" ]) @@ -133,7 +133,7 @@ AC_DEFUN([gl_CHECK_ALL_HEADERS], syslog.h \ termios.h \ ) - AC_CHECK_HEADERS(sys/sysctl.h, [], [], + AC_CHECK_HEADERS([sys/sysctl.h], [], [], [AC_INCLUDES_DEFAULT [#if HAVE_SYS_PARAM_H #include <sys/param.h> @@ -174,12 +174,12 @@ AC_DEFUN([gl_CHECK_ALL_TYPES], AC_REQUIRE([AC_TYPE_PID_T]) AC_REQUIRE([AC_TYPE_SIZE_T]) AC_REQUIRE([AC_TYPE_UID_T]) - AC_CHECK_TYPE(ino_t, unsigned long int) + AC_CHECK_TYPE([ino_t], [unsigned long int]) dnl This relies on the fact that Autoconf's implementation of dnl AC_CHECK_TYPE checks includes unistd.h. - AC_CHECK_TYPE(major_t, unsigned int) - AC_CHECK_TYPE(minor_t, unsigned int) + AC_CHECK_TYPE([major_t], [unsigned int]) + AC_CHECK_TYPE([minor_t], [unsigned int]) AC_REQUIRE([AC_HEADER_MAJOR]) ]) diff --git a/m4/lib-check.m4 b/m4/lib-check.m4 index fe3607620..b2d8d96cc 100644 --- a/m4/lib-check.m4 +++ b/m4/lib-check.m4 @@ -1,9 +1,9 @@ -#serial 10 +#serial 11 dnl Misc lib-related macros for coreutils. -# Copyright (C) 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2003, 2004, -# 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 1993-1997, 2000-2001, 2003-2006, 2008 +# Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -24,20 +24,20 @@ AC_DEFUN([cu_LIB_CHECK], [ # Check for libypsec.a on Dolphin M88K machines. - AC_CHECK_LIB(ypsec, main) + AC_CHECK_LIB([ypsec], [main]) # m88k running dgux 5.4 needs this - AC_CHECK_LIB(ldgc, main) + AC_CHECK_LIB([ldgc], [main]) # The -lsun library is required for YP support on Irix-4.0.5 systems. # m88k/svr3 DolphinOS systems using YP need -lypsec for id. - AC_SEARCH_LIBS(yp_match, [sun ypsec]) + AC_SEARCH_LIBS([yp_match], [sun ypsec]) # SysV needs -lsec, older versions of Linux need -lshadow for # shadow passwords. UnixWare 7 needs -lgen. - AC_SEARCH_LIBS(getspnam, [shadow sec gen]) + AC_SEARCH_LIBS([getspnam], [shadow sec gen]) - AC_CHECK_HEADERS(shadow.h) + AC_CHECK_HEADERS([shadow.h]) # Requirements for su.c. shadow_includes="\ @@ -47,14 +47,14 @@ $ac_includes_default #endif " AC_CHECK_MEMBERS([struct spwd.sp_pwdp],,,[$shadow_includes]) - AC_CHECK_FUNCS(getspnam) + AC_CHECK_FUNCS([getspnam]) # SCO-ODT-3.0 is reported to need -lufc for crypt. # NetBSD needs -lcrypt for crypt. cu_saved_libs="$LIBS" - AC_SEARCH_LIBS(crypt, [ufc crypt], + AC_SEARCH_LIBS([crypt], [ufc crypt], [test "$ac_cv_search_crypt" = "none required" || LIB_CRYPT="$ac_cv_search_crypt"]) LIBS="$cu_saved_libs" - AC_SUBST(LIB_CRYPT) + AC_SUBST([LIB_CRYPT]) ]) diff --git a/m4/stat-prog.m4 b/m4/stat-prog.m4 index b4caaddf3..c2620b9fb 100644 --- a/m4/stat-prog.m4 +++ b/m4/stat-prog.m4 @@ -1,7 +1,7 @@ -# stat-prog.m4 serial 5 +# stat-prog.m4 serial 6 # Record the prerequisites of src/stat.c from the coreutils package. -# Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. +# Copyright (C) 2002-2004, 2006, 2008 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -68,7 +68,7 @@ AC_INCLUDES_DEFAULT [$statvfs_includes], [static statvfs s; return (s.s_fsid ^ 0) == 0;])], - [AC_DEFINE([STRUCT_STATVFS_F_FSID_IS_INTEGER], 1, + [AC_DEFINE([STRUCT_STATVFS_F_FSID_IS_INTEGER], [1], [Define to 1 if the f_fsid member of struct statvfs is an integer.])]) else AC_CHECK_MEMBERS([struct statfs.f_namelen, struct statfs.f_type],,, @@ -79,7 +79,7 @@ AC_INCLUDES_DEFAULT [$statfs_includes], [static statfs s; return (s.s_fsid ^ 0) == 0;])], - [AC_DEFINE([STRUCT_STATFS_F_FSID_IS_INTEGER], 1, + [AC_DEFINE([STRUCT_STATFS_F_FSID_IS_INTEGER], [1], [Define to 1 if the f_fsid member of struct statfs is an integer.])]) fi fi |