mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
better name for time_t size macro guard
This commit is contained in:
@ -81,7 +81,7 @@ $ make
|
|||||||
$ make install
|
$ 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.
|
list of CFLAGS.
|
||||||
|
|
||||||
## Example Build Output
|
## Example Build Output
|
||||||
|
@ -18578,7 +18578,7 @@ static void test_wolfSSL_ASN1_TIME_adj(void)
|
|||||||
const int hour = 60*60;
|
const int hour = 60*60;
|
||||||
const int mini = 60;
|
const int mini = 60;
|
||||||
const byte asn_utc_time = ASN_UTC_TIME;
|
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;
|
const byte asn_gen_time = ASN_GENERALIZED_TIME;
|
||||||
#endif
|
#endif
|
||||||
WOLFSSL_ASN1_TIME *asn_time, *s;
|
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));
|
XMEMSET(date_str, 0, sizeof(date_str));
|
||||||
|
|
||||||
/* Generalized time will overflow time_t if not long */
|
/* 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,
|
s = (WOLFSSL_ASN1_TIME*)XMALLOC(sizeof(WOLFSSL_ASN1_TIME), NULL,
|
||||||
DYNAMIC_TYPE_OPENSSL);
|
DYNAMIC_TYPE_OPENSSL);
|
||||||
/* GeneralizedTime notation test */
|
/* GeneralizedTime notation test */
|
||||||
@ -18628,7 +18628,7 @@ static void test_wolfSSL_ASN1_TIME_adj(void)
|
|||||||
|
|
||||||
XFREE(s,NULL,DYNAMIC_TYPE_OPENSSL);
|
XFREE(s,NULL,DYNAMIC_TYPE_OPENSSL);
|
||||||
XMEMSET(date_str, 0, sizeof(date_str));
|
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 */
|
/* if WOLFSSL_ASN1_TIME struct is not allocated */
|
||||||
s = NULL;
|
s = NULL;
|
||||||
|
@ -474,16 +474,23 @@ WOLFSSL_API int wolfCrypt_Cleanup(void);
|
|||||||
|
|
||||||
/* PowerPC time_t is int */
|
/* PowerPC time_t is int */
|
||||||
#ifdef __PPC__
|
#ifdef __PPC__
|
||||||
#define TIME_T_NOT_LONG
|
#define TIME_T_NOT_64BIT
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SIZEOF_TIME_T
|
#ifdef SIZEOF_TIME_T
|
||||||
|
/* check if size of time_t from autoconf is less than 8 bytes (64bits) */
|
||||||
#if SIZEOF_TIME_T < 8
|
#if SIZEOF_TIME_T < 8
|
||||||
#undef TIME_T_NOT_LONG
|
#undef TIME_T_NOT_64BIT
|
||||||
#define TIME_T_NOT_LONG
|
#define TIME_T_NOT_64BIT
|
||||||
#endif
|
#endif
|
||||||
#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 */
|
/* Map default time functions */
|
||||||
#if !defined(XTIME) && !defined(TIME_OVERRIDES) && !defined(USER_TIME)
|
#if !defined(XTIME) && !defined(TIME_OVERRIDES) && !defined(USER_TIME)
|
||||||
|
Reference in New Issue
Block a user