summaryrefslogtreecommitdiffstats
path: root/libtommath/tommath.h
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2010-07-07 10:40:37 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2010-07-07 10:41:04 +0200
commit115f165b6e3bb74f45e13a65c5f4f82f28664a2c (patch)
treeec55b63c736b5bef6061202c8bd31b08796fa2dc /libtommath/tommath.h
parent58a20b797e5a987fc8f7c5bea3be24d754908bf5 (diff)
downloadcryptodev-linux-115f165b6e3bb74f45e13a65c5f4f82f28664a2c.tar.gz
cryptodev-linux-115f165b6e3bb74f45e13a65c5f4f82f28664a2c.tar.xz
cryptodev-linux-115f165b6e3bb74f45e13a65c5f4f82f28664a2c.zip
Added a modified libtomcrypt with DSA and RSA algorithms.
Diffstat (limited to 'libtommath/tommath.h')
-rw-r--r--libtommath/tommath.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/libtommath/tommath.h b/libtommath/tommath.h
index b229945..a637605 100644
--- a/libtommath/tommath.h
+++ b/libtommath/tommath.h
@@ -83,10 +83,12 @@ extern "C" {
#endif
/* define heap macros */
-#define XMALLOC(x) kmalloc(x, GFP_KERNEL)
-#define XFREE kfree
-#define XREALLOC(x,y) krealloc(x,y, GFP_KERNEL)
-#define XCALLOC(x,y) kzalloc(x*y, GPF_KERNEL)
+#ifndef XMALLOC
+# define XMALLOC(x) kmalloc(x, GFP_KERNEL)
+# define XFREE kfree
+# define XREALLOC(x,y) krealloc(x,y, GFP_KERNEL)
+# define XCALLOC(x,y) kzalloc(x*y, GPF_KERNEL)
+#endif
/* otherwise the bits per digit is calculated automatically from the size of a mp_digit */
#ifndef DIGIT_BIT