http://qs321.pair.com?node_id=887157


in reply to Re^6: Module for 128-bit integer math?
in thread Module for 128-bit integer math?

Probably the version of GCC you are using is not recent enough.

What do you get when you run...?

x86_64-w64-mingw32-gcc --version

Replies are listed 'Best First'.
Re^8: Module for 128-bit integer math?
by syphilis (Archbishop) on Feb 09, 2011 at 09:56 UTC
    I get:
    C:\>x86_64-w64-mingw32-gcc --version x86_64-w64-mingw32-gcc (GCC) 4.6.0 20100414 (experimental) Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There i +s NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR +POSE. C:\>
    Update: But, in addition to the version number, there's also the consideration of what features have been ported to MinGW.

    Cheers,
    Rob
      Your compiler is almost one year old. Support for unsigned __int128 types was probably not yet implemented.
        Support for unsigned __int128 types was probably not yet implemented

        A post to the mingw64 mailing list suggested that I create the __uint128 type myself (in the compiler's _mingw.h) with:
        typedef unsigned int __uint128 __attribute__ ((__mode__ (TI)));
        and that works fine.
        Then, in Int128.xs, it was just a matter of changing:
        typedef unsigned __int128 uint128_t; to typedef __uint128 uint128_t;
        BrowserUk (or anyone else, of course), if you want a ppm package of that module that will work with the 64-bit builds of ActivePerl (both perl-5.10 and perl-5.12):
        ppm install http://www.sisyphusion.tk/ppm/Math-Int128.ppd
        Cheers,
        Rob