Re: determining if we're using db.h from libc6 or libdb2?
In article <email@example.com>,
Darren/Torin/Who Ever... <firstname.lastname@example.org> wrote:
>Ben Collins, in an immanent manifestation of deity, wrote:
>>On Tue, Sep 12, 2000 at 12:46:02AM -0700, Darren/Torin/Who Ever... wrote:
>>> Is there some set of defines such that I can determine with #ifdef that
>>> I've got a copy of glibc2 that has db.h as an include file? My plan is
>>> that if such a #ifdef is true, then I can #include <db2/db.h>.
>>Keep it at db.h, since in a few days, it wont matter. Db2 is getting removed
>>from glibc, and your only choice will be "db.h" or "db2/db.h" from libdb2
>>(both the same file, just "db.h" is the default place).
>Well, I was hoping to have a general solution because that version of
>glibc2 is still going to be used for a while.
#if (__GLIBC__ == 2) && (__GLIBC_MINOR__ < 2)
/* Glibc 2.0 and 2.1 */
# include <db2/db.h>
/* Must be Glibc 2.2 or later */
# include <db.h>
To UNSUBSCRIBE, email to email@example.com
with a subject of "unsubscribe". Trouble? Contact firstname.lastname@example.org