[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fix AC_CHECK_ALIGNOF for HPUX
From: |
Ralf Wildenhues |
Subject: |
Fix AC_CHECK_ALIGNOF for HPUX |
Date: |
Thu, 2 Mar 2006 19:57:27 +0100 |
User-agent: |
Mutt/1.5.9i |
OK to apply? This fixes the corresponding test failures on HPUX 10.20
and 11.00.
Cheers,
Ralf
* lib/autoconf/types.m4 (AC_CHECK_ALIGNOF): Work around
HPUX compiler bug, similarly to AC_CHECK_SIZEOF, as documented
in section `Specific Compiler Characteristics'.
Index: lib/autoconf/types.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/types.m4,v
retrieving revision 1.31
diff -u -r1.31 types.m4
--- lib/autoconf/types.m4 14 May 2005 07:00:40 -0000 1.31
+++ lib/autoconf/types.m4 2 Mar 2006 19:57:11 -0000
@@ -406,7 +406,9 @@
AC_CHECK_TYPE([$1], [], [], [$2])
AC_CACHE_CHECK([alignment of $1], AS_TR_SH([ac_cv_alignof_$1]),
[if test "$AS_TR_SH([ac_cv_type_$1])" = yes; then
- _AC_COMPUTE_INT([offsetof (struct { char x; $1 y; }, y)],
+ # The cast to long int works around a bug in the HP C Compiler,
+ # see AC_CHECK_SIZEOF for more information.
+ _AC_COMPUTE_INT([(long int) offsetof (struct { char x; $1 y; }, y)],
[AS_TR_SH([ac_cv_alignof_$1])],
[AC_INCLUDES_DEFAULT([$2])
#ifndef offsetof
- Fix AC_CHECK_ALIGNOF for HPUX,
Ralf Wildenhues <=