mirror of
https://github.com/coreutils/coreutils.git
synced 2024-11-24 10:23:31 +08:00
maint: tighten m4 AC_ quoting check
* maint.mk (sc_m4_quote_check): Renamed from m4-check. Also search for AC_DEFINE and AC_DEFINE_UNQUOTED. Also search in configure.ac. * configure.ac: Quote first argument of AC_DEFINE. * jm-macros.m4 (coreutils_MACROS): Quote the first argument to AC_DEFINE.
This commit is contained in:
parent
fb992bae4c
commit
cbecb8cab8
16
configure.ac
16
configure.ac
@ -133,7 +133,7 @@ else
|
|||||||
fi])dnl
|
fi])dnl
|
||||||
AC_MSG_RESULT($utils_cv_localtime_cache)
|
AC_MSG_RESULT($utils_cv_localtime_cache)
|
||||||
if test $utils_cv_localtime_cache = yes; then
|
if test $utils_cv_localtime_cache = yes; then
|
||||||
AC_DEFINE(LOCALTIME_CACHE, 1, [FIXME])
|
AC_DEFINE([LOCALTIME_CACHE], 1, [FIXME])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# SCO-ODT-3.0 is reported to need -los to link programs using initgroups
|
# SCO-ODT-3.0 is reported to need -los to link programs using initgroups
|
||||||
@ -146,7 +146,7 @@ AC_CHECK_FUNCS(syslog)
|
|||||||
if test $ac_cv_func_syslog = no; then
|
if test $ac_cv_func_syslog = no; then
|
||||||
# syslog is not in the default libraries. See if it's in some other.
|
# syslog is not in the default libraries. See if it's in some other.
|
||||||
for lib in bsd socket inet; do
|
for lib in bsd socket inet; do
|
||||||
AC_CHECK_LIB($lib, syslog, [AC_DEFINE(HAVE_SYSLOG, 1, [FIXME])
|
AC_CHECK_LIB($lib, syslog, [AC_DEFINE([HAVE_SYSLOG], 1, [FIXME])
|
||||||
LIBS="$LIBS -l$lib"; break])
|
LIBS="$LIBS -l$lib"; break])
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@ -189,7 +189,7 @@ AC_CACHE_VAL(su_cv_func_ut_host_in_utmp,
|
|||||||
AC_MSG_RESULT($su_cv_func_ut_host_in_utmp)
|
AC_MSG_RESULT($su_cv_func_ut_host_in_utmp)
|
||||||
if test $su_cv_func_ut_host_in_utmp = yes; then
|
if test $su_cv_func_ut_host_in_utmp = yes; then
|
||||||
have_ut_host=1
|
have_ut_host=1
|
||||||
AC_DEFINE(HAVE_UT_HOST, 1, [FIXME])
|
AC_DEFINE([HAVE_UT_HOST], 1, [FIXME])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -z "$have_ut_host"; then
|
if test -z "$have_ut_host"; then
|
||||||
@ -201,8 +201,8 @@ if test -z "$have_ut_host"; then
|
|||||||
[su_cv_func_ut_host_in_utmpx=no])])
|
[su_cv_func_ut_host_in_utmpx=no])])
|
||||||
AC_MSG_RESULT($su_cv_func_ut_host_in_utmpx)
|
AC_MSG_RESULT($su_cv_func_ut_host_in_utmpx)
|
||||||
if test $su_cv_func_ut_host_in_utmpx = yes; then
|
if test $su_cv_func_ut_host_in_utmpx = yes; then
|
||||||
AC_DEFINE(HAVE_UTMPX_H, 1, [FIXME])
|
AC_DEFINE([HAVE_UTMPX_H], 1, [FIXME])
|
||||||
AC_DEFINE(HAVE_UT_HOST, 1, [FIXME])
|
AC_DEFINE([HAVE_UT_HOST], 1, [FIXME])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -228,7 +228,7 @@ yes
|
|||||||
su_cv_sys_termios_needs_xopen_source=no))])
|
su_cv_sys_termios_needs_xopen_source=no))])
|
||||||
AC_MSG_RESULT($su_cv_sys_termios_needs_xopen_source)
|
AC_MSG_RESULT($su_cv_sys_termios_needs_xopen_source)
|
||||||
test $su_cv_sys_termios_needs_xopen_source = yes &&
|
test $su_cv_sys_termios_needs_xopen_source = yes &&
|
||||||
AC_DEFINE(TERMIOS_NEEDS_XOPEN_SOURCE, 1, [FIXME])
|
AC_DEFINE([TERMIOS_NEEDS_XOPEN_SOURCE], 1, [FIXME])
|
||||||
|
|
||||||
AC_MSG_CHECKING(c_line in struct termios)
|
AC_MSG_CHECKING(c_line in struct termios)
|
||||||
AC_CACHE_VAL(su_cv_sys_c_line_in_termios,
|
AC_CACHE_VAL(su_cv_sys_c_line_in_termios,
|
||||||
@ -241,7 +241,7 @@ yes
|
|||||||
[su_cv_sys_c_line_in_termios=no])])
|
[su_cv_sys_c_line_in_termios=no])])
|
||||||
AC_MSG_RESULT($su_cv_sys_c_line_in_termios)
|
AC_MSG_RESULT($su_cv_sys_c_line_in_termios)
|
||||||
test $su_cv_sys_c_line_in_termios = yes \
|
test $su_cv_sys_c_line_in_termios = yes \
|
||||||
&& AC_DEFINE(HAVE_C_LINE, 1, [FIXME])
|
&& AC_DEFINE([HAVE_C_LINE], 1, [FIXME])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# FIXME: note that this macro appears above, too.
|
# FIXME: note that this macro appears above, too.
|
||||||
@ -267,7 +267,7 @@ if test $gl_cv_sys_tiocgwinsz_needs_termios_h = no && \
|
|||||||
AC_MSG_RESULT($su_cv_sys_tiocgwinsz_in_sys_pty_h)
|
AC_MSG_RESULT($su_cv_sys_tiocgwinsz_in_sys_pty_h)
|
||||||
|
|
||||||
test $su_cv_sys_tiocgwinsz_in_sys_pty_h = yes \
|
test $su_cv_sys_tiocgwinsz_in_sys_pty_h = yes \
|
||||||
&& AC_DEFINE(GWINSZ_IN_SYS_PTY, 1,
|
&& AC_DEFINE([GWINSZ_IN_SYS_PTY], 1,
|
||||||
[Define if your system defines TIOCGWINSZ in sys/pty.h.])
|
[Define if your system defines TIOCGWINSZ in sys/pty.h.])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -36,9 +36,9 @@ AC_DEFUN([coreutils_MACROS],
|
|||||||
AC_REQUIRE([AC_FUNC_FSEEKO])
|
AC_REQUIRE([AC_FUNC_FSEEKO])
|
||||||
|
|
||||||
# By default, argmatch should fail calling usage (1).
|
# By default, argmatch should fail calling usage (1).
|
||||||
AC_DEFINE(ARGMATCH_DIE, [usage (1)],
|
AC_DEFINE([ARGMATCH_DIE], [usage (1)],
|
||||||
[Define to the function xargmatch calls on failures.])
|
[Define to the function xargmatch calls on failures.])
|
||||||
AC_DEFINE(ARGMATCH_DIE_DECL, [void usage (int _e)],
|
AC_DEFINE([ARGMATCH_DIE_DECL], [void usage (int _e)],
|
||||||
[Define to the declaration of the xargmatch failure function.])
|
[Define to the declaration of the xargmatch failure function.])
|
||||||
|
|
||||||
# used by ls
|
# used by ls
|
||||||
|
9
maint.mk
9
maint.mk
@ -74,7 +74,7 @@ syntax-check-rules := $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' \
|
|||||||
.PHONY: $(syntax-check-rules)
|
.PHONY: $(syntax-check-rules)
|
||||||
|
|
||||||
local-checks-available = \
|
local-checks-available = \
|
||||||
po-check copyright-check m4-check author_mark_check \
|
po-check copyright-check author_mark_check \
|
||||||
patch-check $(syntax-check-rules) \
|
patch-check $(syntax-check-rules) \
|
||||||
makefile_path_separator_check \
|
makefile_path_separator_check \
|
||||||
makefile-check check-AUTHORS
|
makefile-check check-AUTHORS
|
||||||
@ -473,9 +473,10 @@ changelog-check:
|
|||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
m4-check:
|
sc_m4_quote_check:
|
||||||
@grep -n 'AC_DEFUN([^[]' m4/*.m4 \
|
@grep -nE '(AC_DEFINE(_UNQUOTED)?|AC_DEFUN)\([^[]' \
|
||||||
&& { echo '$(ME): quote the first arg to AC_DEFUN' 1>&2; \
|
$$($(VC_LIST_EXCEPT) | grep -E '(^configure\.ac|\.m4)$$') \
|
||||||
|
&& { echo '$(ME): quote the first arg to AC_DEF*' 1>&2; \
|
||||||
exit 1; } || :
|
exit 1; } || :
|
||||||
|
|
||||||
fix_po_file_diag = \
|
fix_po_file_diag = \
|
||||||
|
Loading…
Reference in New Issue
Block a user