We need something that gmp and mpir have but is different , the only thing is the version number but it is coded as just a number 4.3.0 etc , if is was encoded as gmp-4.3.0 then we could use mpir-1.3.0 and all would be good. We can not change the gmp version number as many/most? programs test for this and fail if it is not high enough.
In Linux you could dynamically load a second copy of the library and test for the existence of mpir_version. I think? Jason On Tuesday 20 October 2009 04:17:56 Dan Grayson wrote: > 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 <[email protected]> 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 <[email protected]>: > > > 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/mpir-devel?hl=en -~----------~----~----~----~------~----~------~--~---
