Re: libmcrypt patch
| From: | Derick Rethans | Date: | Fri, 15 Dec 2000 15:19:29 +0000 |
| Subject: | Re: libmcrypt patch | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-41481@lists.php.net to get a copy of this message | ||
Hello,
when I coded the extension to work with mcrypt 2.4.x I looked
for a method to identify the versions. I tested it with
2.2.7 and 2.4.4, it gave me no problems at all. I find it
very strange that the wrong function wrong version is detected now.
However, I don't like the idea that it is required that mcrypt
>= 2.4.7 must be used, because all versions below work just as fine.
The detection is the only problem atm.
I suggest the following:
check for "mcrypt_init_module", this only available on the 2.4.x
series, that's for sure. If configure doesn't find this functon,
we fall back to 2.2.x and test if "init_mcrypt" works. If this
doesn't work either, then the module isn't corretly used (wether
on the system, or the wrong line after --with-mcrypt=)
Derick
On Fri, 15 Dec 2000, Jani Taskinen wrote:
> On Thu, 14 Dec 2000, Anil Madhavapeddy wrote:
>
> >Quoting Anil Madhavapeddy <anil@recoil.org>:
> >
> >>
> >> Also, libmcrypt-2.4.7/lib/mcrypt_internal.h contains:
> >>
> >> int init_mcrypt(MCRYPT td, void*buf, void *a, int b, void *c);
> >>
> >> I'll download the 2.2.x branch and have a look at what it defines
> >> that's suitable to tell the two apart.
> >>
> >
> >It seems that MCRYPT_API_VERSION is the only really reliable
> >way to confirm if it really is 2.2 over 2.4
>
> I suggest that we just require >= 2.4.7.
> I just compiled it with latest CVS and it works fine.
> (Within RH 6.2, all from tar.gz's ;)
>
> >How about using AC_EGREP_HEADER to look for MCRYPT_API_VERSION
> >and seeing what it is set to? 2.4 will be > 20000101 and 2.2
>
> #define MCRYPT_API_VERSION 20000320
>
> This is from 2.4.7. I would make it so that if this is lower
> --> configure bails out and says " >= 2.4.7 required".
>
> --Jani
>