forked from wolfSSL/wolfssl
better name for time_t size macro guard
This commit is contained in:
@ -81,7 +81,7 @@ $ make
|
||||
$ make install
|
||||
```
|
||||
|
||||
If you are building for a 32-bit architecture, add `-DTIME_T_NOT_LONG` to the
|
||||
If you are building for a 32-bit architecture, add `-DTIME_T_NOT_64BIT` to the
|
||||
list of CFLAGS.
|
||||
|
||||
## Example Build Output
|
||||
|
@ -18578,7 +18578,7 @@ static void test_wolfSSL_ASN1_TIME_adj(void)
|
||||
const int hour = 60*60;
|
||||
const int mini = 60;
|
||||
const byte asn_utc_time = ASN_UTC_TIME;
|
||||
#if !defined(TIME_T_NOT_LONG) && !defined(NO_64BIT)
|
||||
#if !defined(TIME_T_NOT_64BIT) && !defined(NO_64BIT)
|
||||
const byte asn_gen_time = ASN_GENERALIZED_TIME;
|
||||
#endif
|
||||
WOLFSSL_ASN1_TIME *asn_time, *s;
|
||||
@ -18613,7 +18613,7 @@ static void test_wolfSSL_ASN1_TIME_adj(void)
|
||||
XMEMSET(date_str, 0, sizeof(date_str));
|
||||
|
||||
/* Generalized time will overflow time_t if not long */
|
||||
#if !defined(TIME_T_NOT_LONG) && !defined(NO_64BIT)
|
||||
#if !defined(TIME_T_NOT_64BIT) && !defined(NO_64BIT)
|
||||
s = (WOLFSSL_ASN1_TIME*)XMALLOC(sizeof(WOLFSSL_ASN1_TIME), NULL,
|
||||
DYNAMIC_TYPE_OPENSSL);
|
||||
/* GeneralizedTime notation test */
|
||||
@ -18628,7 +18628,7 @@ static void test_wolfSSL_ASN1_TIME_adj(void)
|
||||
|
||||
XFREE(s,NULL,DYNAMIC_TYPE_OPENSSL);
|
||||
XMEMSET(date_str, 0, sizeof(date_str));
|
||||
#endif /* !TIME_T_NOT_LONG && !NO_64BIT */
|
||||
#endif /* !TIME_T_NOT_64BIT && !NO_64BIT */
|
||||
|
||||
/* if WOLFSSL_ASN1_TIME struct is not allocated */
|
||||
s = NULL;
|
||||
|
@ -474,16 +474,23 @@ WOLFSSL_API int wolfCrypt_Cleanup(void);
|
||||
|
||||
/* PowerPC time_t is int */
|
||||
#ifdef __PPC__
|
||||
#define TIME_T_NOT_LONG
|
||||
#define TIME_T_NOT_64BIT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef SIZEOF_TIME_T
|
||||
/* check if size of time_t from autoconf is less than 8 bytes (64bits) */
|
||||
#if SIZEOF_TIME_T < 8
|
||||
#undef TIME_T_NOT_LONG
|
||||
#define TIME_T_NOT_LONG
|
||||
#undef TIME_T_NOT_64BIT
|
||||
#define TIME_T_NOT_64BIT
|
||||
#endif
|
||||
#endif
|
||||
#ifdef TIME_T_NOT_LONG
|
||||
/* one old reference to TIME_T_NOT_LONG in GCC-ARM example README
|
||||
* this keeps support for the old macro name */
|
||||
#undef TIME_T_NOT_64BIT
|
||||
#define TIME_T_NOT_64BIT
|
||||
#endif
|
||||
|
||||
/* Map default time functions */
|
||||
#if !defined(XTIME) && !defined(TIME_OVERRIDES) && !defined(USER_TIME)
|
||||
|
Reference in New Issue
Block a user