[PATCH] support for mingw-w64

Ozkan Sezer sezeroz at gmail.com
Sat Sep 12 13:24:30 CEST 2009


On Fri, Sep 11, 2009 at 11:42 PM, Vincent Lefevre <vincent at vinc17.org> wrote:
> On 2009-09-11 14:05:17 +0200, Torbjorn Granlund wrote:
>> My undertanding is that sizeof(ptrdiff_t) == sizeof(size_t) should hold
>> true on any ISO C90 or C99 system.  They only differ in signedness.
>
> This is not guaranteed by the standard. This has the drawback
> that the subtraction of pointers may be wrong in some rare cases.
> So, for very specific applications, there might be a good reason
> to have sizeof(ptrdiff_t) > sizeof(size_t).
>
> More on this subject:
>
>  http://gcc.gnu.org/ml/gcc/2005-07/msg00754.html

Well, here the simplest patch I can think of
(attached gmp_intptr_t.diff, dif of configure omitted.)
It adds a few type size checks to configure.in and
typedefs gmp_intptr_t in gmp-impl.h so that all
tests can pick it up without issue.  Is this acceptable?

--
Ozkan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gmp_intptr_t.diff
Type: application/octet-stream
Size: 2829 bytes
Desc: not available
URL: <http://gmplib.org/list-archives/gmp-devel/attachments/20090912/1502e11c/attachment.obj>


More information about the gmp-devel mailing list