In the 7.20 sqlhdr.h file, there are some macros defined for this purpose:
CLIENT_SQLI_VER is one which I have started using. It is more difficult
if you wish to distinguish between earlier versions -- much more difficult.
I use the -DESQLC_VERSION=710 notation on the command line in stuff such
as the ESQL/C headers for use with C++ which have been circulated to this
news group in the past.
Yours,
Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>
PS: CLIENT_SQLI_VER is a #define, not a $define.
}From: plkapp@aol.com (PLKapp)
}Date: 27 Jun 1996 07:23:19 -0400
}X-Informix-List-Id: <news.25482>
}
}Is there a C or ESQL preprocessor macro that can be used at compile time
}to determine which version is being used? I have some source code that
}needs to be compiled both with version 5 and version 7 ESQL. For example,
}I would like the error message routine to use rgetlmsg() if possible, but
}it is new for version 7 (or 6). I'd like to have both versions in an
}#ifdef (or $ifdef) block of code, but I haven't found a good candidate to
}test for.
}
}I know I could just pick my own macro(s) and -D them on the command line,
}and I know that esql -V will report the version, but I'm hoping to avoid
}any "clever tricks" if there is a straight-forward way.
}
}Paul Kapp ----> PLKapp@aol.com -OR- plk@interactive.visa.com