[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: thinko in ldbm.c?
On Tue, Nov 14, 2000 at 09:38:01PM -0800, Kurt D. Zeilenga wrote:
>
> #if DB_VERSION > 2
> >#if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
> > err = ldbm_Env->open( ldbm_Env, home, envFlags, 0 );
> >#else
> > err = ldbm_Env->open( ldbm_Env, home, NULL, envFlags, 0 );
> >#endif
> #endif
>
> >What exactly are the version constraints it is looking for?
>
> 3.1 or greater, as intended.
Then the proper way would be:
#if (DB_VERSION_MAJOR > 3) || ((DB_VERSION_MAJOR = 3) && (DB_VERSION_MINOR >= 1))
We could probably simply this with a similar macro that glibc uses to case
things against certain version of gcc (plus it makes the code more
readable, and avoids things like this).
--
-----------=======-=-======-=========-----------=====------------=-=------
/ Ben Collins -- ...on that fantastic voyage... -- Debian GNU/Linux \
` bcollins@debian.org -- bcollins@openldap.org -- bcollins@linux.com '
`---=========------=======-------------=-=-----=-===-======-------=--=---'