@@ -20,7 +20,9 @@ AC_DEFUN([_PA_FUNC_ATTRIBUTE],
2020 AC_MSG_CHECKING ( [ if $CC supports the $1 ] _pa_faa [ function attribute] )
2121 AC_COMPILE_IFELSE ( [ AC_LANG_SOURCE ( [
2222AC_INCLUDES_DEFAULT
23- extern ifelse ( [ $3 ] ,[ ] ,[ void *] ,[ $3 ] ) __attribute__(([ $1 ] _pa_faa))
23+ PA_ATTRIBUTE_SYNTAX
24+
25+ extern ifelse ( [ $3 ] ,[ ] ,[ void *] ,[ $3 ] ) ATTRIBUTE([ $1 ] _pa_faa)
2426 bar(ifelse ( [ $4 ] ,[ ] ,[ int] ,[ $4 ] ) );
2527ifelse ( [ $3 ] ,[ ] ,[ void *] ,[ $3 ] ) foo(void);
2628ifelse ( [ $3 ] ,[ ] ,[ void *] ,[ $3 ] ) foo(void)
@@ -31,12 +33,12 @@ ifelse([$3],[],[void *],[$3]) foo(void)
3133 ] ) ] ,
3234 [ AC_MSG_RESULT ( [ yes] )
3335 AC_DEFINE ( PA_SYM ( [ HAVE_FUNC_ATTRIBUTE] ,_pa_suf ,[ _$1 ] ) , 1 ,
34- [ Define to 1 if your compiler supports __attribute__(( $1 )) on functions ] ) ] ,
36+ [ Define to 1 if your compiler supports the $1 function attribute ] ) ] ,
3537 [ AC_MSG_RESULT ( [ no] ) ] )
3638 AH_BOTTOM ( m4_quote ( m4_join ( [ ] ,
3739 [ #ifndef ] ,_pa_mac ,[
3840# ifdef ] ,PA_SYM ( [ HAVE_FUNC_ATTRIBUTE] ,_pa_suf ,[ _$1 ] ) ,[
39- # define ] ,_pa_mac ,m4_quote ( _pa_fam ) ,[ __attribute__(( $1 ] ,m4_quote ( _pa_fam ) ,[ ) )
41+ # define ] ,_pa_mac ,m4_quote ( _pa_fam ) ,[ ATTRIBUTE( $1 ] ,m4_quote ( _pa_fam ) ,[ )
4042# else
4143# define ] ,_pa_mac ,m4_quote ( _pa_fam ) ,[
4244# endif
@@ -51,7 +53,9 @@ AC_DEFUN([_PA_FUNC_PTR_ATTRIBUTE],
5153 AC_MSG_CHECKING ( [ if $CC supports the $1 ] _pa_faa [ function attribute on pointers] )
5254 AC_COMPILE_IFELSE ( [ AC_LANG_SOURCE ( [
5355AC_INCLUDES_DEFAULT
54- extern ifelse ( [ $3 ] ,[ ] ,[ void *] ,[ $3 ] ) __attribute__(([ $1 ] _pa_faa))
56+ PA_ATTRIBUTE_SYNTAX
57+
58+ extern ifelse ( [ $3 ] ,[ ] ,[ void *] ,[ $3 ] ) ATTRIBUTE([ $1 ] _pa_faa)
5559 (*bar1)(ifelse ( [ $4 ] ,[ ] ,[ int] ,[ $4 ] ) );
5660ifelse ( [ $3 ] ,[ ] ,[ void *] ,[ $3 ] ) foo1(void);
5761ifelse ( [ $3 ] ,[ ] ,[ void *] ,[ $3 ] ) foo1(void)
@@ -60,7 +64,7 @@ ifelse([$3],[],[void *],[$3]) foo1(void)
6064 bar1(ifelse ( [ $5 ] ,[ ] ,[ 1] ,[ $5 ] ) );
6165}
6266
63- typedef ifelse ( [ $3 ] ,[ ] ,[ void *] ,[ $3 ] ) __attribute__(( [ $1 ] _pa_faa) )
67+ typedef ifelse ( [ $3 ] ,[ ] ,[ void *] ,[ $3 ] ) ATTRIBUTE( [ $1 ] _pa_faa)
6468 (*bar_t)(ifelse ( [ $4 ] ,[ ] ,[ int] ,[ $4 ] ) );
6569extern bar_t bar2;
6670ifelse ( [ $3 ] ,[ ] ,[ void *] ,[ $3 ] ) foo2(void);
@@ -72,12 +76,12 @@ ifelse([$3],[],[void *],[$3]) foo2(void)
7276 ] ) ] ,
7377 [ AC_MSG_RESULT ( [ yes] )
7478 AC_DEFINE ( PA_SYM ( [ HAVE_FUNC_PTR_ATTRIBUTE] ,_pa_suf ,[ _$1 ] ) , 1 ,
75- [ Define to 1 if your compiler supports __attribute__(( $1 )) on function pointers] ) ] ,
79+ [ Define to 1 if your compiler supports the $1 attribute on function pointers] ) ] ,
7680 [ AC_MSG_RESULT ( [ no] ) ] )
7781 AH_BOTTOM ( m4_quote ( m4_join ( [ ] ,
7882 [ #ifndef ] ,_pa_mac ,[
7983# ifdef ] ,PA_SYM ( [ HAVE_FUNC_PTR_ATTRIBUTE] ,_pa_suf ,[ _$1 ] ) ,[
80- # define ] ,_pa_mac ,m4_quote ( _pa_fam ) ,[ __attribute__(( $1 ] ,m4_quote ( _pa_fam ) ,[ ) )
84+ # define ] ,_pa_mac ,m4_quote ( _pa_fam ) ,[ ATTRIBUTE( $1 ] ,m4_quote ( _pa_fam ) ,[ )
8185# else
8286# define ] ,_pa_mac ,m4_quote ( _pa_fam ) ,[
8387# endif
0 commit comments