GMPbench 0.2 fix for Windows

Sam Rawlins sam.rawlins at gmail.com
Mon Feb 22 23:33:15 CET 2010


Hi All,

I know Windows isn't one of the super supported platforms of GMP. (I can get
it to work though.) But I have a small fix to the GMPbench 0.2 suite that
allows it to run on MinGW/MSYS (GNU on Windows).

Each of divide.c, gcd.c, gcdext.c, multiply.c, pi.c, and rsa.c end with a
definition of cputime() aided by one or more time libraries, depending on
the platform. Here is the platform check:

#if !defined (__sun) \
    && (defined (USG) || defined (__SVR4) || defined (_UNICOS) \
    || defined (__hpux))

Changing this to:

#if !defined (__sun) \
    && (defined (USG) || defined (__SVR4) || defined (_UNICOS) \
    || defined (__hpux) || defined (_WIN32))

in each file allows me to run the benchmark suite on Windows (compiling
everything under MinGW/MSYS).

-- 
Sam Rawlins


More information about the gmp-bugs mailing list