Changeset 68b4d3 in git for gfanlib/gfanlib_z.h


Ignore:
Timestamp:
Oct 28, 2013, 9:52:43 AM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
b19f81dea5dc1029caf194b9f57389fd6a9f66a3
Parents:
6aee8f3596288969a7c2be2063263a666f4fbe08
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2013-10-28 09:52:43+01:00
git-committer:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2013-10-28 09:53:31+01:00
Message:
porting: gfanlib and gmp 4.0/4.1 (redhat)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • gfanlib/gfanlib_z.h

    r6aee8f r68b4d3  
    1515#if OLD
    1616#include "gmp.h"
     17
     18#if (__GNU_MP_VERSION == 4) && (__GNU_MP_VERSION_MINOR<2)
     19extern void *  (*__gmp_allocate_func) _PROTO ((size_t));
     20extern void *  (*__gmp_reallocate_func) _PROTO ((void *, size_t, size_t));
     21extern void    (*__gmp_free_func) _PROTO ((void *, size_t));
     22
     23static inline void
     24mp_get_memory_functions (void *(**alloc_func) (size_t),
     25                         void *(**realloc_func) (void *, size_t, size_t),
     26                         void (**free_func) (void *, size_t))
     27{
     28  if (alloc_func != NULL)
     29    *alloc_func = __gmp_allocate_func;
     30
     31  if (realloc_func != NULL)
     32    *realloc_func = __gmp_reallocate_func;
     33
     34  if (free_func != NULL)
     35    *free_func = __gmp_free_func;
     36}
     37#endif
    1738
    1839namespace gfan{
Note: See TracChangeset for help on using the changeset viewer.