The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
Changes 016
MANIFEST 11
META.json 4141
META.yml 4141
Makefile.PL 223
README.md 116
c_api.h 22
c_api_client/perl_math_int128.c 22
c_api_client/perl_math_int128.h 22
c_api_client/sample.xs 22
dist.ini 01
inc/MyMakeMaker.pm 223
lib/Math/Int128/die_on_overflow.pm 11
lib/Math/Int128.pm 419
t/author-pod-spell.t 01
15 files changed (This is a version diff) 101191
@@ -1,5 +1,21 @@
 Revision history for Perl extension Math::Int128.
 
+0.18     2015-01-05
+      - No changes from last release.
+
+0.17_02  2014-12-30
+      - Reverted the probe change in the last version. This wasn't necessary
+        and it brought back the old failure of clang on FreeBSD i386 claiming
+        it supported int128 values when it really didn't.
+
+0.17_01  2014-12-29
+      - Trying out a slightly different probe for uint128 support. The
+        previous version could have (very rarely) returned false when it
+        should have returned true.
+      - Made this module compile with the system Perl on OSX by brutally
+        stripping the "-arch i386" flag when running the compiler. Your
+        results may vary (but it passes its tests).
+
 0.17     2014-12-23
       - No changes from the last release.
 
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.029.
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.030.
 Changes
 INSTALL
 Int128.xs
@@ -5,7 +5,7 @@
       "Dave Rolsky <autarch@urth.org>"
    ],
    "dynamic_config" : 0,
-   "generated_by" : "Dist::Zilla version 5.029, CPAN::Meta::Converter version 2.143240",
+   "generated_by" : "Dist::Zilla version 5.030, CPAN::Meta::Converter version 2.143240",
    "license" : [
       "perl_5"
    ],
@@ -62,15 +62,15 @@
    "provides" : {
       "Math::Int128" : {
          "file" : "lib/Math/Int128.pm",
-         "version" : "0.17"
+         "version" : "0.18"
       },
       "Math::Int128::die_on_overflow" : {
          "file" : "lib/Math/Int128/die_on_overflow.pm",
-         "version" : "0.17"
+         "version" : "0.18"
       },
       "Math::UInt128" : {
          "file" : "lib/Math/Int128.pm",
-         "version" : "0.17"
+         "version" : "0.18"
       }
    },
    "release_status" : "stable",
@@ -86,7 +86,7 @@
          "web" : "https://github.com/salva/p5-Math-Int128"
       }
    },
-   "version" : "0.17",
+   "version" : "0.18",
    "x_Dist_Zilla" : {
       "perl" : {
          "version" : "5.016003"
@@ -100,7 +100,7 @@
          {
             "class" : "Dist::Zilla::Plugin::AutoPrereqs",
             "name" : "@DROLSKY/AutoPrereqs",
-            "version" : "5.029"
+            "version" : "5.030"
          },
          {
             "class" : "Dist::Zilla::Plugin::CopyFilesFromBuild",
@@ -142,17 +142,17 @@
          {
             "class" : "Dist::Zilla::Plugin::GitHub::Meta",
             "name" : "@DROLSKY/GitHub::Meta",
-            "version" : "0.38"
+            "version" : "0.39"
          },
          {
             "class" : "Dist::Zilla::Plugin::GitHub::Update",
             "name" : "@DROLSKY/GitHub::Update",
-            "version" : "0.38"
+            "version" : "0.39"
          },
          {
             "class" : "Dist::Zilla::Plugin::MetaResources",
             "name" : "@DROLSKY/MetaResources",
-            "version" : "5.029"
+            "version" : "5.030"
          },
          {
             "class" : "Dist::Zilla::Plugin::MetaProvides::Package",
@@ -162,7 +162,7 @@
                      {
                         "class" : "Dist::Zilla::Plugin::FinderCode",
                         "name" : "@DROLSKY/MetaProvides::Package/AUTOVIV/:InstallModulesPM",
-                        "version" : "5.029"
+                        "version" : "5.030"
                      }
                   ]
                },
@@ -173,12 +173,12 @@
                }
             },
             "name" : "@DROLSKY/MetaProvides::Package",
-            "version" : "2.001002"
+            "version" : "2.002000"
          },
          {
             "class" : "Dist::Zilla::Plugin::NextRelease",
             "name" : "@DROLSKY/NextRelease",
-            "version" : "5.029"
+            "version" : "5.030"
          },
          {
             "class" : "Dist::Zilla::Plugin::Prereqs",
@@ -189,7 +189,7 @@
                }
             },
             "name" : "@DROLSKY/TestMoreDoneTesting",
-            "version" : "5.029"
+            "version" : "5.030"
          },
          {
             "class" : "Dist::Zilla::Plugin::PromptIfStale",
@@ -206,7 +206,7 @@
                }
             },
             "name" : "@DROLSKY/stale modules, release",
-            "version" : "0.032"
+            "version" : "0.033"
          },
          {
             "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod",
@@ -231,47 +231,47 @@
          {
             "class" : "Dist::Zilla::Plugin::ManifestSkip",
             "name" : "@DROLSKY/ManifestSkip",
-            "version" : "5.029"
+            "version" : "5.030"
          },
          {
             "class" : "Dist::Zilla::Plugin::MetaYAML",
             "name" : "@DROLSKY/MetaYAML",
-            "version" : "5.029"
+            "version" : "5.030"
          },
          {
             "class" : "Dist::Zilla::Plugin::ExtraTests",
             "name" : "@DROLSKY/ExtraTests",
-            "version" : "5.029"
+            "version" : "5.030"
          },
          {
             "class" : "Dist::Zilla::Plugin::ExecDir",
             "name" : "@DROLSKY/ExecDir",
-            "version" : "5.029"
+            "version" : "5.030"
          },
          {
             "class" : "Dist::Zilla::Plugin::ShareDir",
             "name" : "@DROLSKY/ShareDir",
-            "version" : "5.029"
+            "version" : "5.030"
          },
          {
             "class" : "Dist::Zilla::Plugin::Manifest",
             "name" : "@DROLSKY/Manifest",
-            "version" : "5.029"
+            "version" : "5.030"
          },
          {
             "class" : "Dist::Zilla::Plugin::TestRelease",
             "name" : "@DROLSKY/TestRelease",
-            "version" : "5.029"
+            "version" : "5.030"
          },
          {
             "class" : "Dist::Zilla::Plugin::ConfirmRelease",
             "name" : "@DROLSKY/ConfirmRelease",
-            "version" : "5.029"
+            "version" : "5.030"
          },
          {
             "class" : "Dist::Zilla::Plugin::UploadToCPAN",
             "name" : "@DROLSKY/UploadToCPAN",
-            "version" : "5.029"
+            "version" : "5.030"
          },
          {
             "class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed",
@@ -281,7 +281,7 @@
          {
             "class" : "Dist::Zilla::Plugin::CPANFile",
             "name" : "@DROLSKY/CPANFile",
-            "version" : "5.029"
+            "version" : "5.030"
          },
          {
             "class" : "Dist::Zilla::Plugin::DROLSKY::Contributors",
@@ -329,7 +329,7 @@
          {
             "class" : "Dist::Zilla::Plugin::Git::Describe",
             "name" : "@DROLSKY/Git::Describe",
-            "version" : "0.003"
+            "version" : "0.004"
          },
          {
             "class" : "Dist::Zilla::Plugin::InstallGuide",
@@ -344,17 +344,17 @@
          {
             "class" : "Dist::Zilla::Plugin::MetaConfig",
             "name" : "@DROLSKY/MetaConfig",
-            "version" : "5.029"
+            "version" : "5.030"
          },
          {
             "class" : "Dist::Zilla::Plugin::MetaJSON",
             "name" : "@DROLSKY/MetaJSON",
-            "version" : "5.029"
+            "version" : "5.030"
          },
          {
             "class" : "Dist::Zilla::Plugin::PodSyntaxTests",
             "name" : "@DROLSKY/PodSyntaxTests",
-            "version" : "5.029"
+            "version" : "5.030"
          },
          {
             "class" : "Dist::Zilla::Plugin::Test::CPAN::Changes",
@@ -480,7 +480,7 @@
                "Dist::Zilla::Plugin::Git::Tag" : {
                   "branch" : null,
                   "signed" : 0,
-                  "tag" : "v0.17",
+                  "tag" : "v0.18",
                   "tag_format" : "v%v",
                   "tag_message" : "v%v",
                   "time_zone" : "local"
@@ -522,7 +522,7 @@
                }
             },
             "name" : "DevelopRequires",
-            "version" : "5.029"
+            "version" : "5.030"
          },
          {
             "class" : "inc::MyMakeMaker",
@@ -537,7 +537,7 @@
          {
             "class" : "Dist::Zilla::Plugin::FileFinder::Filter",
             "name" : "VersionedModules",
-            "version" : "5.029"
+            "version" : "5.030"
          },
          {
             "class" : "Dist::Zilla::Plugin::RewriteVersion",
@@ -582,47 +582,47 @@
          {
             "class" : "Dist::Zilla::Plugin::FinderCode",
             "name" : ":InstallModules",
-            "version" : "5.029"
+            "version" : "5.030"
          },
          {
             "class" : "Dist::Zilla::Plugin::FinderCode",
             "name" : ":IncModules",
-            "version" : "5.029"
+            "version" : "5.030"
          },
          {
             "class" : "Dist::Zilla::Plugin::FinderCode",
             "name" : ":TestFiles",
-            "version" : "5.029"
+            "version" : "5.030"
          },
          {
             "class" : "Dist::Zilla::Plugin::FinderCode",
             "name" : ":ExecFiles",
-            "version" : "5.029"
+            "version" : "5.030"
          },
          {
             "class" : "Dist::Zilla::Plugin::FinderCode",
             "name" : ":ShareFiles",
-            "version" : "5.029"
+            "version" : "5.030"
          },
          {
             "class" : "Dist::Zilla::Plugin::FinderCode",
             "name" : ":MainModule",
-            "version" : "5.029"
+            "version" : "5.030"
          },
          {
             "class" : "Dist::Zilla::Plugin::FinderCode",
             "name" : ":AllFiles",
-            "version" : "5.029"
+            "version" : "5.030"
          },
          {
             "class" : "Dist::Zilla::Plugin::FinderCode",
             "name" : ":NoFiles",
-            "version" : "5.029"
+            "version" : "5.030"
          },
          {
             "class" : "Dist::Zilla::Plugin::FinderCode",
             "name" : "@DROLSKY/MetaProvides::Package/AUTOVIV/:InstallModulesPM",
-            "version" : "5.029"
+            "version" : "5.030"
          }
       ],
       "zilla" : {
@@ -630,7 +630,7 @@
          "config" : {
             "is_trial" : "0"
          },
-         "version" : "5.029"
+         "version" : "5.030"
       }
    },
    "x_authority" : "cpan:DROLSKY",
@@ -15,7 +15,7 @@ build_requires:
 configure_requires:
   ExtUtils::MakeMaker: '0'
 dynamic_config: 0
-generated_by: 'Dist::Zilla version 5.029, CPAN::Meta::Converter version 2.143240'
+generated_by: 'Dist::Zilla version 5.030, CPAN::Meta::Converter version 2.143240'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -24,13 +24,13 @@ name: Math-Int128
 provides:
   Math::Int128:
     file: lib/Math/Int128.pm
-    version: '0.17'
+    version: '0.18'
   Math::Int128::die_on_overflow:
     file: lib/Math/Int128/die_on_overflow.pm
-    version: '0.17'
+    version: '0.18'
   Math::UInt128:
     file: lib/Math/Int128.pm
-    version: '0.17'
+    version: '0.18'
 requires:
   Exporter: '0'
   Math::Int64: '0.34'
@@ -43,7 +43,7 @@ resources:
   bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=Math-Int128
   homepage: http://metacpan.org/release/Math-Int128
   repository: git://github.com/salva/p5-Math-Int128.git
-version: '0.17'
+version: '0.18'
 x_Dist_Zilla:
   perl:
     version: '5.016003'
@@ -55,7 +55,7 @@ x_Dist_Zilla:
     -
       class: Dist::Zilla::Plugin::AutoPrereqs
       name: '@DROLSKY/AutoPrereqs'
-      version: '5.029'
+      version: '5.030'
     -
       class: Dist::Zilla::Plugin::CopyFilesFromBuild
       name: '@DROLSKY/CopyFilesFromBuild'
@@ -88,15 +88,15 @@ x_Dist_Zilla:
     -
       class: Dist::Zilla::Plugin::GitHub::Meta
       name: '@DROLSKY/GitHub::Meta'
-      version: '0.38'
+      version: '0.39'
     -
       class: Dist::Zilla::Plugin::GitHub::Update
       name: '@DROLSKY/GitHub::Update'
-      version: '0.38'
+      version: '0.39'
     -
       class: Dist::Zilla::Plugin::MetaResources
       name: '@DROLSKY/MetaResources'
-      version: '5.029'
+      version: '5.030'
     -
       class: Dist::Zilla::Plugin::MetaProvides::Package
       config:
@@ -105,17 +105,17 @@ x_Dist_Zilla:
             -
               class: Dist::Zilla::Plugin::FinderCode
               name: '@DROLSKY/MetaProvides::Package/AUTOVIV/:InstallModulesPM'
-              version: '5.029'
+              version: '5.030'
         Dist::Zilla::Role::MetaProvider::Provider:
           inherit_missing: '1'
           inherit_version: '1'
           meta_noindex: '1'
       name: '@DROLSKY/MetaProvides::Package'
-      version: '2.001002'
+      version: '2.002000'
     -
       class: Dist::Zilla::Plugin::NextRelease
       name: '@DROLSKY/NextRelease'
-      version: '5.029'
+      version: '5.030'
     -
       class: Dist::Zilla::Plugin::Prereqs
       config:
@@ -123,7 +123,7 @@ x_Dist_Zilla:
           phase: test
           type: requires
       name: '@DROLSKY/TestMoreDoneTesting'
-      version: '5.029'
+      version: '5.030'
     -
       class: Dist::Zilla::Plugin::PromptIfStale
       config:
@@ -136,7 +136,7 @@ x_Dist_Zilla:
             - Dist::Zilla::Plugin::DROLSKY::Contributors
             - Dist::Zilla::Plugin::DROLSKY::License
       name: '@DROLSKY/stale modules, release'
-      version: '0.032'
+      version: '0.033'
     -
       class: Dist::Zilla::Plugin::ReadmeAnyFromPod
       name: '@DROLSKY/ReadmeMarkdownInBuild'
@@ -156,39 +156,39 @@ x_Dist_Zilla:
     -
       class: Dist::Zilla::Plugin::ManifestSkip
       name: '@DROLSKY/ManifestSkip'
-      version: '5.029'
+      version: '5.030'
     -
       class: Dist::Zilla::Plugin::MetaYAML
       name: '@DROLSKY/MetaYAML'
-      version: '5.029'
+      version: '5.030'
     -
       class: Dist::Zilla::Plugin::ExtraTests
       name: '@DROLSKY/ExtraTests'
-      version: '5.029'
+      version: '5.030'
     -
       class: Dist::Zilla::Plugin::ExecDir
       name: '@DROLSKY/ExecDir'
-      version: '5.029'
+      version: '5.030'
     -
       class: Dist::Zilla::Plugin::ShareDir
       name: '@DROLSKY/ShareDir'
-      version: '5.029'
+      version: '5.030'
     -
       class: Dist::Zilla::Plugin::Manifest
       name: '@DROLSKY/Manifest'
-      version: '5.029'
+      version: '5.030'
     -
       class: Dist::Zilla::Plugin::TestRelease
       name: '@DROLSKY/TestRelease'
-      version: '5.029'
+      version: '5.030'
     -
       class: Dist::Zilla::Plugin::ConfirmRelease
       name: '@DROLSKY/ConfirmRelease'
-      version: '5.029'
+      version: '5.030'
     -
       class: Dist::Zilla::Plugin::UploadToCPAN
       name: '@DROLSKY/UploadToCPAN'
-      version: '5.029'
+      version: '5.030'
     -
       class: Dist::Zilla::Plugin::CheckPrereqsIndexed
       name: '@DROLSKY/CheckPrereqsIndexed'
@@ -196,7 +196,7 @@ x_Dist_Zilla:
     -
       class: Dist::Zilla::Plugin::CPANFile
       name: '@DROLSKY/CPANFile'
-      version: '5.029'
+      version: '5.030'
     -
       class: Dist::Zilla::Plugin::DROLSKY::Contributors
       name: '@DROLSKY/DROLSKY::Contributors'
@@ -232,7 +232,7 @@ x_Dist_Zilla:
     -
       class: Dist::Zilla::Plugin::Git::Describe
       name: '@DROLSKY/Git::Describe'
-      version: '0.003'
+      version: '0.004'
     -
       class: Dist::Zilla::Plugin::InstallGuide
       name: '@DROLSKY/InstallGuide'
@@ -244,15 +244,15 @@ x_Dist_Zilla:
     -
       class: Dist::Zilla::Plugin::MetaConfig
       name: '@DROLSKY/MetaConfig'
-      version: '5.029'
+      version: '5.030'
     -
       class: Dist::Zilla::Plugin::MetaJSON
       name: '@DROLSKY/MetaJSON'
-      version: '5.029'
+      version: '5.030'
     -
       class: Dist::Zilla::Plugin::PodSyntaxTests
       name: '@DROLSKY/PodSyntaxTests'
-      version: '5.029'
+      version: '5.030'
     -
       class: Dist::Zilla::Plugin::Test::CPAN::Changes
       name: '@DROLSKY/Test::CPAN::Changes'
@@ -350,7 +350,7 @@ x_Dist_Zilla:
         Dist::Zilla::Plugin::Git::Tag:
           branch: ~
           signed: 0
-          tag: v0.17
+          tag: v0.18
           tag_format: v%v
           tag_message: v%v
           time_zone: local
@@ -380,7 +380,7 @@ x_Dist_Zilla:
           phase: develop
           type: requires
       name: DevelopRequires
-      version: '5.029'
+      version: '5.030'
     -
       class: inc::MyMakeMaker
       config:
@@ -391,7 +391,7 @@ x_Dist_Zilla:
     -
       class: Dist::Zilla::Plugin::FileFinder::Filter
       name: VersionedModules
-      version: '5.029'
+      version: '5.030'
     -
       class: Dist::Zilla::Plugin::RewriteVersion
       name: RewriteVersion
@@ -425,44 +425,44 @@ x_Dist_Zilla:
     -
       class: Dist::Zilla::Plugin::FinderCode
       name: ':InstallModules'
-      version: '5.029'
+      version: '5.030'
     -
       class: Dist::Zilla::Plugin::FinderCode
       name: ':IncModules'
-      version: '5.029'
+      version: '5.030'
     -
       class: Dist::Zilla::Plugin::FinderCode
       name: ':TestFiles'
-      version: '5.029'
+      version: '5.030'
     -
       class: Dist::Zilla::Plugin::FinderCode
       name: ':ExecFiles'
-      version: '5.029'
+      version: '5.030'
     -
       class: Dist::Zilla::Plugin::FinderCode
       name: ':ShareFiles'
-      version: '5.029'
+      version: '5.030'
     -
       class: Dist::Zilla::Plugin::FinderCode
       name: ':MainModule'
-      version: '5.029'
+      version: '5.030'
     -
       class: Dist::Zilla::Plugin::FinderCode
       name: ':AllFiles'
-      version: '5.029'
+      version: '5.030'
     -
       class: Dist::Zilla::Plugin::FinderCode
       name: ':NoFiles'
-      version: '5.029'
+      version: '5.030'
     -
       class: Dist::Zilla::Plugin::FinderCode
       name: '@DROLSKY/MetaProvides::Package/AUTOVIV/:InstallModulesPM'
-      version: '5.029'
+      version: '5.030'
   zilla:
     class: Dist::Zilla::Dist::Builder
     config:
       is_trial: '0'
-    version: '5.029'
+    version: '5.030'
 x_authority: cpan:DROLSKY
 x_contributors:
   - 'Salvador Fandino <sfandino@yahoo.com>'
@@ -44,7 +44,8 @@ my %WriteMakefileArgs = (
     "TESTS" => "t/*.t"
   }
 );
-$WriteMakefileArgs{DEFINE} = _int128_define();
+$WriteMakefileArgs{DEFINE}  = _int128_define();
+$WriteMakefileArgs{CCFLAGS} = _ccflags( $WriteMakefileArgs{CCFLAGS} );
 
 my %FallbackPrereqs = (
   "Exporter" => 0,
@@ -76,6 +77,8 @@ _check_for_capi_maker();
 
 WriteMakefile(%WriteMakefileArgs);
 
+use Config qw( %Config );
+
 use lib 'inc';
 use Config::AutoConf;
 
@@ -85,7 +88,7 @@ sub _check_for_capi_maker {
     unless ( eval { require Module::CAPIMaker; 1; } ) {
         warn <<'EOF';
 
-  It looks like you're trying to build Math::Int64 from the git repo. You'll
+  It looks like you're trying to build Math::Int128 from the git repo. You'll
   need to install Module::CAPIMaker from CPAN in order to do this.
 
 EOF
@@ -150,6 +153,24 @@ EOF
     return $autoconf->check_cached( $cache_name, "for $type", $check_sub );
 }
 
+sub _ccflags {
+    my $flags = shift;
+
+    my $config_flags = $Config{ccflags};
+    if ($config_flags) {
+        $config_flags =~ s/ ?-arch i386//
+            if $config_flags =~ /-arch x86_64/
+            && $config_flags =~ /-arch i386/;
+    }
+
+    $flags = join q{ }, grep { defined && length } $flags, $config_flags;
+
+    return $flags unless -d '.git';
+
+    return join q{ }, ( $flags || q{} ),
+        qw( -Wall -Wdeclaration-after-statement );
+}
+
 package MY;
 
 sub postamble {
@@ -16,7 +16,22 @@ Math::Int128 - Manipulate 128 bits integers in Perl
 This module adds support for 128 bit integers, signed and unsigned, to
 Perl.
 
-In order to compile this module, GCC 4.4 or later is required.
+In order to compile this module, your compiler must support one of either the
+`__int128` or `int __attribute__ ((__mode__ (TI)))` types. Both GCC and
+Clang have supported one or the other type for some time, but they may only do
+so on 64-bit platforms.
+
+## OSX Caveat
+
+On OSX, the system Perl is compiled with both the "-arch x86\_64" and "-arch
+i386" flags. When building this module with a Perl like this, we strip the
+"-arch i386" flag out, meaning it is only compiled for the 64-bit
+architecture. Attempting to use this module while running in 32-bit mode may
+lead to brokenness. It's also possible that this will cause other problems
+that we cannot foresee.
+
+Note that if you have built your own non-multiarch Perl on OSX then this will
+not be an issue.
 
 # API
 
@@ -3,8 +3,8 @@
  * c_api.h - This file is in the public domain
  * Author: "Salvador Fandiño <sfandino@yahoo.com>, Dave Rolsky <autarch@urth.org>"
  *
- * Generated on: 2014-12-23 09:36:26
- * Math::Int128 version: 0.17
+ * Generated on: 2015-01-05 09:05:46
+ * Math::Int128 version: 0.18
  */
 
 #if !defined (C_API_H_INCLUDED)
@@ -2,8 +2,8 @@
  * perl_math_int128.c - This file is in the public domain
  * Author: "Salvador Fandiño <sfandino@yahoo.com>, Dave Rolsky <autarch@urth.org>"
  *
- * Generated on: 2014-12-23 09:36:26
- * Math::Int128 version: 0.17
+ * Generated on: 2015-01-05 09:05:46
+ * Math::Int128 version: 0.18
  */
 
 #include "EXTERN.h"
@@ -2,8 +2,8 @@
  * perl_math_int128.h - This file is in the public domain
  * Author: "Salvador Fandiño <sfandino@yahoo.com>, Dave Rolsky <autarch@urth.org>"
  *
- * Generated on: 2014-12-23 09:36:26
- * Math::Int128 version: 0.17
+ * Generated on: 2015-01-05 09:05:46
+ * Math::Int128 version: 0.18
  */
 
 #if !defined (PERL_MATH_INT128_H_INCLUDED)
@@ -2,8 +2,8 @@
  * sample.xs - This file is in the public domain
  * Author: "Salvador Fandiño <sfandino@yahoo.com>, Dave Rolsky <autarch@urth.org>"
  *
- * Generated on: 2014-12-23 09:36:26
- * Math::Int128 version: 0.17
+ * Generated on: 2015-01-05 09:05:46
+ * Math::Int128 version: 0.18
  */
 
 #include "EXTERN.h"
@@ -18,6 +18,7 @@ stopwords = SV
 stopwords = Storable
 stopwords = TODO
 stopwords = bugtracking
+stopwords = multiarch
 stopwords = postincrement
 stopwords = preprocessing
 stopwords = uint
@@ -26,7 +26,8 @@ override _build_WriteMakefile_dump => sub {
 
     my $dump = super();
     $dump .= <<'EOF';
-$WriteMakefileArgs{DEFINE} = _int128_define();
+$WriteMakefileArgs{DEFINE}  = _int128_define();
+$WriteMakefileArgs{CCFLAGS} = _ccflags( $WriteMakefileArgs{CCFLAGS} );
 EOF
 
     return $dump;
@@ -48,6 +49,8 @@ __PACKAGE__->meta()->make_immutable();
 
 __DATA__
 
+use Config qw( %Config );
+
 use lib 'inc';
 use Config::AutoConf;
 
@@ -57,7 +60,7 @@ sub _check_for_capi_maker {
     unless ( eval { require Module::CAPIMaker; 1; } ) {
         warn <<'EOF';
 
-  It looks like you're trying to build Math::Int64 from the git repo. You'll
+  It looks like you're trying to build Math::Int128 from the git repo. You'll
   need to install Module::CAPIMaker from CPAN in order to do this.
 
 EOF
@@ -122,6 +125,24 @@ EOF
     return $autoconf->check_cached( $cache_name, "for $type", $check_sub );
 }
 
+sub _ccflags {
+    my $flags = shift;
+
+    my $config_flags = $Config{ccflags};
+    if ($config_flags) {
+        $config_flags =~ s/ ?-arch i386//
+            if $config_flags =~ /-arch x86_64/
+            && $config_flags =~ /-arch i386/;
+    }
+
+    $flags = join q{ }, grep { defined && length } $flags, $config_flags;
+
+    return $flags unless -d '.git';
+
+    return join q{ }, ( $flags || q{} ),
+        qw( -Wall -Wdeclaration-after-statement );
+}
+
 package MY;
 
 sub postamble {
@@ -3,7 +3,7 @@ package Math::Int128::die_on_overflow;
 use strict;
 use warnings;
 
-our $VERSION = '0.17';
+our $VERSION = '0.18';
 
 sub import {
     require Math::Int128;
@@ -1,5 +1,5 @@
 package Math::Int128;
-# git description: v0.16_05-3-gf213d57
+# git description: v0.17_02-4-ga1445d0
 
 
 use strict;
@@ -8,7 +8,7 @@ use warnings;
 # The "our $VERSION" bit needs to be at the beginning of the line for the
 # benefit of the RewriteVersion plugin.
 BEGIN {
-our $VERSION = '0.17';
+our $VERSION = '0.18';
 require XSLoader;
 XSLoader::load('Math::Int128', $VERSION);
 }
@@ -116,7 +116,7 @@ use overload ( '+' => \&_add,
                fallback => 1 );
 
 package Math::UInt128;
-# git description: v0.16_05-3-gf213d57
+# git description: v0.17_02-4-ga1445d0
 
 use overload ( '+' => \&_add,
                '+=' => \&_add,
@@ -177,7 +177,22 @@ Math::Int128 - Manipulate 128 bits integers in Perl
 This module adds support for 128 bit integers, signed and unsigned, to
 Perl.
 
-In order to compile this module, GCC 4.4 or later is required.
+In order to compile this module, your compiler must support one of either the
+C<__int128> or C<int __attribute__ ((__mode__ (TI)))> types. Both GCC and
+Clang have supported one or the other type for some time, but they may only do
+so on 64-bit platforms.
+
+=head2 OSX Caveat
+
+On OSX, the system Perl is compiled with both the "-arch x86_64" and "-arch
+i386" flags. When building this module with a Perl like this, we strip the
+"-arch i386" flag out, meaning it is only compiled for the 64-bit
+architecture. Attempting to use this module while running in 32-bit mode may
+lead to brokenness. It's also possible that this will cause other problems
+that we cannot foresee.
+
+Note that if you have built your own non-multiarch Perl on OSX then this will
+not be an issue.
 
 =head1 API
 
@@ -31,6 +31,7 @@ SV
 Storable
 TODO
 bugtracking
+multiarch
 postincrement
 preprocessing
 uint