Changeset 68b4d3 in git


Ignore:
Timestamp:
Oct 28, 2013, 9:52:43 AM (9 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'ad2543eab51733612ba7d118afc77edca719600e')
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)
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • configure.ac

    r6aee8f r68b4d3  
    6060AC_CHECK_LIB(pthread,pthread_create)
    6161
    62 LB_CHECK_GMP(4.2,,AC_MSG_ERROR([Unable to find GMP on your machine: please use --with-gmp=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)]))
     62LB_CHECK_GMP(4.0,,AC_MSG_ERROR([Unable to find GMP on your machine: please use --with-gmp=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)]))
    6363LB_CHECK_NTL(5.0,,AC_MSG_WARN([Unable to find NTL (which is strongly recommended) on your machine: please use --with-ntl=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)]))
    6464LB_CHECK_FLINT(2.3,,AC_MSG_WARN([Unable to find FLINT (which is strongly recommended) on your machine: please use --with-flint=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)]))
  • gfanlib/configure.ac

    r6aee8f r68b4d3  
    3030AC_HEADER_STDC
    3131
    32 LB_CHECK_GMP(3.1.1,,AC_MSG_ERROR([Unable to find GMP on your machine: please use --with-gmp=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)]))
     32LB_CHECK_GMP(4.0,,AC_MSG_ERROR([Unable to find GMP on your machine: please use --with-gmp=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)]))
    3333SING_CHECK_GFANLIB
    3434
  • gfanlib/gfanlib_q.h

    r6aee8f r68b4d3  
    1212#include <ostream>
    1313#include "gmp.h"
     14
     15#if (__GNU_MP_VERSION == 4) && (__GNU_MP_VERSION_MINOR<2)
     16extern void *  (*__gmp_allocate_func) _PROTO ((size_t));
     17extern void *  (*__gmp_reallocate_func) _PROTO ((void *, size_t, size_t));
     18extern void    (*__gmp_free_func) _PROTO ((void *, size_t));
     19
     20static inline void
     21mp_get_memory_functions (void *(**alloc_func) (size_t),
     22                         void *(**realloc_func) (void *, size_t, size_t),
     23                         void (**free_func) (void *, size_t))
     24{
     25  if (alloc_func != NULL)
     26    *alloc_func = __gmp_allocate_func;
     27
     28  if (realloc_func != NULL)
     29    *realloc_func = __gmp_reallocate_func;
     30
     31  if (free_func != NULL)
     32    *free_func = __gmp_free_func;
     33}
     34#endif
    1435
    1536#include "gfanlib_z.h"
  • 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.