<div class="gmail_quote">2009/5/6 Torbjorn Granlund <span dir="ltr"><a href="mailto:tg@gmplib.org">tg@gmplib.org</a></span><br></div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="im">[... abour &quot;#define restrict __restrict&quot;]<br></div>Sorry, I don&#39;t see why this reasoning is relevant to the present<br>situation.  I repeat: gmp-impl.h is an internal GMP file.  Surely its<br>
&quot;global&quot; effects should be quite limited.  :-)<br><br>I understand that<br><br>#include &quot;gmp.h&quot;<br>#include &quot;gmp-impl.h&quot;<br>#include &lt;somesystemheader.h&gt;<br><br>can be a problem.  Are you trying to say that we do that in GMP?</blockquote>

<div class="gmail_quote"> </div>
<div class="gmail_quote">The autoconf defines are performed before including system files. See the failed config test below.</div>
<div class="gmail_quote"> </div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>If you, as I suspect, are playing with GMP&#39;s internal interfaces, you&#39;re<br>onn your own.</div></blockquote>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"></blockquote>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"></blockquote>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><span id=""></span>
<div class="im">[...]</div>Ah, so you *are* playing with GMP internals.  Sorry, there are very good<br>reasons for not trying to make that easier.</blockquote>
<div class="gmail_quote"> </div>
<div class="gmail_quote">We have no interest in abusing gmp internals. All we want to do is to make &quot;make check&quot; work, as advised on the GMP website. There&#39;s no reason to be offended.</div>
<div class="gmail_quote">This official gmp testing code accesses the functions in gmp-impl.h. If you don&#39;t __declspec(dllexport) tehse functions, gmp&#39;s own tests won&#39;t work.</div>
<div class="gmail_quote"> </div>
<div class="gmail_quote">As for hiding internal functions: the gmp-impl.h file is not installed, so people can&#39;t directly call these functions anyway. Having them in the dll is not a big clutter, and it allows the dll to be tested with gmp&#39;s own &quot;make check&quot;.</div>

<div class="gmail_quote"> </div>
<div class="gmail_quote">Kind regards,</div>
<div class="gmail_quote"> </div>
<div class="gmail_quote">Michiel</div>
<div class="gmail_quote"> </div>
<div class="gmail_quote">==</div>
<div class="gmail_quote"> </div>
<div class="gmail_quote">configure: failed program was:</div>
<div class="gmail_quote">| /* confdefs.h.  */</div>
<div class="gmail_quote">| </div>
<div class="gmail_quote">| #define PACKAGE_NAME &quot;GNU MP&quot;</div>
<div class="gmail_quote">| #define PACKAGE_TARNAME &quot;gmp&quot;</div>
<div class="gmail_quote">| #define PACKAGE_VERSION &quot;4.3.0&quot;</div>
<div class="gmail_quote">| #define PACKAGE_STRING &quot;GNU MP 4.3.0&quot;</div>
<div class="gmail_quote">| #define PACKAGE_BUGREPORT &quot;<a href="mailto:gmp-bugs@swox.com">gmp-bugs@swox.com</a>&quot;</div>
<div class="gmail_quote">| #define PACKAGE &quot;gmp&quot;</div>
<div class="gmail_quote">| #define VERSION &quot;4.3.0&quot;</div>
<div class="gmail_quote">| #define WANT_ASSERT 1</div>
<div class="gmail_quote">| #define WANT_FFT 1</div>
<div class="gmail_quote">| #define HAVE_HOST_CPU_x86 1</div>
<div class="gmail_quote">| #ifdef __cplusplus</div>
<div class="gmail_quote">| void exit (int);</div>
<div class="gmail_quote">| #endif</div>
<div class="gmail_quote">| #define PROTOTYPES 1</div>
<div class="gmail_quote">| #define __PROTOTYPES 1</div>
<div class="gmail_quote">| #define STDC_HEADERS 1</div>
<div class="gmail_quote">| #define HAVE_SYS_TYPES_H 1</div>
<div class="gmail_quote">| #define HAVE_SYS_STAT_H 1</div>
<div class="gmail_quote">| #define HAVE_STDLIB_H 1</div>
<div class="gmail_quote">| #define HAVE_STRING_H 1</div>
<div class="gmail_quote">| #define HAVE_MEMORY_H 1</div>
<div class="gmail_quote">| #define HAVE_STRING_H 1</div>
<div class="gmail_quote">| #define STDC_HEADERS 1</div>
<div class="gmail_quote">| #define HAVE_FCNTL_H 1</div>
<div class="gmail_quote">| #define HAVE_FLOAT_H 1</div>
<div class="gmail_quote">| #define HAVE_LOCALE_H 1</div>
<div class="gmail_quote">| #define HAVE_DECL_FGETC 1</div>
<div class="gmail_quote">| #define HAVE_DECL_FSCANF 1</div>
<div class="gmail_quote">| #define HAVE_DECL_OPTARG 0</div>
<div class="gmail_quote">| #define HAVE_DECL_UNGETC 1</div>
<div class="gmail_quote">| #define HAVE_DECL_VFPRINTF 1</div>
<div class="gmail_quote">| #define HAVE_DECL_SYS_ERRLIST 0</div>
<div class="gmail_quote">| #define HAVE_DECL_SYS_NERR 0</div>
<div class="gmail_quote">| #define RETSIGTYPE void</div>
<div class="gmail_quote">| #define HAVE_LONG_DOUBLE 1</div>
<div class="gmail_quote">| #define HAVE_LONG_LONG 1</div>
<div class="gmail_quote">| #define HAVE_PTRDIFF_T 1</div>
<div class="gmail_quote">| #define HAVE_STRINGIZE 1</div>
<div class="gmail_quote">| #define restrict __restrict</div>
<div class="gmail_quote">| #define HAVE_STDARG 1</div>
<div class="gmail_quote">| #ifndef __cplusplus</div>
<div class="gmail_quote">| #define inline __inline</div>
<div class="gmail_quote">| #endif</div>
<div class="gmail_quote">| /* end confdefs.h.  */</div>
<div class="gmail_quote">| #include &lt;alloca.h&gt;</div>
<div class="gmail_quote">| int</div>
<div class="gmail_quote">| main ()</div>
<div class="gmail_quote">| {</div>
<div class="gmail_quote">| char *p = (char *) alloca (2 * sizeof (int));</div>
<div class="gmail_quote">|   ;</div>
<div class="gmail_quote">|   return 0;</div>
<div class="gmail_quote">| }</div>
<div class="gmail_quote">configure:27006: result: no</div>
<div class="gmail_quote">configure:27017: checking for alloca (via gmp-impl.h)</div>
<div class="gmail_quote">configure:27046: cl -o conftest.exe    /Zi /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_WARNINGS /D_USE_32BIT_TIME_T  /W4  /nologo /Dfar=far_p /Dnear=near_p /Fdc:/users/default/ads/gmp/debug/build/obj.win32/gmp_dist/gmp_dist.pdb /TC /MDd /Zi /D _DEBUG /GS /RTC1 -DQT_DEBUG   /Ic:/users/default/ads/gmp/debug/build/projects/gmp_dist   /Ic:/users/default/ads/gmp/debug/build/include /IS:/hped/builds/gent/devXXX/rmom_int/debug/build/include   /D_AFXDLL /DNO_MALLOC_MACRO /DWIN32 /D_WIN32 /U_WINDOWS /DWINVER=0x0500 /D_MBCS   -DQT_DEBUG /D_DLL_BUILD  -DVER=&quot;351&quot; -DREV=&quot;mom_int&quot; -DPROD_IS_de   /Ic:/users/default/ads/gmp/debug/build/include /IS:/hped/builds/gent/devXXX/rmom_int/debug/build/include  conftest.c /link  /nologo /MANIFEST /debug  /LIBPATH:.   /LIBPATH:c:/users/default/ads/gmp/debug/build/lib.win32 /LIBPATH:S:/hped/builds/gent/devXXX/rmom_int/debug/build/lib.win32     stlport_vc_debug.lib  WSock32.lib user32.lib advapi32.lib comdlg32.lib gdi32.lib netapi32.lib comctl32.lib winspool.lib &gt;&amp;5</div>

<div class="gmail_quote">conftest.c</div>
<div class="gmail_quote">C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\malloc.h(117) : error C2485: &#39;__restrict&#39; : unrecognized extended attribute</div>
<div class="gmail_quote">C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\malloc.h(119) : error C2485: &#39;__restrict&#39; : unrecognized extended attribute</div>
<div class="gmail_quote">C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\malloc.h(120) : error C2485: &#39;__restrict&#39; : unrecognized extended attribute</div>
<div class="gmail_quote">C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\malloc.h(121) : error C2485: &#39;__restrict&#39; : unrecognized extended attribute</div>
<div class="gmail_quote">C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\malloc.h(123) : error C2485: &#39;__restrict&#39; : unrecognized extended attribute</div>
<div class="gmail_quote">C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\malloc.h(124) : error C2485: &#39;__restrict&#39; : unrecognized extended attribute</div>
<div class="gmail_quote">C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\malloc.h(125) : error C2485: &#39;__restrict&#39; : unrecognized extended attribute</div>
<div class="gmail_quote">C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\malloc.h(126) : error C2485: &#39;__restrict&#39; : unrecognized extended attribute</div>
<div class="gmail_quote">C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\malloc.h(127) : error C2485: &#39;__restrict&#39; : unrecognized extended attribute</div>
<div class="gmail_quote">C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\malloc.h(128) : error C2485: &#39;__restrict&#39; : unrecognized extended attribute<br></div>