]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autoconf/c.m4 (AC_C_INLINE): Test with a typedef return value,
authorKevin Ryde <user42@zip.com.au>
Wed, 27 Mar 2002 22:43:45 +0000 (22:43 +0000)
committerKevin Ryde <user42@zip.com.au>
Wed, 27 Mar 2002 22:43:45 +0000 (22:43 +0000)
to avoid versions of HP C which don't allow that.

ChangeLog
lib/autoconf/c.m4

index daaf8298513436965b5413b6313fca0661d36534..a09c8ea6469750bfaa056f9f3b097eaf88f91121 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-03-28  Kevin Ryde  <user42@zip.com.au>
+
+       * lib/autoconf/c.m4 (AC_C_INLINE): Test with a typedef return value,
+       to avoid versions of HP C which don't allow that.
+
 2002-03-27  Paul Eggert  <eggert@twinsun.com>
 
        * lib/m4sugar/m4sh.m4 (_AS_BASENAME_PREPARE): New macro.
index 94400f8c372d105cb4920d62f2a672f1b4d1ad1f..d674d2a86e01fdb65522fc07ddf0f873eb238c58 100644 (file)
@@ -922,6 +922,10 @@ esac
 # Do nothing if the compiler accepts the inline keyword.
 # Otherwise define inline to __inline__ or __inline if one of those work,
 # otherwise define inline to be empty.
+#
+# HP C version B.11.11.04 doesn't allow a typedef as the return value for an
+# inline function, only builtin types.
+#
 AC_DEFUN([AC_C_INLINE],
 [AC_REQUIRE([AC_PROG_CC_STDC])dnl
 AC_CACHE_CHECK([for inline], ac_cv_c_inline,
@@ -929,8 +933,9 @@ AC_CACHE_CHECK([for inline], ac_cv_c_inline,
 for ac_kw in inline __inline__ __inline; do
   AC_COMPILE_IFELSE([AC_LANG_SOURCE(
 [#ifndef __cplusplus
-static $ac_kw int static_foo () {return 0; }
-$ac_kw int foo () {return 0; }
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
 #endif
 ])],
                     [ac_cv_c_inline=$ac_kw; break])