Skip to content

Commit

Permalink
wolfssl/wolfcrypt/error-crypt.h: add backward compatibility macro def…
Browse files Browse the repository at this point in the history
…initions for MP_ error codes.
  • Loading branch information
douzzer committed Aug 21, 2024
1 parent a7998a2 commit fb9186a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions wolfssl/wolfcrypt/error-crypt.h
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,17 @@ WOLFSSL_ABI WOLFSSL_API const char* wc_GetErrorString(int error);
#include <wolfssl/debug-trace-error-codes.h>
#else
#define WC_NO_ERR_TRACE(label) (label)

/* historically, these MP_ error codes were macros. accommodate application
* code that tests if they're defined, or otherwise depends on them being
* macros.
*/
#ifndef BUILDING_WOLFSSL
#define MP_MEM MP_MEM
#define MP_VAL MP_VAL
#define MP_WOULDBLOCK MP_WOULDBLOCK
#define MP_NOT_INF MP_NOT_INF
#endif
#endif

#ifdef __cplusplus
Expand Down

0 comments on commit fb9186a

Please sign in to comment.