diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-11-17 10:46:09 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-11-17 10:46:09 (GMT) |
commit | c011864b3411bd607efb52ffd86bb9b91e8e1bf3 (patch) | |
tree | 5ae27db53133eec3cea2523f3df4c28df354b71e /libtommath/tommath_private.h | |
parent | 68111aa5bf7fc228dcfda8beb9de265734925b56 (diff) | |
parent | 3dd86e6ebc0137c3a2c02d3a046de046571e3789 (diff) | |
download | tcl-c011864b3411bd607efb52ffd86bb9b91e8e1bf3.zip tcl-c011864b3411bd607efb52ffd86bb9b91e8e1bf3.tar.gz tcl-c011864b3411bd607efb52ffd86bb9b91e8e1bf3.tar.bz2 |
Merge trunk. Re-generate tclTomMath.h. Use faster exponentiation-function from libtommath 1.0 (in tclExecute.c).
Diffstat (limited to 'libtommath/tommath_private.h')
-rw-r--r-- | libtommath/tommath_private.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libtommath/tommath_private.h b/libtommath/tommath_private.h index f054fed..d23c333 100644 --- a/libtommath/tommath_private.h +++ b/libtommath/tommath_private.h @@ -18,11 +18,13 @@ #include <tommath.h> #include <ctype.h> -#if 0 - +#ifndef MIN #define MIN(x,y) (((x) < (y)) ? (x) : (y)) +#endif +#ifndef MAX #define MAX(x,y) (((x) > (y)) ? (x) : (y)) +#endif #ifdef __cplusplus extern "C" { @@ -37,8 +39,8 @@ extern "C" { #endif - /* define heap macros */ +#if 0 #ifndef XMALLOC /* default to libc stuff */ #define XMALLOC malloc @@ -52,6 +54,7 @@ extern "C" { extern void *XCALLOC(size_t n, size_t s); extern void XFREE(void *p); #endif +#endif /* lowlevel functions, do not call! */ int s_mp_add(mp_int *a, mp_int *b, mp_int *c); @@ -109,7 +112,6 @@ int func_name (mp_int * a, type b) \ mp_clamp (a); \ return MP_OKAY; \ } -#endif #ifdef __cplusplus } |