/*-----------------------------------------------------------------------------------------------*/
/* uECC.cpp                                                                                      */
/* copyright (c) innovaphone 2022                                                                */
/*                                                                                               */
/* This is a simple wrapper for the uECC.c file to be able to compile the c file with the        */
/* standard cflags of the c++ compiler                                                           */
/*-----------------------------------------------------------------------------------------------*/


#ifndef _MSC_VER
// dummies for public/private
#define public c_public
#define private c_private
#endif

#ifdef _MSC_VER
// prevent warnings
#pragma warning (push)
#pragma warning (disable : 4244)
#endif

#ifdef __GNUC__
// prevent error "fp cannot be used in asm here"
#pragma GCC push_options
#pragma GCC optimize ("omit-frame-pointer")
#endif

// set options for the innovaphone platform
#define uECC_SUPPORTS_secp160r1 0
#define uECC_SUPPORTS_secp192r1 0
#define uECC_SUPPORTS_secp224r1 0
#define uECC_SUPPORTS_secp256r1 1
#define uECC_SUPPORTS_secp256k1 0
#define uECC_SUPPORT_COMPRESSED_POINT 0
#define uECC_OPTIMIZATION_LEVEL 3
#define uECC_SQUARE_FUNC 1

#include "uECC.c"

#ifdef __GNUC__
#pragma GCC pop_options
#endif

#ifdef _MSC_VER
#pragma warning (pop)
#endif

#ifndef _MSC_VER
#undef public
#undef private
#endif
