]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autoconf/types.m4 (AC_CHECK_ALIGNOF): Work around
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 4 Mar 2006 17:28:34 +0000 (17:28 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 4 Mar 2006 17:28:34 +0000 (17:28 +0000)
HPUX compiler bug, similarly to AC_CHECK_SIZEOF, as documented
in section `Specific Compiler Characteristics'.

ChangeLog
lib/autoconf/types.m4

index 080c167eaee881b9350f26cf4bb58196bee90e3e..ec9e594ec37a56c73b21daa2844e6e3e00be4143 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-03-04  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * lib/autoconf/types.m4 (AC_CHECK_ALIGNOF): Work around
+       HPUX compiler bug, similarly to AC_CHECK_SIZEOF, as documented
+       in section `Specific Compiler Characteristics'.
+
 2006-03-04  Eric Blake  <ebb9@byu.net>
 
        * lib/autoconf/functions.m4 (AC_FUNC_STRERROR_R): Avoid unused
index c7f5093e550f2505965aa7ec890cfb69bfdc3afa..c950c58ab48668cae33c311981fe7ff5e5690b2e 100644 (file)
@@ -406,7 +406,9 @@ AC_DEFUN([AC_CHECK_ALIGNOF],
 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