On 4 May 2010 20:26, Antony Vennard <antony.venn...@gmail.com> wrote:
> Well... you know what I mean. Let me put it another way:
>
> the issue was corrected and current distributions and licenses are all
> correct.
>
> Or:
>
> I cannot see any evidence of mpir distributed tarballs licensed as
> lgplv2+ containing lgplv3+ code.

Yes. Thanks for confirming that for us.

>
> Antony
>
> On 05/04/2010 08:22 PM, Bill Hart wrote:
>> "Now rectified"? The tarballs have not changed since Oct/Nov last year!
>>
>> But yeah, otherwise it is a fair assessment.
>>
>> On 4 May 2010 20:12, Antony Vennard <antony.venn...@gmail.com> wrote:
>>> Ok thanks, sorry, I wasn't certain the issues were tarball-only so I
>>> looked in svn.
>>>
>>> I have looked at the tarballs also and can confirm the same findings as
>>> Bill. Certainly, it seems the code being distributed is being done so in
>>> the correct manner.
>>>
>>> This would seem to show that the issue is now rectified then. Is that a
>>> fair assessment?
>>>
>>> Antony
>>>
>>> On 05/04/2010 07:32 PM, Bill Hart wrote:
>>>> Thanks. The issues you raise:
>>>>
>>>> 1) The mpir-parallel svn branch contains LGPL v3+ code. However, this
>>>> was branched from MPIR 2.0.0, which is already LGPL v3+, so this is
>>>> absolutely fine.
>>>>
>>>> 2) Brian Gladman's version of mpf/set_str.c contains some code the
>>>> same as the version in GMP 5. This is because they are both derived
>>>> from the same LGPL v2.1+ code in GMP 4.2.1. Brian's version is
>>>> *entirely* LGPL v2.1+ and contains no v3+ code. So this is again fine.
>>>>
>>>> So svn is not an issue.
>>>>
>>>> The issue is supposedly tarballs distributed on the MPIR website.
>>>>
>>>> I find:
>>>>
>>>> MPIR 2.0.0 is LGPL v3+ (prominently noted)
>>>>
>>>> MPIR 1.3.x are LGPL v2+ (contains absolutely zero LGPL v3+ code)
>>>>
>>>> MPIR 1.2.x are LGPL v3+ (tarball contains lgpl-v3.txt and gpl-v3.txt
>>>> and mpf/set_str.c is licensed v3+ - prominent note about this on
>>>> website)
>>>> MPIR 1.1.x are LGPL v3+ (tarball contains lgpl-v3.txt and gpl-v3.txt
>>>> and mpf/set_str.c is licensed v3+ - prominent note about this on
>>>> website)
>>>> MPIR 1.0.x are LGPL v3+ (tarball contains lgpl-v3.txt and gpl-v3.txt
>>>> and mpf/set_str.c is licensed v3+ - prominent note about this on
>>>> website)
>>>> MPIR 0.9.x are LGPL v3+ (tarball contains lgpl-v3.txt and gpl-v3.txt
>>>> and mpf/set_str.c is licensed v3+ - prominent note about this on
>>>> website)
>>>>
>>>> I am certainly not aware of any renamed GMP's with license reverted to
>>>> v2.1+. The claims are patently false, as we've reiterated numerous
>>>> times.
>>>>
>>>> Bill.
>>>>
>>>> On 4 May 2010 19:13, Antony Vennard <antony.venn...@gmail.com> wrote:
>>>>> I apologise in advance for the length of this email.
>>>>>
>>>>> Ok, I've checked out the entire svn.
>>>>>
>>>>> grep -ir "lgplv3" * gives:
>>>>>
>>>>> branches/mpir-parallel/mpn/x86_64/.svn/text-base/mulmid_basecase.asm.svn-base:dnl
>>>>>  LGPLv3+, license terms reproduced below. These modifications are hereby
>>>>> branches/mpir-parallel/mpn/x86_64/mulmid_basecase.asm:dnl  LGPLv3+,
>>>>> license terms reproduced below. These modifications are hereby
>>>>> branches/mpir-parallel/mpn/x86_64w/.svn/text-base/mulmid_basecase.asm.svn-base:;
>>>>>  LGPLv3+, license terms reproduced below. These modifications are hereby
>>>>> branches/mpir-parallel/mpn/x86_64w/mulmid_basecase.asm:;  LGPLv3+,
>>>>> license terms reproduced below. These modifications are hereby
>>>>> branches/mpir-parallel/mpn/ia64/.svn/text-base/addmul_4.asm.svn-base:C
>>>>> LICENSE: GNU LGPLv3+
>>>>> branches/mpir-parallel/mpn/ia64/addmul_4.asm:C LICENSE: GNU LGPLv3+
>>>>> trunk/mpn/x86_64/.svn/text-base/mulmid_basecase.asm.svn-base:dnl
>>>>> LGPLv3+, license terms reproduced below. These modifications are hereby
>>>>> trunk/mpn/x86_64/mulmid_basecase.asm:dnl  LGPLv3+, license terms
>>>>> reproduced below. These modifications are hereby
>>>>> trunk/mpn/x86_64w/.svn/text-base/mulmid_basecase.asm.svn-base:;
>>>>> LGPLv3+, license terms reproduced below. These modifications are hereby
>>>>> trunk/mpn/x86_64w/mulmid_basecase.asm:;  LGPLv3+, license terms
>>>>> reproduced below. These modifications are hereby
>>>>> trunk/mpn/ia64/.svn/text-base/addmul_4.asm.svn-base:C LICENSE: GNU LGPLv3+
>>>>> trunk/mpn/ia64/addmul_4.asm:C LICENSE: GNU LGPLv3+
>>>>>
>>>>> mpir-parallel was a branch created by me against trunk at mpir-2.0ish
>>>>> stage. This shows all of the lgplv3+ code in mpir, or should do. It
>>>>> doesn't seem like there's that much LGPLv3 code in there.
>>>>>
>>>>> I've searched for "GPLv3+" and "GNU General Public License" too and I
>>>>> see no code, except those files, specifically containing the phrase 
>>>>> GPLv3+.
>>>>>
>>>>> Current trunk/COPYING.LIB is Lgplv3+. I also ran this:
>>>>>
>>>>> find . -name "COPYING.LIB" -print -exec grep -b5 "GPL" {} \;
>>>>> ./mpir-0.9/COPYING.LIB
>>>>> 75- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
>>>>> 132- 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
>>>>> 194- Everyone is permitted to copy and distribute verbatim copies
>>>>> 256- of this license document, but changing it is not allowed.
>>>>> 315-
>>>>> 316:[This is the first released version of the Lesser GPL.  It also counts
>>>>> 387- as the successor of the GNU Library Public License, version 2, hence
>>>>> 457- the version number 2.1.]
>>>>> 483-
>>>>> 484-                        Preamble
>>>>> 500-
>>>>> ./branches/mpir-parallel/COPYING.LIB
>>>>> 412-License, supplemented by the additional permissions listed below.
>>>>> 478-
>>>>> 479-  0. Additional Definitions.
>>>>> 508-
>>>>> 509-  As used herein, "this License" refers to version 3 of the GNU Lesser
>>>>> 580:General Public License, and the "GNU GPL" refers to version 3 of the 
>>>>> GNU
>>>>> 653-General Public License.
>>>>> 677-
>>>>> 678-  "The Library" refers to a covered work governed by this License,
>>>>> 745-other than an Application or a Combined Work as defined below.
>>>>> 808-
>>>>> --
>>>>> 1539-  The "Corresponding Application Code" for a Combined Work means the
>>>>> 1608-object code and/or source code for the Application, including any 
>>>>> data
>>>>> 1679-and utility programs needed for reproducing the Combined Work from 
>>>>> the
>>>>> 1750-Application, but excluding the System Libraries of the Combined Work.
>>>>> 1820-
>>>>> 1821:  1. Exception to Section 3 of the GNU GPL.
>>>>> 1865-
>>>>> 1866-  You may convey a covered work under sections 3 and 4 of this 
>>>>> License
>>>>> 1937:without being bound by section 3 of the GNU GPL.
>>>>> 1986-
>>>>> 1987-  2. Conveying Modified Versions.
>>>>> 2021-
>>>>> 2022-  If you modify a copy of the Library, and, in your modifications, a
>>>>> 2091-facility refers to a function or data to be supplied by an 
>>>>> Application
>>>>> --
>>>>> 2303-   a) under this License, provided that you make a good faith effort 
>>>>> to
>>>>> 2375-   ensure that, in the event an Application does not supply the
>>>>> 2439-   function or data, the facility still operates, and performs
>>>>> 2502-   whatever part of its purpose remains meaningful, or
>>>>> 2557-
>>>>> 2558:   b) under the GNU GPL, with none of the additional permissions of
>>>>> 2626-   this License applicable to that copy.
>>>>> 2667-
>>>>> 2668-  3. Object Code Incorporating Material from Library Header Files.
>>>>> 2735-
>>>>> 2736-  The object code form of an Application may incorporate material 
>>>>> from
>>>>> --
>>>>> 3143-
>>>>> 3144-   a) Give prominent notice with each copy of the object code that 
>>>>> the
>>>>> 3215-   Library is used in it and that the Library and its use are
>>>>> 3277-   covered by this License.
>>>>> 3305-
>>>>> 3306:   b) Accompany the object code with a copy of the GNU GPL and this
>>>>> license
>>>>> 3382-   document.
>>>>> 3395-
>>>>> 3396-  4. Combined Works.
>>>>> 3417-
>>>>> 3418-  You may convey a Combined Work under terms of your choice that,
>>>>> --
>>>>> 3699-
>>>>> 3700-   a) Give prominent notice with each copy of the Combined Work that
>>>>> 3769-   the Library is used in it and that the Library and its use are
>>>>> 3835-   covered by this License.
>>>>> 3863-
>>>>> 3864:   b) Accompany the Combined Work with a copy of the GNU GPL and
>>>>> this license
>>>>> 3942-   document.
>>>>> 3955-
>>>>> 3956-   c) For a Combined Work that displays copyright notices during
>>>>> 4021-   execution, include the copyright notice for the Library among
>>>>> 4086-   these notices, as well as a reference directing the user to the
>>>>> 4153:   copies of the GNU GPL and this license document.
>>>>> 4205-
>>>>> 4206-   d) Do one of the following:
>>>>> 4237-
>>>>> 4238-       0) Convey the Minimal Corresponding Source under the terms
>>>>> of this
>>>>> 4312-       License, and the Corresponding Application Code in a form
>>>>> 4377-       suitable for, and under terms that permit, the user to
>>>>> 4439-       recombine or relink the Application with a modified version of
>>>>> 4509-       the Linked Version to produce a modified Combined Work, in the
>>>>> 4579:       manner specified by section 6 of the GNU GPL for conveying
>>>>> 4645-       Corresponding Source.
>>>>> 4674-
>>>>> 4675-       1) Use a suitable shared library mechanism for linking with 
>>>>> the
>>>>> 4746-       Library.  A suitable mechanism is one that (a) uses at run 
>>>>> time
>>>>> 4817-       a copy of the Library already present on the user's computer
>>>>> --
>>>>> 4954-       of the Library that is interface-compatible with the Linked
>>>>> 5021-       Version.
>>>>> 5037-
>>>>> 5038-   e) Provide Installation Information, but only if you would 
>>>>> otherwise
>>>>> 5110-   be required to provide such information under section 6 of the
>>>>> 5176:   GNU GPL, and only to the extent that such information is
>>>>> 5236-   necessary to install and execute a modified version of the
>>>>> 5298-   Combined Work produced by recombining or relinking the
>>>>> 5356-   Application with a modified version of the Linked Version. (If
>>>>> 5422-   you use option 4d0, the Installation Information must accompany
>>>>> 5489-   the Minimal Corresponding Source and Corresponding Application
>>>>> 5555-   Code. If you use option 4d1, you must provide the Installation
>>>>> 5621:   Information in the manner specified by section 6 of the GNU GPL
>>>>> 5688-   for conveying Corresponding Source.)
>>>>> 5728-
>>>>> 5729-  5. Combined Libraries.
>>>>> 5754-
>>>>> 5755-  You may place library facilities that are a work based on the
>>>>> ./branches/cuda_stuff/COPYING.LIB
>>>>> 75- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
>>>>> 132- 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
>>>>> 194- Everyone is permitted to copy and distribute verbatim copies
>>>>> 256- of this license document, but changing it is not allowed.
>>>>> 315-
>>>>> 316:[This is the first released version of the Lesser GPL.  It also counts
>>>>> 387- as the successor of the GNU Library Public License, version 2, hence
>>>>> 457- the version number 2.1.]
>>>>> 483-
>>>>> 484-                        Preamble
>>>>> 500-
>>>>> ./branches/mpir-cell/COPYING.LIB
>>>>> 75- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
>>>>> 132- 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
>>>>> 194- Everyone is permitted to copy and distribute verbatim copies
>>>>> 256- of this license document, but changing it is not allowed.
>>>>> 315-
>>>>> 316:[This is the first released version of the Lesser GPL.  It also counts
>>>>> 387- as the successor of the GNU Library Public License, version 2, hence
>>>>> 457- the version number 2.1.]
>>>>> 483-
>>>>> 484-                        Preamble
>>>>> 500-
>>>>> ./branches/mpir-mt/COPYING.LIB
>>>>> 75- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
>>>>> 132- 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
>>>>> 194- Everyone is permitted to copy and distribute verbatim copies
>>>>> 256- of this license document, but changing it is not allowed.
>>>>> 315-
>>>>> 316:[This is the first released version of the Lesser GPL.  It also counts
>>>>> 387- as the successor of the GNU Library Public License, version 2, hence
>>>>> 457- the version number 2.1.]
>>>>> 483-
>>>>> 484-                        Preamble
>>>>> 500-
>>>>> ./branches/mpir-cuda/COPYING.LIB
>>>>> 75- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
>>>>> 132- 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
>>>>> 194- Everyone is permitted to copy and distribute verbatim copies
>>>>> 256- of this license document, but changing it is not allowed.
>>>>> 315-
>>>>> 316:[This is the first released version of the Lesser GPL.  It also counts
>>>>> 387- as the successor of the GNU Library Public License, version 2, hence
>>>>> 457- the version number 2.1.]
>>>>> 483-
>>>>> 484-                        Preamble
>>>>> 500-
>>>>> ./mpir-1.0/COPYING.LIB
>>>>> 75- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
>>>>> 132- 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
>>>>> 194- Everyone is permitted to copy and distribute verbatim copies
>>>>> 256- of this license document, but changing it is not allowed.
>>>>> 315-
>>>>> 316:[This is the first released version of the Lesser GPL.  It also counts
>>>>> 387- as the successor of the GNU Library Public License, version 2, hence
>>>>> 457- the version number 2.1.]
>>>>> 483-
>>>>> 484-                        Preamble
>>>>> 500-
>>>>> ./mpir-1.1/COPYING.LIB
>>>>> 75- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
>>>>> 132- 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
>>>>> 194- Everyone is permitted to copy and distribute verbatim copies
>>>>> 256- of this license document, but changing it is not allowed.
>>>>> 315-
>>>>> 316:[This is the first released version of the Lesser GPL.  It also counts
>>>>> 387- as the successor of the GNU Library Public License, version 2, hence
>>>>> 457- the version number 2.1.]
>>>>> 483-
>>>>> 484-                        Preamble
>>>>> 500-
>>>>> ./mpir-1.2/COPYING.LIB
>>>>> 75- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
>>>>> 132- 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
>>>>> 194- Everyone is permitted to copy and distribute verbatim copies
>>>>> 256- of this license document, but changing it is not allowed.
>>>>> 315-
>>>>> 316:[This is the first released version of the Lesser GPL.  It also counts
>>>>> 387- as the successor of the GNU Library Public License, version 2, hence
>>>>> 457- the version number 2.1.]
>>>>> 483-
>>>>> 484-                        Preamble
>>>>> 500-
>>>>> ./trunk/COPYING.LIB
>>>>> 412-License, supplemented by the additional permissions listed below.
>>>>> 478-
>>>>> 479-  0. Additional Definitions.
>>>>> 508-
>>>>> 509-  As used herein, "this License" refers to version 3 of the GNU Lesser
>>>>> 580:General Public License, and the "GNU GPL" refers to version 3 of the 
>>>>> GNU
>>>>> 653-General Public License.
>>>>> 677-
>>>>> 678-  "The Library" refers to a covered work governed by this License,
>>>>> 745-other than an Application or a Combined Work as defined below.
>>>>> 808-
>>>>> --
>>>>> 1539-  The "Corresponding Application Code" for a Combined Work means the
>>>>> 1608-object code and/or source code for the Application, including any 
>>>>> data
>>>>> 1679-and utility programs needed for reproducing the Combined Work from 
>>>>> the
>>>>> 1750-Application, but excluding the System Libraries of the Combined Work.
>>>>> 1820-
>>>>> 1821:  1. Exception to Section 3 of the GNU GPL.
>>>>> 1865-
>>>>> 1866-  You may convey a covered work under sections 3 and 4 of this 
>>>>> License
>>>>> 1937:without being bound by section 3 of the GNU GPL.
>>>>> 1986-
>>>>> 1987-  2. Conveying Modified Versions.
>>>>> 2021-
>>>>> 2022-  If you modify a copy of the Library, and, in your modifications, a
>>>>> 2091-facility refers to a function or data to be supplied by an 
>>>>> Application
>>>>> --
>>>>> 2303-   a) under this License, provided that you make a good faith effort 
>>>>> to
>>>>> 2375-   ensure that, in the event an Application does not supply the
>>>>> 2439-   function or data, the facility still operates, and performs
>>>>> 2502-   whatever part of its purpose remains meaningful, or
>>>>> 2557-
>>>>> 2558:   b) under the GNU GPL, with none of the additional permissions of
>>>>> 2626-   this License applicable to that copy.
>>>>> 2667-
>>>>> 2668-  3. Object Code Incorporating Material from Library Header Files.
>>>>> 2735-
>>>>> 2736-  The object code form of an Application may incorporate material 
>>>>> from
>>>>> --
>>>>> 3143-
>>>>> 3144-   a) Give prominent notice with each copy of the object code that 
>>>>> the
>>>>> 3215-   Library is used in it and that the Library and its use are
>>>>> 3277-   covered by this License.
>>>>> 3305-
>>>>> 3306:   b) Accompany the object code with a copy of the GNU GPL and this
>>>>> license
>>>>> 3382-   document.
>>>>> 3395-
>>>>> 3396-  4. Combined Works.
>>>>> 3417-
>>>>> 3418-  You may convey a Combined Work under terms of your choice that,
>>>>> --
>>>>> 3699-
>>>>> 3700-   a) Give prominent notice with each copy of the Combined Work that
>>>>> 3769-   the Library is used in it and that the Library and its use are
>>>>> 3835-   covered by this License.
>>>>> 3863-
>>>>> 3864:   b) Accompany the Combined Work with a copy of the GNU GPL and
>>>>> this license
>>>>> 3942-   document.
>>>>> 3955-
>>>>> 3956-   c) For a Combined Work that displays copyright notices during
>>>>> 4021-   execution, include the copyright notice for the Library among
>>>>> 4086-   these notices, as well as a reference directing the user to the
>>>>> 4153:   copies of the GNU GPL and this license document.
>>>>> 4205-
>>>>> 4206-   d) Do one of the following:
>>>>> 4237-
>>>>> 4238-       0) Convey the Minimal Corresponding Source under the terms
>>>>> of this
>>>>> 4312-       License, and the Corresponding Application Code in a form
>>>>> 4377-       suitable for, and under terms that permit, the user to
>>>>> 4439-       recombine or relink the Application with a modified version of
>>>>> 4509-       the Linked Version to produce a modified Combined Work, in the
>>>>> 4579:       manner specified by section 6 of the GNU GPL for conveying
>>>>> 4645-       Corresponding Source.
>>>>> 4674-
>>>>> 4675-       1) Use a suitable shared library mechanism for linking with 
>>>>> the
>>>>> 4746-       Library.  A suitable mechanism is one that (a) uses at run 
>>>>> time
>>>>> 4817-       a copy of the Library already present on the user's computer
>>>>> --
>>>>> 4954-       of the Library that is interface-compatible with the Linked
>>>>> 5021-       Version.
>>>>> 5037-
>>>>> 5038-   e) Provide Installation Information, but only if you would 
>>>>> otherwise
>>>>> 5110-   be required to provide such information under section 6 of the
>>>>> 5176:   GNU GPL, and only to the extent that such information is
>>>>> 5236-   necessary to install and execute a modified version of the
>>>>> 5298-   Combined Work produced by recombining or relinking the
>>>>> 5356-   Application with a modified version of the Linked Version. (If
>>>>> 5422-   you use option 4d0, the Installation Information must accompany
>>>>> 5489-   the Minimal Corresponding Source and Corresponding Application
>>>>> 5555-   Code. If you use option 4d1, you must provide the Installation
>>>>> 5621:   Information in the manner specified by section 6 of the GNU GPL
>>>>> 5688-   for conveying Corresponding Source.)
>>>>> 5728-
>>>>> 5729-  5. Combined Libraries.
>>>>> 5754-
>>>>> 5755-  You may place library facilities that are a work based on the
>>>>> ./mpir-1.3/COPYING.LIB
>>>>> 75- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
>>>>> 132- 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
>>>>> 194- Everyone is permitted to copy and distribute verbatim copies
>>>>> 256- of this license document, but changing it is not allowed.
>>>>> 315-
>>>>> 316:[This is the first released version of the Lesser GPL.  It also counts
>>>>> 387- as the successor of the GNU Library Public License, version 2, hence
>>>>> 457- the version number 2.1.]
>>>>> 483-
>>>>> 484-                        Preamble
>>>>> 500-
>>>>>
>>>>> Which shows you the various distributions and licenses available - in
>>>>> summary, mpir-2.0 (trunk) is the only LGPLv3+ library and contains the
>>>>> only files showing lgplv3+ code
>>>>>
>>>>> Just to test against the statement made on
>>>>> http://trac.mpir.org/mpir_trac/ticket/71
>>>>>
>>>>> I extracted mpf/set_str.c from
>>>>> ftp://ftp.gmplib.org/pub/gmp-5.0.1/gmp-5.0.1.tar.bz2 and ran a diff:
>>>>>
>>>>> $ diff -up set_str.c mpir/trunk/mpf/set_str.c
>>>>> --- set_str.c   2010-05-04 18:59:21.959815659 +0100
>>>>> +++ mpir/trunk/mpf/set_str.c    2010-04-10 18:13:19.584730037 +0100
>>>>> @@ -2,14 +2,16 @@
>>>>>    in base BASE to a float in dest.  If BASE is zero, the leading
>>>>> characters
>>>>>    of STRING is used to figure out the base.
>>>>>
>>>>> -Copyright 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2005, 
>>>>> 2007,
>>>>> -2008 Free Software Foundation, Inc.
>>>>> +Copyright 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2005 Free
>>>>> +Software Foundation, Inc.
>>>>> +
>>>>> +Copyright 2009 B R Gladman
>>>>>
>>>>>  This file is part of the GNU MP Library.
>>>>>
>>>>>  The GNU MP Library is free software; you can redistribute it and/or 
>>>>> modify
>>>>>  it under the terms of the GNU Lesser General Public License as published 
>>>>> by
>>>>> -the Free Software Foundation; either version 3 of the License, or (at 
>>>>> your
>>>>> +the Free Software Foundation; either version 2.1 of the License, or (at
>>>>> your
>>>>>  option) any later version.
>>>>>
>>>>>  The GNU MP Library is distributed in the hope that it will be useful, but
>>>>> @@ -18,7 +20,9 @@ or FITNESS FOR A PARTICULAR PURPOSE.  Se
>>>>>  License for more details.
>>>>>
>>>>>  You should have received a copy of the GNU Lesser General Public License
>>>>> -along with the GNU MP Library.  If not, see
>>>>> http://www.gnu.org/licenses/.  */
>>>>> +along with the GNU MP Library; see the file COPYING.LIB.  If not, write 
>>>>> to
>>>>> +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
>>>>> Boston,
>>>>> +MA 02110-1301, USA. */
>>>>>
>>>>>  /*
>>>>>   This still needs work, as suggested by some FIXME comments.
>>>>> @@ -27,7 +31,9 @@ along with the GNU MP Library.  If not,
>>>>>   3. Use mpn_tdiv_qr instead of mpn_lshift+mpn_divrem.
>>>>>  */
>>>>>
>>>>> +#ifndef _GNU_SOURCE
>>>>>  #define _GNU_SOURCE    /* for DECIMAL_POINT in langinfo.h */
>>>>> +#endif
>>>>>
>>>>>  #include "config.h"
>>>>>
>>>>> @@ -43,10 +49,84 @@ along with the GNU MP Library.  If not,
>>>>>  #include <locale.h>    /* for localeconv */
>>>>>  #endif
>>>>>
>>>>> -#include "gmp.h"
>>>>> +#include "mpir.h"
>>>>>  #include "gmp-impl.h"
>>>>>  #include "longlong.h"
>>>>>
>>>>> +static mp_limb_t mpn_intdivrem (mp_ptr qp, mp_size_t qxn,
>>>>> +           mp_ptr np, mp_size_t nn,
>>>>> +           mp_srcptr dp, mp_size_t dn)
>>>>> +{
>>>>> +  ASSERT (qxn >= 0);
>>>>> +  ASSERT (nn >= dn);
>>>>> +  ASSERT (dn >= 1);
>>>>> +  ASSERT (dp[dn-1] & GMP_NUMB_HIGHBIT);
>>>>> +  ASSERT (! MPN_OVERLAP_P (np, nn, dp, dn));
>>>>> +  ASSERT (! MPN_OVERLAP_P (qp, nn-dn+qxn, np, nn) || qp==np+dn+qxn);
>>>>> +  ASSERT (! MPN_OVERLAP_P (qp, nn-dn+qxn, dp, dn));
>>>>> +  ASSERT_MPN (np, nn);
>>>>> +  ASSERT_MPN (dp, dn);
>>>>> +
>>>>> +  if (dn == 1)
>>>>> +    {
>>>>> +      mp_limb_t ret;
>>>>> +      mp_ptr q2p;
>>>>> +      mp_size_t qn;
>>>>> +      TMP_DECL;
>>>>> +
>>>>> +      TMP_MARK;
>>>>> +      q2p = (mp_ptr) TMP_ALLOC ((nn + qxn) * BYTES_PER_MP_LIMB);
>>>>> +
>>>>> +      np[0] = mpn_divrem_1 (q2p, qxn, np, nn, dp[0]);
>>>>> +      qn = nn + qxn - 1;
>>>>> +      MPN_COPY (qp, q2p, qn);
>>>>> +      ret = q2p[qn];
>>>>> +
>>>>> +      TMP_FREE;
>>>>> +      return ret;
>>>>> +    }
>>>>> +  else if (dn == 2)
>>>>> +    {
>>>>> +      return mpn_divrem_2 (qp, qxn, np, nn, dp);
>>>>> +    }
>>>>> +  else
>>>>> +    {
>>>>> +      mp_ptr rp, q2p;
>>>>> +      mp_limb_t qhl;
>>>>> +      mp_size_t qn;
>>>>> +      TMP_DECL;
>>>>> +
>>>>> +      TMP_MARK;
>>>>> +      if (UNLIKELY (qxn != 0))
>>>>> +       {
>>>>> +         mp_ptr n2p;
>>>>> +         n2p = (mp_ptr) TMP_ALLOC ((nn + qxn) * BYTES_PER_MP_LIMB);
>>>>> +         MPN_ZERO (n2p, qxn);
>>>>> +         MPN_COPY (n2p + qxn, np, nn);
>>>>> +         q2p = (mp_ptr) TMP_ALLOC ((nn - dn + qxn + 1) * 
>>>>> BYTES_PER_MP_LIMB);
>>>>> +         rp = (mp_ptr) TMP_ALLOC (dn * BYTES_PER_MP_LIMB);
>>>>> +         mpn_tdiv_qr (q2p, rp, 0L, n2p, nn + qxn, dp, dn);
>>>>> +         MPN_COPY (np, rp, dn);
>>>>> +         qn = nn - dn + qxn;
>>>>> +         MPN_COPY (qp, q2p, qn);
>>>>> +         qhl = q2p[qn];
>>>>> +       }
>>>>> +      else
>>>>> +       {
>>>>> +         q2p = (mp_ptr) TMP_ALLOC ((nn - dn + 1) * BYTES_PER_MP_LIMB);
>>>>> +         rp = (mp_ptr) TMP_ALLOC (dn * BYTES_PER_MP_LIMB);
>>>>> +         mpn_tdiv_qr (q2p, rp, 0L, np, nn, dp, dn);
>>>>> +         MPN_COPY (np, rp, dn);        /* overwrite np area with 
>>>>> remainder */
>>>>> +         qn = nn - dn;
>>>>> +         MPN_COPY (qp, q2p, qn);
>>>>> +         qhl = q2p[qn];
>>>>> +       }
>>>>> +      TMP_FREE;
>>>>> +      return qhl;
>>>>> +    }
>>>>> +}
>>>>> +
>>>>> +
>>>>>  extern const unsigned char __gmp_digit_value_tab[];
>>>>>  #define digit_value_tab __gmp_digit_value_tab
>>>>>
>>>>> @@ -72,7 +152,7 @@ mpn_pow_1_highpart (mp_ptr rp, mp_size_t
>>>>>   count_leading_zeros (cnt, exp);
>>>>>   for (i = GMP_LIMB_BITS - cnt - 2; i >= 0; i--)
>>>>>     {
>>>>> -      mpn_sqr (tp, rp + off, rn);
>>>>> +      mpn_sqr_n (tp, rp + off, rn);
>>>>>       rn = 2 * rn;
>>>>>       rn -= tp[rn - 1] == 0;
>>>>>       ign <<= 1;
>>>>> @@ -137,30 +217,25 @@ mpf_set_str (mpf_ptr x, const char *str,
>>>>>       c = (unsigned char) *++str;
>>>>>     }
>>>>>
>>>>> -  /* Default base to decimal.  */
>>>>> -  if (base == 0)
>>>>> -    base = 10;
>>>>> -
>>>>> +  digit_value = digit_value_tab;
>>>>>   exp_base = base;
>>>>> -
>>>>> -  if (base < 0)
>>>>> +  if (base <= 0)
>>>>>     {
>>>>>       exp_base = 10;
>>>>> -      base = -base;
>>>>> +      base = base ? -base : 10;
>>>>>     }
>>>>>
>>>>> -  digit_value = digit_value_tab;
>>>>> -  if (base > 36)
>>>>> +  if(base < 2 || base > 62)
>>>>> +      return -1;
>>>>> +  else if(base > 36)
>>>>>     {
>>>>>       /* For bases > 36, use the collating sequence
>>>>>         0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.  
>>>>> */
>>>>>       digit_value += 224;
>>>>> -      if (base > 62)
>>>>> -       return -1;              /* too large base */
>>>>>     }
>>>>>
>>>>>   /* Require at least one digit, possibly after an initial decimal
>>>>> point.  */
>>>>> -  if (digit_value[c] >= (base == 0 ? 10 : base))
>>>>> +  if (digit_value[c] >= base)
>>>>>     {
>>>>>       /* not a digit, must be a decimal point */
>>>>>       for (i = 0; i < pointlen; i++)
>>>>> @@ -242,7 +317,7 @@ mpf_set_str (mpf_ptr x, const char *str,
>>>>>     size_t n_chars_needed;
>>>>>
>>>>>     /* This breaks things like 0.000...0001.  To safely ignore superfluous
>>>>> -       digits, we need to skip over leading zeros.  */
>>>>> +       digits, we need to skip over leadng zeros.  */
>>>>>     /* Just consider the relevant leading digits of the mantissa.  */
>>>>>     n_chars_needed = 2 + (size_t)
>>>>>       (((size_t) prec * GMP_NUMB_BITS) *
>>>>> mp_bases[base].chars_per_bit_exactly);
>>>>> @@ -250,9 +325,8 @@ mpf_set_str (mpf_ptr x, const char *str,
>>>>>       str_size = n_chars_needed;
>>>>>  #endif
>>>>>
>>>>> -    ma = 2 + (mp_size_t)
>>>>> -      (str_size / (GMP_NUMB_BITS * 
>>>>> mp_bases[base].chars_per_bit_exactly));
>>>>> -    mp = TMP_ALLOC_LIMBS (ma);
>>>>> +    ma = (mp_size_t) (str_size / mp_bases[base].chars_per_bit_exactly);
>>>>> +    mp = TMP_ALLOC_LIMBS (ma / GMP_NUMB_BITS + 2);
>>>>>     mn = mpn_set_str (mp, (unsigned char *) begs, str_size, base);
>>>>>
>>>>>     if (mn == 0)
>>>>> @@ -272,35 +346,33 @@ mpf_set_str (mpf_ptr x, const char *str,
>>>>>        mn = prec;
>>>>>       }
>>>>>
>>>>> +    exp_in_base = 0;
>>>>>     if (expptr != 0)
>>>>> -      {
>>>>> -       /* Scan and convert the exponent, in base exp_base.  */
>>>>> -       long dig, minus, plusminus;
>>>>> -       c = (unsigned char) *expptr;
>>>>> -       minus = -(long) (c == '-');
>>>>> -       plusminus = minus | -(long) (c == '+');
>>>>> -       expptr -= plusminus;                    /* conditional increment 
>>>>> */
>>>>> -       c = (unsigned char) *expptr++;
>>>>> -       dig = digit_value[c];
>>>>> -       if (dig >= exp_base)
>>>>> -         {
>>>>> -           TMP_FREE;
>>>>> -           return -1;
>>>>> -         }
>>>>> -       exp_in_base = dig;
>>>>> -       c = (unsigned char) *expptr++;
>>>>> -       dig = digit_value[c];
>>>>> -       while (dig < exp_base)
>>>>> -         {
>>>>> -           exp_in_base = exp_in_base * exp_base;
>>>>> -           exp_in_base += dig;
>>>>> -           c = (unsigned char) *expptr++;
>>>>> -           dig = digit_value[c];
>>>>> -         }
>>>>> -       exp_in_base = (exp_in_base ^ minus) - minus; /* conditional 
>>>>> negation */
>>>>> -      }
>>>>> -    else
>>>>> -      exp_in_base = 0;
>>>>> +    {   char sgn = '+';
>>>>> +        int digit = 0, cnt = -1;
>>>>> +
>>>>> +        if(*expptr == '+' || *expptr == '-')
>>>>> +            sgn = *expptr++;
>>>>> +
>>>>> +        do
>>>>> +        {
>>>>> +            exp_in_base = exp_in_base * exp_base + digit;
>>>>> +            digit = digit_value[*(unsigned char*)expptr++];
>>>>> +            cnt++;
>>>>> +        }
>>>>> +        while
>>>>> +            (digit < exp_base);
>>>>> +
>>>>> +        if(!cnt)
>>>>> +        {
>>>>> +            TMP_FREE;
>>>>> +            return -1;
>>>>> +        }
>>>>> +
>>>>> +        if(sgn == '-')
>>>>> +            exp_in_base = -exp_in_base;
>>>>> +    }
>>>>> +
>>>>>     if (dotpos != 0)
>>>>>       exp_in_base -= s - dotpos;
>>>>>     divflag = exp_in_base < 0;
>>>>> @@ -350,7 +422,7 @@ mpf_set_str (mpf_ptr x, const char *str,
>>>>>          }
>>>>>
>>>>>        qp = TMP_ALLOC_LIMBS (prec + 1);
>>>>> -       qlimb = mpn_divrem (qp, prec - (mn - rn), mp, mn, rp, rn);
>>>>> +       qlimb = mpn_intdivrem (qp, prec - (mn - rn), mp, mn, rp, rn);
>>>>>        tp = qp;
>>>>>        exp_in_limbs = qlimb + (mn - rn) + (madj - radj);
>>>>>        rn = prec;
>>>>>
>>>>> which shows large sections of significantly different code.
>>>>>
>>>>> My conclusion, without any other concrete accusations:
>>>>>
>>>>> mpir 1.3 and earlier contain only lgplv2+ code. mpir-trunk (to be
>>>>> mpir-2.0) uses a small number of lgplv3+ patches and is distributed
>>>>> under the same license.
>>>>>
>>>>> Antony
>>>>>
>>>>> On 05/04/2010 04:43 PM, MPIR Team wrote:
>>>>>> Dear All,
>>>>>>
>>>>>> you may be aware of statements on the GMP website regarding MPIR. We
>>>>>> have been passed email correspondence in which Torbjorn Granlund again
>>>>>> alleges that we are distributing a:
>>>>>>
>>>>>> "renamed GMP package with license downgraded from LGPL 3 to LPGL 2.1"
>>>>>>
>>>>>> But we have no idea what he means. If anyone has any information about
>>>>>> this, can you please post it here publicly to our list so we can
>>>>>> resolve this situation as soon as possible!
>>>>>>
>>>>>> The allegations apparently relate to the MPIR website, but as far as
>>>>>> we know, all tarballs there are correctly licensed and prominent notices 
>>>>>> are
>>>>>> given as to their licensing status.
>>>>>>
>>>>>> We sincerely appreciate anyone who can shed light on this issue or assist
>>>>>> us.
>>>>>>
>>>>>> Best Regards,
>>>>>>
>>>>>> The MPIR Team.
>>>>>>
>>>>>> --
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "mpir-devel" group.
>>>>>> To post to this group, send email to mpir-de...@googlegroups.com.
>>>>>> To unsubscribe from this group, send email to
>>>>>> mpir-devel+unsubscr...@googlegroups.com.
>>>>>> For more options, visit this group at
>>>>>> http://groups.google.com/group/mpir-devel?hl=en.
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google Groups 
>>>>> "mpir-devel" group.
>>>>> To post to this group, send email to mpir-de...@googlegroups.com.
>>>>> To unsubscribe from this group, send email to 
>>>>> mpir-devel+unsubscr...@googlegroups.com.
>>>>> For more options, visit this group at 
>>>>> http://groups.google.com/group/mpir-devel?hl=en.
>>>>>
>>>>>
>>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "mpir-devel" group.
>>> To post to this group, send email to mpir-de...@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> mpir-devel+unsubscr...@googlegroups.com.
>>> For more options, visit this group at 
>>> http://groups.google.com/group/mpir-devel?hl=en.
>>>
>>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "mpir-devel" group.
> To post to this group, send email to mpir-de...@googlegroups.com.
> To unsubscribe from this group, send email to 
> mpir-devel+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/mpir-devel?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To post to this group, send email to mpir-de...@googlegroups.com.
To unsubscribe from this group, send email to 
mpir-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/mpir-devel?hl=en.

Reply via email to