mirror of
git://git.sv.gnu.org/autoconf
synced 2024-11-27 01:49:56 +08:00
* lib/autoconf/c.m4 (AC_C_INLINE): Test with a typedef return value,
to avoid versions of HP C which don't allow that.
This commit is contained in:
parent
683f07cff1
commit
980c227c4b
@ -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.
|
||||
|
@ -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])
|
||||
|
Loading…
Reference in New Issue
Block a user