+2008-10-13 Eric Blake <ebb9@byu.net>
+
+ Use consistent shell function style.
+ * lib/m4sugar/m4sh.m4 (_AS_PREPARE, AS_REQUIRE_SHELL_FN)
+ (_AS_SHELL_FN_WORK): Imitate GNU Coding Standards for C
+ functions.
+
2008-10-13 Paolo Bonzini <bonzini@gnu.org>
* lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): Place names of
# there are so many _AS_PREPARE_* below, and that's also why it is
# important not to forget some: config.status needs them.
m4_defun([_AS_PREPARE],
-[as_func_mkdir_p() {
+[as_func_mkdir_p ()
+{
_AS_MKDIR_P
}
#
m4_define([AS_REQUIRE_SHELL_FN],
[_AS_DETECT_REQUIRED([_AS_SHELL_FN_WORK])dnl
-AS_REQUIRE([AS_SHELL_FN_$1], [m4_provide([AS_SHELL_FN_$1])$1() {
+AS_REQUIRE([AS_SHELL_FN_$1], [m4_provide([AS_SHELL_FN_$1])$1 ()
+{
$2
}], m4_default_quoted([$3], [M4SH-INIT-FN]))])
# This is a spy to detect "in the wild" shells that do not support shell
# functions correctly. It is based on the m4sh.at Autotest testcases.
m4_define([_AS_SHELL_FN_WORK],
-[as_func_return () {
+[as_func_return ()
+{
(exit [$]1)
}
-as_func_success () {
+as_func_success ()
+{
as_func_return 0
}
-as_func_failure () {
+as_func_failure ()
+{
as_func_return 1
}
-as_func_ret_success () {
+as_func_ret_success ()
+{
return 0
}
-as_func_ret_failure () {
+as_func_ret_failure ()
+{
return 1
}