diff --git a/packages/gmp/namespaced/Api.Gmp.pas b/packages/gmp/namespaced/Api.Gmp.pas new file mode 100644 index 0000000000..b1e1fbdeda --- /dev/null +++ b/packages/gmp/namespaced/Api.Gmp.pas @@ -0,0 +1,3 @@ +unit Api.Gmp; +{$DEFINE FPC_DOTTEDUNITS} +{$i gmp.pas} diff --git a/packages/gmp/namespaced/Api.Libgmp.pp b/packages/gmp/namespaced/Api.Libgmp.pp new file mode 100644 index 0000000000..797e1ee1f7 --- /dev/null +++ b/packages/gmp/namespaced/Api.Libgmp.pp @@ -0,0 +1,3 @@ +unit Api.Libgmp; +{$DEFINE FPC_DOTTEDUNITS} +{$i libgmp.pp} diff --git a/packages/gmp/namespaces.lst b/packages/gmp/namespaces.lst new file mode 100644 index 0000000000..7528503670 --- /dev/null +++ b/packages/gmp/namespaces.lst @@ -0,0 +1,4 @@ +src/gmp.pas=namespaced/Api.Gmp.pas +{s*:src/}=namespaced/ +{i+:src/} +src/libgmp.pp=namespaced/Api.Libgmp.pp diff --git a/packages/gmp/src/gmp.pas b/packages/gmp/src/gmp.pas index 0a5ce234f3..d712f97409 100644 --- a/packages/gmp/src/gmp.pas +++ b/packages/gmp/src/gmp.pas @@ -13,7 +13,9 @@ } +{$IFNDEF FPC_DOTTEDUNITS} unit gmp; +{$ENDIF FPC_DOTTEDUNITS} {$mode objfpc}{$h+} {$packrecords c} @@ -51,8 +53,13 @@ unit gmp; interface +{$IFDEF FPC_DOTTEDUNITS} +uses + System.SysUtils; +{$ELSE FPC_DOTTEDUNITS} uses sysutils; +{$ENDIF FPC_DOTTEDUNITS} const BASE10 = 10; @@ -1582,8 +1589,13 @@ operator >= (op1: MPRational; op2: MPRational): boolean; inline; implementation +{$IFDEF FPC_DOTTEDUNITS} +uses + System.Math; +{$ELSE FPC_DOTTEDUNITS} uses math; +{$ENDIF FPC_DOTTEDUNITS} {$ifndef NO_GMP_GLOBVARS} var diff --git a/packages/gmp/src/libgmp.pp b/packages/gmp/src/libgmp.pp index 596e26b335..c3165aa230 100644 --- a/packages/gmp/src/libgmp.pp +++ b/packages/gmp/src/libgmp.pp @@ -14,11 +14,18 @@ **********************************************************************} {$mode objfpc} +{$IFNDEF FPC_DOTTEDUNITS} unit libgmp; +{$ENDIF FPC_DOTTEDUNITS} interface +{$IFDEF FPC_DOTTEDUNITS} +uses + System.CTypes; +{$ELSE FPC_DOTTEDUNITS} uses ctypes; +{$ENDIF FPC_DOTTEDUNITS} { Automatically converted by H2Pas 1.0.0 from libgmp.h @@ -597,8 +604,13 @@ function libgmpLoaded: boolean; implementation +{$IFDEF FPC_DOTTEDUNITS} +uses + System.SysUtils, System.DynLibs; +{$ELSE FPC_DOTTEDUNITS} uses SysUtils, dynlibs; +{$ENDIF FPC_DOTTEDUNITS} var hlib : tlibhandle;