autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AC_C_INLINE and AIX C++ compiler


From: Albert Chin
Subject: AC_C_INLINE and AIX C++ compiler
Date: Tue, 24 Jun 2003 11:00:31 -0500
User-agent: Mutt/1.4i

Say I have a package built using C, C++. If I use AC_C_INLINE and
autoconf happens to:
  #define inline __inline
then this is used for C++ tests as well. The AIX C++ 6.0 compiler
doesn't like this:
  #define inline __inline

  #include <iostream>

  int
  main ()
  {
    return 0;
  }

  $ xlC -c test.cc
  "/usr/vacpp/include/stdio.h", line 8.8: 1540-0040 (S) The text "int"
  is unexpected.  "__inline" may be undeclared or ambiguous.
  "/usr/vacpp/include/stdio.h", line 16.8: 1540-0040 (S) The text "void"
  is unexpected.  "__inline" may be undeclared or ambiguous.
  ...

Any way to change the #define to:
  #ifndef __cplusplus
  #define inline __inline
  #endif

-- 
albert chin (address@hidden)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]