Quote:
Originally Posted by mannam srinivas
in line number 25 i had the following code
==================================
#if defined (HAVE_GCC) && (HAVE_GCC_VERSION)(3,2)
|
Here is something from
/usr/include/ansidecl.h. Adapt it for your project.
Code:
/* Using MACRO(x,y) in cpp #if conditionals does not work with some
older preprocessors. Thus we can't define something like this:
#define HAVE_GCC_VERSION(MAJOR, MINOR) \
(__GNUC__ > (MAJOR) || (__GNUC__ == (MAJOR) && __GNUC_MINOR__ >= (MINOR)))
and then test "#if HAVE_GCC_VERSION(2,7)".
So instead we use the macro below and test it against specific values. */
/* This macro simplifies testing whether we are using gcc, and if it
is of a particular minimum version. (Both major & minor numbers are
significant.) This macro will evaluate to 0 if we are not using
gcc at all. */
#ifndef GCC_VERSION
#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
#endif /* GCC_VERSION */
Use GCC_VERSION as
Code:
#if (GCC_VERSION >= 3002)
your definitions here
#endif