[nasm:nasm-2.15.xx] pa_func_attributes.m4: better messages

nasm-bot for H. Peter Anvin (Intel) hpa at zytor.com
Mon Jul 6 11:15:04 PDT 2020


Commit-ID:  e8599c655ef06a63ca0a610b11ba4d14fd5c5c49
Gitweb:     http://repo.or.cz/w/nasm.git?a=commitdiff;h=e8599c655ef06a63ca0a610b11ba4d14fd5c5c49
Author:     H. Peter Anvin (Intel) <hpa at zytor.com>
AuthorDate: Mon, 6 Jul 2020 11:09:03 -0700
Committer:  H. Peter Anvin (Intel) <hpa at zytor.com>
CommitDate: Mon, 6 Jul 2020 11:09:03 -0700

pa_func_attributes.m4: better messages

It is a bit confusing when the alloc_size attribute is tested for more
than once, to include the arguments in the output message.

Signed-off-by: H. Peter Anvin (Intel) <hpa at zytor.com>


---
 autoconf/m4/pa_func_attribute.m4 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/autoconf/m4/pa_func_attribute.m4 b/autoconf/m4/pa_func_attribute.m4
index 476d53bd..e059fc1f 100644
--- a/autoconf/m4/pa_func_attribute.m4
+++ b/autoconf/m4/pa_func_attribute.m4
@@ -13,11 +13,11 @@ dnl direct function, as some gcc [and others?] versions have problems
 dnl with attributes on function pointers, and we might as well check both.
 dnl --------------------------------------------------------------------------
 AC_DEFUN([_PA_FUNC_ATTRIBUTE],
-[AC_MSG_CHECKING([if $CC supports the $1 function attribute])
- m4_define([_pa_faa],ifelse([$2],[],[],[($2)]))
+[m4_define([_pa_faa],ifelse([$2],[],[],[($2)]))
  m4_define([_pa_fam],ifelse([$2],[],[],[(m4_join([,],m4_for(_pa_n,1,m4_count($2),1,[m4_quote([x]_pa_n),])))]))
  m4_define([_pa_suf],ifelse([$2],[],[],[m4_count($2)]))
  m4_define([_pa_mac],ifelse([$6],[],[$1_func]_pa_suf,[$6]))
+ AC_MSG_CHECKING([if $CC supports the $1]_pa_faa[ function attribute])
  AC_COMPILE_IFELSE([AC_LANG_SOURCE([
 AC_INCLUDES_DEFAULT
 extern ifelse([$3],[],[void *],[$3])  __attribute__(([$1]_pa_faa))
@@ -44,11 +44,11 @@ ifelse([$3],[],[void *],[$3]) foo(void)
 ])
 
 AC_DEFUN([_PA_FUNC_PTR_ATTRIBUTE],
-[AC_MSG_CHECKING([if $CC supports the $1 function attribute on pointers])
- m4_define([_pa_faa],ifelse([$2],[],[],[($2)]))
+[m4_define([_pa_faa],ifelse([$2],[],[],[($2)]))
  m4_define([_pa_fam],ifelse([$2],[],[],[(m4_join([,],m4_for(_pa_n,1,m4_count($2),1,[m4_quote([x]_pa_n),])))]))
  m4_define([_pa_suf],ifelse([$2],[],[],[m4_count($2)]))
  m4_define([_pa_mac],ifelse([$6],[],[$1_func]_pa_suf,[$6])_ptr)
+ AC_MSG_CHECKING([if $CC supports the $1]_pa_faa[ function attribute on pointers])
  AC_COMPILE_IFELSE([AC_LANG_SOURCE([
 AC_INCLUDES_DEFAULT
 extern ifelse([$3],[],[void *],[$3])  __attribute__(([$1]_pa_faa))


More information about the Nasm-commits mailing list