X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=m4%2Fpsi_type.m4;h=b635e173c230e422819ca90f42137fac21c72fd4;hp=050f80542bf504338b750afbb28aff6990972b46;hb=69fb17bcfa5ed9c32754fa143b59f4a4a2dd4bd8;hpb=ef5079cd02c9d8666f6b9336853d2ab393e33467 diff --git a/m4/psi_type.m4 b/m4/psi_type.m4 index 050f805..b635e17 100644 --- a/m4/psi_type.m4 +++ b/m4/psi_type.m4 @@ -23,6 +23,9 @@ psi_type_pair() { struct*) echo "PSI_T_STRUCT, \"$2\"" ;; + union*) + echo "PSI_T_UNION, \"$2\"" + ;; void) echo "PSI_T_VOID, \"void\"" ;; @@ -86,7 +89,7 @@ AC_DEFUN(PSI_OPAQUE_TYPE, [ PSI_CHECK_SIZEOF($1) if PSI_SH_TEST_SIZEOF($1); then psi_type_class= - AC_CACHE_CHECK(type class of $1, AS_TR_SH([psi_cv_type_class_]$1), [ + AC_CACHE_CHECK(kind of $1, AS_TR_SH([psi_cv_type_class_]$1), [ AC_TRY_COMPILE(PSI_INCLUDES, [char test@<:@($1)1@:>@;], [ psi_type_class=scalar ], [ @@ -114,7 +117,7 @@ AC_DEFUN(PSI_OPAQUE_TYPE, [ psi_add_type "{PSI_T_POINTER, \"void\", \"$1\"}" ;; *) - AC_MSG_WARN(could not detect type class of $1) + AC_MSG_WARN(could not detect kind of $1) ;; esac fi @@ -162,6 +165,7 @@ dnl FIXME: There is also psi_type_pair()? AC_DEFUN(PSI_TYPE_PAIR, [m4_case(m4_bregexp([$1], [^\w+], [\&]), [void], [PSI_T_VOID, \"void\"], [struct], [PSI_T_STRUCT, \"m4_bregexp([$1], [^struct \(\w+\)], [\1])\"], + [union], [PSI_T_UNION, \"m4_bregexp([$1], [^union \(\w+\)], [\1])\"], [PSI_T_NAME, \"m4_bregexp([$1], [^\(\w+ \)*\w+], [\&])\"])]) dnl PSI_CHECK_STD_TYPES()