GMP and Win32

pggimeno@wanadoo.es pggimeno@wanadoo.es
Wed, 04 Jun 2003 21:02:24 +0200


"Brian Gladman" <brg@gladman.plus.com> wrote:

>The problem I am hitting is that the above defines are used in the form:
>
>__GMP_DECLSPEC type function()
>
>and hence expand to:
>
>_stdcall __declspec(dllexport) type function()
>
>when what VC++ wants is:
>
>type __declspec(dllexport) __stdcall function()

Long ago I suggested to use a parametrized macro like
"__GMP_DECLSPEC(type)" when a massive change of "type __GMP_DECLSPEC"
to "__GMP_DECLSPEC type" was needed, in order to make it more general
and account for all possible future cases like this one. Here's the
cite:

  http://www.swox.com/list-archives/gmp/2002-February/000328.html

Alternatively something like "__GMP_DECLPREFIX type __GMP_DECLSUFFIX"
could work (ZLIB does something similar) but that's really ugly.

  Pedro Gimeno