Re: [PHP-DEV] libmcrypt patch From: Derick Rethans (d.rethans <email protected>)
Date: 12/15/00

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 <email protected>>:
> >
> >>
> >> 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
>

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>