Commit 07ad3257 authored by Richard Levitte's avatar Richard Levitte
Browse files

unsigned long long is not accepted anywhere, especially on certain

32-bit platforms.  Instead, make use of inttypes.h and use the types
defined there to get 8-, 16-, 32- an 64-bit values.

There might be some operating systems where one should use int_types.h
instead of inttypes.h.  Unfortunately, I don't recall which one(s).
parent c02efd95
Loading
Loading
Loading
Loading
+12 −8
Original line number Diff line number Diff line
@@ -9,6 +9,8 @@
 *
 */

#include <inttypes.h>

/*Successful return value*/
#define AEP_R_OK                                0x00000000

@@ -76,7 +78,7 @@
 */

/* an unsigned 8-bit value */
typedef unsigned char		AEP_U8;
typedef uint8_t				AEP_U8;

/* an unsigned 8-bit character */
typedef char				AEP_CHAR;
@@ -85,20 +87,22 @@ typedef char AEP_CHAR;
typedef AEP_U8				AEP_BBOOL;

/*Unsigned value, at least 16 bits long*/
typedef unsigned short  	AEP_U16;
typedef uint16_t		  	AEP_U16;

/* an unsigned value, at least 32 bits long */
typedef unsigned int		AEP_U32;
typedef uint32_t			AEP_U32;

/*#if defined(AEP_Win32)*/
/* 64 bit unsigned value */
/*typedef unsigned _int64		AEP_U64;
/*typedef unsigned _int64		AEP_U64;*/

#elif defined(AEP_GENERIC)*/
/*#elif defined(AEP_GENERIC)*/
/* 64 bit unsigned value */
typedef unsigned long long	AEP_U64;
/*typedef unsigned long long	AEP_U64;*/
/*#endif*/

typedef uint64_t			AEP_U64;

/* at least 32 bits; each bit is a Boolean flag */
typedef AEP_U32			AEP_FLAGS;

@@ -153,11 +157,11 @@ AEP_RV ConvertAEPBigNum(void* ArbBigNum, AEP_U32 BigNumSize, unsigned char* AEP_
typedef unsigned int t_AEP_OpenConnection(unsigned int *phConnection);

typedef unsigned int t_AEP_ModExp(unsigned int hConnection, void *a, void *p,
                                  void *n, void *r,unsigned long long *tranid);
                                  void *n, void *r,uint64_t *tranid);

typedef unsigned int t_AEP_ModExpCrt(unsigned int hConnection,void *a, void *p,
                                  void *q, void *dmp1, void *dmq1,void *iqmp,
						  void *r,unsigned long long *tranid);
						  void *r,uint64_t *tranid);

typedef unsigned int t_AEP_GenRandom(AEP_CONNECTION_HNDL             hConnection,
                AEP_U32                                 Len,