mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
Fix 32-bit enable-stacksize build
This commit is contained in:
@ -250,7 +250,11 @@
|
|||||||
|
|
||||||
|
|
||||||
#ifdef SINGLE_THREADED
|
#ifdef SINGLE_THREADED
|
||||||
typedef unsigned int THREAD_RETURN;
|
#if defined(WC_32BIT_CPU)
|
||||||
|
typedef void* THREAD_RETURN;
|
||||||
|
#else
|
||||||
|
typedef unsigned int THREAD_RETURN;
|
||||||
|
#endif
|
||||||
typedef void* THREAD_TYPE;
|
typedef void* THREAD_TYPE;
|
||||||
#define WOLFSSL_THREAD
|
#define WOLFSSL_THREAD
|
||||||
#else
|
#else
|
||||||
@ -3055,7 +3059,7 @@ int StackSizeHWMReset(void)
|
|||||||
#define STACK_SIZE_CHECKPOINT(...) ({ \
|
#define STACK_SIZE_CHECKPOINT(...) ({ \
|
||||||
ssize_t HWM = StackSizeHWM_OffsetCorrected(); \
|
ssize_t HWM = StackSizeHWM_OffsetCorrected(); \
|
||||||
__VA_ARGS__; \
|
__VA_ARGS__; \
|
||||||
printf(" relative stack peak usage = %ld bytes\n", HWM); \
|
printf(" relative stack peak usage = %d bytes\n", (int)HWM); \
|
||||||
StackSizeHWMReset(); \
|
StackSizeHWMReset(); \
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -3063,10 +3067,10 @@ int StackSizeHWMReset(void)
|
|||||||
ssize_t HWM = StackSizeHWM_OffsetCorrected(); \
|
ssize_t HWM = StackSizeHWM_OffsetCorrected(); \
|
||||||
int _ret; \
|
int _ret; \
|
||||||
__VA_ARGS__; \
|
__VA_ARGS__; \
|
||||||
printf(" relative stack peak usage = %ld bytes\n", HWM); \
|
printf(" relative stack peak usage = %d bytes\n", (int)HWM); \
|
||||||
_ret = StackSizeHWMReset(); \
|
_ret = StackSizeHWMReset(); \
|
||||||
if ((max >= 0) && (HWM > (ssize_t)(max))) { \
|
if ((max >= 0) && (HWM > (ssize_t)(max))) { \
|
||||||
printf(" relative stack usage at %s L%d exceeds designated max %ld bytes.\n", __FILE__, __LINE__, (ssize_t)(max)); \
|
printf(" relative stack usage at %s L%d exceeds designated max %d bytes.\n", __FILE__, __LINE__, (int)(max)); \
|
||||||
_ret = -1; \
|
_ret = -1; \
|
||||||
} \
|
} \
|
||||||
_ret; \
|
_ret; \
|
||||||
|
Reference in New Issue
Block a user