That won't help a program that was linked with gmp discover whether
mpir is impersonating it at run-time, because gmp doesn't export
mpir_version, and thus the program can't examine it, even if it's
there at run-time.

On Oct 18, 7:53 pm, Bill Hart <goodwillh...@googlemail.com> wrote:
> The binary itself also exports mpir_version, which is a char * giving
> the version string, "1.3.0" in the case of the MPIR about to be
> released. I guess this is not so useful unless you already know you
> have MPIR and not GMP. But in the rare case where a user has screwed
> up by having a gmp.h from GMP and a binary from MPIR, it can be
> useful.
>
> Bill.
>
> 2009/10/18 Jason Moxham <ja...@njkfrudils.plus.com>:
>
>
>
> > On Sunday 18 October 2009 21:34:40 Dan Grayson wrote:
> >> Suppose I link a program dynamically with libgmp, and at run time
> >> libgmp is being impersonated by libmpir.  Is there a (reliable) way
> >> for the program to tell?
>
> >> I ask, because I like to arrange the copyright message of Macaulay2 to
> >> display the copyright of libraries in use, so it's nice to know which
> >> libraries are in use.
>
> >> I checked mpir.info without any luck.
>
> > These macros are defined only in mpir
>
> > #define __MPIR_VERSION 1
> > #define __MPIR_VERSION_MINOR 3
> > #define __MPIR_VERSION_PATCHLEVEL 0
>
> > Jason
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To post to this group, send email to mpir-devel@googlegroups.com
To unsubscribe from this group, send email to 
mpir-devel+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/mpir-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to