[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: defined(IRIX)
From: |
Akim Demaille |
Subject: |
Re: defined(IRIX) |
Date: |
27 Sep 2002 08:58:18 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter) |
| # PGAC_CHECK_ALIGNOF(TYPE, [INCLUDES = DEFAULT-INCLUDES])
| # -----------------------------------------------------
| # Find the alignment requirement of the given type. Define the result
| # as ALIGNOF_TYPE. This macro works even when cross compiling.
| # (Modelled after AC_CHECK_SIZEOF.)
|
| AC_DEFUN([PGAC_CHECK_ALIGNOF],
| [AS_LITERAL_IF([$1], [],
| [AC_FATAL([$0: requires literal arguments])])dnl
| AC_CHECK_TYPE([$1], [], [], [$2])
| AC_CACHE_CHECK([alignment of $1], [AS_TR_SH([pgac_cv_alignof_$1])],
| [if test "$AS_TR_SH([ac_cv_type_$1])" = yes; then
| _AC_COMPUTE_INT([((char*) & pgac_struct.field) - ((char*) & pgac_struct)],
| [AS_TR_SH([pgac_cv_alignof_$1])],
| [AC_INCLUDES_DEFAULT([$2])
| struct { char filler; $1 field; } pgac_struct;],
| [AC_MSG_ERROR([cannot compute alignment of $1, 77])])
| else
| AS_TR_SH([pgac_cv_alignof_$1])=0
| fi])dnl
| AC_DEFINE_UNQUOTED(AS_TR_CPP(alignof_$1),
| [$AS_TR_SH([pgac_cv_alignof_$1])],
| [The alignment requirement of a `$1'])
| ])# PGAC_CHECK_ALIGNOF
This guy seems swallowable... It's impressively already in 2.5x style :)
- defined(IRIX), Bill Moseley, 2002/09/26
- Re: defined(IRIX), Philip Willoughby, 2002/09/26
- Re: defined(IRIX), Bill Moseley, 2002/09/26
- Re: defined(IRIX), Paul Eggert, 2002/09/26
- Re: defined(IRIX), Peter Eisentraut, 2002/09/26
- Re: defined(IRIX),
Akim Demaille <=
- Re: defined(IRIX), Thomas Dickey, 2002/09/27
- Re: defined(IRIX), Philip Willoughby, 2002/09/27
- Re: defined(IRIX), Bill Moseley, 2002/09/27
- Re: defined(IRIX), Peter Eisentraut, 2002/09/28
- Re: defined(IRIX), Thomas Dickey, 2002/09/28
- Re: defined(IRIX), Peter Eisentraut, 2002/09/29