[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AC_C_CONST with C++
From: |
Lorenzo Bettini |
Subject: |
AC_C_CONST with C++ |
Date: |
Sun, 10 Dec 2006 22:07:08 +0100 |
User-agent: |
Thunderbird 1.5.0.8 (Windows/20061025) |
Hi
I'm using this macro AC_C_CONST in a configure script of a program that
uses both C and C++. Now, this macro, in case const is not handled by
C, produces in config.h
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
which gives problem when config.h is included in C++ programs since
const is a C++ keyword. Couldn't this be handled like AC_C_INLINE which
produces in config.h
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
#undef inline
#endif
i.e.
#ifndef __cplusplus
#undef const
#endif
thanks in advance
Lorenzo
--
+-----------------------------------------------------+
| Lorenzo Bettini ICQ# lbetto, 16080134 |
| PhD in Computer Science, DSI, Univ. di Firenze |
| Florence - Italy (GNU/Linux User # 158233) |
| http://www.lorenzobettini.it |
| http://tronprog.blogspot.com BLOG |
| http://www.purplesucker.com Deep Purple Cover Band |
| http://www.gnu.org/software/src-highlite |
| http://www.gnu.org/software/gengetopt |
| http://www.gnu.org/software/gengen |
| http://doublecpp.sourceforge.net |
+-----------------------------------------------------+
- AC_C_CONST with C++,
Lorenzo Bettini <=