comparison libtomcrypt/src/headers/tomcrypt_custom.h @ 1571:d4efb7801fcd

Attempt to fix m_free for libtomcrypt/libtommath
author Matt Johnston <matt@ucc.asn.au>
date Fri, 02 Mar 2018 00:02:06 +0800
parents 5916af64acd4
children 1ff2a1034c52
comparison
equal deleted inserted replaced
1570:67cb1983500b 1571:d4efb7801fcd
10 #ifndef TOMCRYPT_CUSTOM_H_ 10 #ifndef TOMCRYPT_CUSTOM_H_
11 #define TOMCRYPT_CUSTOM_H_ 11 #define TOMCRYPT_CUSTOM_H_
12 12
13 #include "tomcrypt_dropbear.h" 13 #include "tomcrypt_dropbear.h"
14 14
15 void * m_malloc(size_t size); 15 #include "dbmalloc.h"
16 /* m_calloc is limited in size, enough for libtomcrypt */
17 void * m_calloc(size_t nmemb, size_t size);
18 void * m_realloc(void* ptr, size_t size);
19 void m_free_direct(void* ptr);
20
21 #define XMALLOC m_malloc 16 #define XMALLOC m_malloc
22 #define XFREE m_free_direct 17 #define XFREE m_free_direct
23 #define XREALLOC m_realloc 18 #define XREALLOC m_realloc
24 #define XCALLOC m_calloc 19 #define XCALLOC m_calloc
25 20