Fix header issue with default malloc()

This commit is contained in:
Manuel Pégourié-Gonnard 2014-04-02 13:43:48 +02:00
parent 74bc68ac62
commit eb82a74ed2
2 changed files with 6 additions and 0 deletions

View file

@ -2040,6 +2040,8 @@
#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */ #define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
// Platform options // Platform options
//
#define POLARSSL_PLATFORM_STD_MEM_HDR <stdlib.h> /**< Header to include for default allocator. Don't define if no header is needed. */
#define POLARSSL_PLATFORM_STD_MALLOC malloc /**< Default allocator to use, can be undefined */ #define POLARSSL_PLATFORM_STD_MALLOC malloc /**< Default allocator to use, can be undefined */
#define POLARSSL_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */ #define POLARSSL_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */
#define POLARSSL_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */ #define POLARSSL_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */

View file

@ -41,6 +41,10 @@ extern "C" {
#define POLARSSL_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use */ #define POLARSSL_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use */
#define POLARSSL_PLATFORM_STD_MALLOC malloc /**< Default allocator to use */ #define POLARSSL_PLATFORM_STD_MALLOC malloc /**< Default allocator to use */
#define POLARSSL_PLATFORM_STD_FREE free /**< Default free to use */ #define POLARSSL_PLATFORM_STD_FREE free /**< Default free to use */
#else /* POLARSSL_CONFIG_OPTIONS */
#if defined(POLARSSL_PLATFORM_STD_MEM_HDR)
#include POLARSSL_PLATFORM_STD_MEM_HDR
#endif
#endif /* POLARSSL_CONFIG_OPTIONS */ #endif /* POLARSSL_CONFIG_OPTIONS */
/* /*