]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // Copyright John Maddock 2008. |
2 | // Use, modification and distribution are subject to the | |
3 | // Boost Software License, Version 1.0. (See accompanying file | |
4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
5 | ||
6 | #include <cstddef> // See https://gcc.gnu.org/gcc-4.9/porting_to.html | |
7 | #include <gmp.h> | |
8 | #include <boost/config.hpp> | |
9 | ||
10 | #ifdef __GNUC__ | |
11 | #pragma message "__GNU_MP_VERSION=" BOOST_STRINGIZE(__GNU_MP_VERSION) | |
12 | #pragma message "__GNU_MP_VERSION_MINOR=" BOOST_STRINGIZE(__GNU_MP_VERSION_MINOR) | |
92f5a8d4 | 13 | #endif |
7c673cae FG |
14 | |
15 | #if (__GNU_MP_VERSION < 4) || ((__GNU_MP_VERSION == 4) && (__GNU_MP_VERSION_MINOR < 2)) | |
16 | #error "Incompatible GMP version" | |
17 | #endif | |
18 | ||
19 | int main() | |
20 | { | |
92f5a8d4 TL |
21 | void* (*alloc_func_ptr)(size_t); |
22 | void* (*realloc_func_ptr)(void*, size_t, size_t); | |
23 | void (*free_func_ptr)(void*, size_t); | |
7c673cae FG |
24 | |
25 | mp_get_memory_functions(&alloc_func_ptr, &realloc_func_ptr, &free_func_ptr); | |
26 | ||
27 | mpz_t integ; | |
92f5a8d4 TL |
28 | mpz_init(integ); |
29 | if (integ[0]._mp_d) | |
30 | mpz_clear(integ); | |
7c673cae FG |
31 | |
32 | return 0; | |
33 | } |