From 567432041a1b9bcb12d15e0bd94698ab31056e8b Mon Sep 17 00:00:00 2001 From: "[GGSuchao]" <[1500062807@pku.edu.cn]> Date: Thu, 6 Jul 2017 18:41:51 +0800 Subject: [PATCH] add sm2 --- include/openssl/mirdef.h | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/include/openssl/mirdef.h b/include/openssl/mirdef.h index a0fec96b..210c314f 100644 --- a/include/openssl/mirdef.h +++ b/include/openssl/mirdef.h @@ -1,41 +1,27 @@ /* * MIRACL compiler/hardware definitions - mirdef.h - * - * This version is suitable for use with the GCC compiler - * in a C/C++ only unix environment. - * Remove mrmuldv.c from the build - * - * For MS C on a PC, change BIG_ENDIAN to LITTLE_ENDIAN - * and "long long" to "__int64" - * - * Assembly language routines for the mrmuldv module will - * probably speed things up, so in most cases the generic - * mirdef.h32 file is appropriate - * - * NOT recommended for Linux on PCs - read linux.txt - * - * NOTE:- Read comments in miracl.mak unix make file + * For C++ build of library */ -#ifdef HEADER_MIRDEF_H +#ifndef HEADER_MIRDEF_H #define HEADER_MIRDEF_H #ifdef __cplusplus extern "C"{ #endif - +#define MR_LITTLE_ENDIAN #define MIRACL 64 -#define MR_LITTLE_ENDIAN /* This may need to be changed */ -#define mr_utype int -#define mr_unsign32 unsigned int +#define mr_utype long #define mr_dltype long long -#define mr_unsign64 unsigned long long +#define mr_unsign64 unsigned long #define MR_IBITS 32 -#define MR_LBITS 32 -#define MR_NOASM +#define MR_LBITS 64 +#define mr_unsign32 unsigned int #define MR_FLASH 52 #define MAXBASE ((mr_small)1<<(MIRACL-1)) +#define MR_BITSINCHAR 8 +#define MR_CPP #ifdef __cplusplus }